Lines Matching refs:old

209 	const struct cred *old;  in prepare_creds()  local
218 old = task->cred; in prepare_creds()
219 memcpy(new, old, sizeof(struct cred)); in prepare_creds()
242 if (security_prepare_creds(new, old, GFP_KERNEL_ACCOUNT) < 0) in prepare_creds()
395 const struct cred *old = task->real_cred; in commit_creds() local
400 BUG_ON(task->cred != old); in commit_creds()
406 if (!uid_eq(old->euid, new->euid) || in commit_creds()
407 !gid_eq(old->egid, new->egid) || in commit_creds()
408 !uid_eq(old->fsuid, new->fsuid) || in commit_creds()
409 !gid_eq(old->fsgid, new->fsgid) || in commit_creds()
410 !cred_cap_issubset(old, new)) { in commit_creds()
427 if (!uid_eq(new->fsuid, old->fsuid)) in commit_creds()
429 if (!gid_eq(new->fsgid, old->fsgid)) in commit_creds()
436 if (new->user != old->user || new->user_ns != old->user_ns) in commit_creds()
440 if (new->user != old->user || new->user_ns != old->user_ns) in commit_creds()
441 dec_rlimit_ucounts(old->ucounts, UCOUNT_RLIMIT_NPROC, 1); in commit_creds()
444 if (!uid_eq(new->uid, old->uid) || in commit_creds()
445 !uid_eq(new->euid, old->euid) || in commit_creds()
446 !uid_eq(new->suid, old->suid) || in commit_creds()
447 !uid_eq(new->fsuid, old->fsuid)) in commit_creds()
450 if (!gid_eq(new->gid, old->gid) || in commit_creds()
451 !gid_eq(new->egid, old->egid) || in commit_creds()
452 !gid_eq(new->sgid, old->sgid) || in commit_creds()
453 !gid_eq(new->fsgid, old->fsgid)) in commit_creds()
457 put_cred_many(old, 2); in commit_creds()
581 const struct cred *old; in prepare_kernel_cred() local
593 old = get_task_cred(daemon); in prepare_kernel_cred()
595 *new = *old; in prepare_kernel_cred()
617 if (security_prepare_creds(new, old, GFP_KERNEL_ACCOUNT) < 0) in prepare_kernel_cred()
620 put_cred(old); in prepare_kernel_cred()
625 put_cred(old); in prepare_kernel_cred()