Function report |
Source Code:security\keys\keyctl.c |
Create Date:2022-07-28 18:21:02 |
Last Modify:2020-03-18 07:59:52 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Attempt to install the calling process's session keyring on the process's* parent process.* The keyring must exist and must grant the caller LINK permission, and the* parent process must be single-threaded and must have the same effective
Proto:long keyctl_session_to_parent(void)
Type:long
Parameter:Nothing
1568 | cred = Allocate blank credentials, such that the credentials can be filled in at a* later date without risk of ENOMEM. |
1569 | If Not cred Then Go to error_keyring |
1571 | newwork = RCU deletion hook |
1574 | keyring_r = NULL |
1577 | me = current process |
1579 | write_lock_irq( & tasklist_lock) |
1582 | oldwork = NULL |
1591 | If Not thread_group_empty(parent) Then Go to unlock |
1596 | mycred = current_cred - Access the current task's subjective credentials* Access the subjective credentials of the current task. RCU-safe,* since nobody else can modify it.() |
1598 | If mycred == pcred || keyring inherited over fork == keyring inherited over fork Then |
1606 | If Not uid_eq( real UID of the task , effective UID of the task ) || Not uid_eq( effective UID of the task , effective UID of the task ) || Not uid_eq( saved UID of the task , effective UID of the task ) || Not gid_eq( real GID of the task , effective GID of the task ) || Not gid_eq( effective GID of the task , effective GID of the task ) || Not gid_eq( saved GID of the task , effective GID of the task ) Then Go to unlock |
1615 | If keyring inherited over fork && Not uid_eq(uid, effective UID of the task ) || Not uid_eq(uid, effective UID of the task ) Then Go to unlock |
1628 | unlock : |
1629 | write_unlock_irq( & tasklist_lock) |
1635 | Return ret |
1637 | error_keyring : |
1638 | key_ref_put(keyring_r) |
1639 | Return ret |
Name | Describe |
---|---|
SYSCALL_DEFINE5 | The key control system call |
COMPAT_SYSCALL_DEFINE5 | The key control system call, 32-bit compatibility version for 64-bit archs |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |