Function report |
Source Code:security\keys\request_key.c |
Create Date:2022-07-28 18:23:18 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Request userspace finish the construction of a key* - execute "/sbin/request-key <op> <key> <uid> <gid> <keyring> <keyring> <keyring>"
Proto:static int call_sbin_request_key(struct key *authkey, void *aux)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct key * | authkey | |
void * | aux |
117 | request_key[] = "/sbin/request-key" |
118 | rka = get_request_key_auth(authkey) |
119 | cred = 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.() |
121 | key = target_key |
123 | char key_str[12], keyring_str[3][12] |
127 | kenter("{%d},{%d},%s", key serial number , key serial number , op) |
129 | ret = Look up the user and user session keyrings for the current process's UID,* creating them if they don't exist. |
143 | Go to error_alloc |
148 | If ret < 0 Then Go to error_link |
153 | sprintf(gid_str, "%d", from_kgid( & userns count is 1 for root user, 1 for init_uts_ns,* and 1 for... ?, GID for VFS ops )) |
156 | sprintf(key_str, "%d", key serial number ) |
159 | sprintf(keyring_str[0], "%d", keyring private to this thread ? key serial number : 0) |
162 | prkey = 0 |
163 | If keyring private to this process Then prkey = key serial number |
165 | sprintf(keyring_str[1], "%d", prkey) |
168 | If Not session Then session = user_session |
170 | sskey = key serial number |
172 | sprintf(keyring_str[2], "%d", sskey) |
175 | i = 0 |
181 | i = 0 |
182 | argv[i++] = request_key |
187 | argv[i++] = keyring_str[0] |
188 | argv[i++] = keyring_str[1] |
189 | argv[i++] = keyring_str[2] |
196 | If ret >= 0 Then |
201 | Else ret = 0 |
207 | error_link : |
210 | error_alloc : |
212 | error_us : |
215 | Return ret |
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 |