Function report |
Source Code:security\smack\smack_lsm.c |
Create Date:2022-07-28 19:20:21 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:smack_bprm_set_creds - set creds for exec*@bprm: the exec information* Returns 0 if it gets a blob, -EPERM if exec forbidden and -ENOMEM otherwise
Proto:static int smack_bprm_set_creds(struct linux_binprm *bprm)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct linux_binprm * | bprm |
| 906 | inode = file_inode(file) |
| 907 | bsp = smack_cred(w credentials ) |
| 912 | If called_set_creds Then Return 0 |
| 915 | isp = smack_inode(inode) |
| 916 | If label of the task == NULL || label of the task == label for access control Then Return 0 |
| 919 | sbsp = s_security |
| 920 | If smk_flags & SMK_SB_UNTRUSTED && label of the task != smk_root Then Return 0 |
| 926 | rc = 0 |
| 940 | If how unsafe this exec is (mask of LSM_UNSAFE_*) & ~LSM_UNSAFE_PTRACE Then Return -EPERM |
| 944 | s to clear in current->personality |= Security-relevant compatibility flags that must be* cleared upon setuid or setgid exec: |
| 947 | If label for access control != label when forked Then secureexec = 1 |
| 950 | 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 |