Function report |
Source Code:security\commoncap.c |
Create Date:2022-07-28 18:36:51 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:ap_bprm_set_creds - Set up the proposed credentials for execve().*@bprm: The execution parameters, including the proposed creds* Set up the proposed credentials for a new execution context being* constructed by execve()
Proto:int cap_bprm_set_creds(struct linux_binprm *bprm)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct linux_binprm * | bprm |
| 809 | old = 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.() |
| 810 | new = w credentials |
| 815 | If WARN_ON(!cap_ambient_invariant_ok(old)) Then Return -EPERM |
| 818 | ret = Attempt to get the on-exec apply capability sets for an executable file from* its xattrs and, if present, apply them to the proposed credentials being* constructed by execve(). |
| 827 | If __cap_gained(permitted, new, old) Then s to clear in current->personality |= Security-relevant compatibility flags that must be* cleared upon setuid or setgid exec: |
| 835 | is_setid = __is_setuid(new, old) || __is_setgid(new, old) |
| 854 | If has_fcap || is_setid Then cap_clear( Ambient capability set ) |
| 867 | If effective Then caps we can actually use = caps we're permitted |
| 869 | Else caps we can actually use = Ambient capability set |
| 872 | If WARN_ON(!cap_ambient_invariant_ok(new)) Then Return -EPERM |
| 883 | If WARN_ON(!cap_ambient_invariant_ok(new)) Then Return -EPERM |
| 887 | cap_elevated = 0 |
| 888 | If is_setid || Not __is_real(root_uid, new) && (effective || __cap_grew(permitted, ambient, new)) Then cap_elevated = 1 |
| 894 | 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 |