Lines Matching defs:old

246  * Determine whether the inheritable capabilities are limited to the old
263 * @old: The current task's current credentials
273 const struct cred *old,
280 cap_combine(old->cap_inheritable,
281 old->cap_permitted)))
286 cap_combine(old->cap_inheritable,
287 old->cap_bset)))
292 if (!cap_issubset(*permitted, old->cap_permitted))
831 const struct cred *old = current_cred();
852 new->cap_permitted = cap_combine(old->cap_bset,
853 old->cap_inheritable);
886 static inline bool nonroot_raised_pE(struct cred *new, const struct cred *old,
898 (uid_eq(new->euid, old->euid) &&
900 __cap_gained(permitted, new, old)) ||
901 __cap_gained(ambient, new, old))))
922 const struct cred *old = current_cred();
928 if (WARN_ON(!cap_ambient_invariant_ok(old)))
940 if (__cap_gained(permitted, new, old))
948 id_changed = !uid_eq(new->euid, old->euid) || !in_group_p(new->egid);
950 if ((id_changed || __cap_gained(permitted, new, old)) &&
960 old->cap_permitted);
988 if (nonroot_raised_pE(new, old, root_uid, has_fcap)) {
989 ret = audit_log_bprm_fcaps(bprm, new, old);
1001 !uid_eq(new->euid, old->uid) ||
1002 !gid_eq(new->egid, old->gid) ||
1120 static inline void cap_emulate_setxuid(struct cred *new, const struct cred *old)
1122 kuid_t root_uid = make_kuid(old->user_ns, 0);
1124 if ((uid_eq(old->uid, root_uid) ||
1125 uid_eq(old->euid, root_uid) ||
1126 uid_eq(old->suid, root_uid)) &&
1142 if (uid_eq(old->euid, root_uid) && !uid_eq(new->euid, root_uid))
1144 if (!uid_eq(old->euid, root_uid) && uid_eq(new->euid, root_uid))
1151 * @old: The current task's current credentials
1159 int cap_task_fix_setuid(struct cred *new, const struct cred *old, int flags)
1168 cap_emulate_setxuid(new, old);
1179 kuid_t root_uid = make_kuid(old->user_ns, 0);
1180 if (uid_eq(old->fsuid, root_uid) && !uid_eq(new->fsuid, root_uid))
1184 if (!uid_eq(old->fsuid, root_uid) && uid_eq(new->fsuid, root_uid))
1304 const struct cred *old = current_cred();
1311 return !!cap_raised(old->cap_bset, arg2);
1336 if ((((old->securebits & SECURE_ALL_LOCKS) >> 1)
1337 & (old->securebits ^ arg2)) /*[1]*/
1338 || ((old->securebits & SECURE_ALL_LOCKS & ~arg2)) /*[2]*/
1361 const unsigned long changed = old->securebits ^ arg2;
1379 return old->securebits;