Function report |
Source Code:security\selinux\hooks.c |
Create Date:2022-07-28 18:56:11 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:selinux_bprm_set_creds
Proto:static int selinux_bprm_set_creds(struct linux_binprm *bprm)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct linux_binprm * | bprm |
| 2335 | inode = file_inode(file) |
| 2340 | If called_set_creds Then Return 0 |
| 2343 | old_tsec = selinux_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.()) |
| 2344 | new_tsec = selinux_cred(w credentials ) |
| 2348 | current SID = current SID |
| 2352 | fscreate SID = 0 |
| 2353 | keycreate SID = 0 |
| 2354 | fscreate SID = 0 |
| 2356 | If exec SID Then |
| 2365 | Else |
| 2367 | rc = security_transition_sid( & selinux_state, current SID , SID of this object , SECCLASS_PROCESS, NULL, & current SID ) |
| 2377 | rc = check_nnp_nosuid(bprm, old_tsec, new_tsec) |
| 2378 | If rc Then current SID = current SID |
| 2382 | type = LSM_AUDIT_DATA_FILE |
| 2385 | If current SID == current SID Then |
| 2391 | Else |
| 2417 | If how unsafe this exec is (mask of LSM_UNSAFE_*) & LSM_UNSAFE_PTRACE Then |
| 2430 | s to clear in current->personality |= Security-relevant compatibility flags that must be* cleared upon setuid or setgid exec: |
| 2439 | secureexec |= Not Not rc |
| 2442 | Return 0 |
| 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 |