Lines Matching refs:old

209 	const struct cred *old;
218 old = task->cred;
219 memcpy(new, old, sizeof(struct cred));
242 if (security_prepare_creds(new, old, GFP_KERNEL_ACCOUNT) < 0)
383 * the old set. Both the objective and the subjective credentials pointers are
395 const struct cred *old = task->real_cred;
400 BUG_ON(task->cred != old);
406 if (!uid_eq(old->euid, new->euid) ||
407 !gid_eq(old->egid, new->egid) ||
408 !uid_eq(old->fsuid, new->fsuid) ||
409 !gid_eq(old->fsgid, new->fsgid) ||
410 !cred_cap_issubset(old, new)) {
427 if (!uid_eq(new->fsuid, old->fsuid))
429 if (!gid_eq(new->fsgid, old->fsgid))
436 if (new->user != old->user || new->user_ns != old->user_ns)
440 if (new->user != old->user || new->user_ns != old->user_ns)
441 dec_rlimit_ucounts(old->ucounts, UCOUNT_RLIMIT_NPROC, 1);
444 if (!uid_eq(new->uid, old->uid) ||
445 !uid_eq(new->euid, old->euid) ||
446 !uid_eq(new->suid, old->suid) ||
447 !uid_eq(new->fsuid, old->fsuid))
450 if (!gid_eq(new->gid, old->gid) ||
451 !gid_eq(new->egid, old->egid) ||
452 !gid_eq(new->sgid, old->sgid) ||
453 !gid_eq(new->fsgid, old->fsgid))
456 /* release the old obj and subj refs both */
457 put_cred_many(old, 2);
484 * process, returning the old set for later reversion.
488 const struct cred *old;
502 old = override_creds_light(new);
504 kdebug("override_creds() = %p{%ld}", old,
505 atomic_long_read(&old->usage));
506 return old;
512 * @old: The credentials to be restored
514 * Revert a temporary set of override subjective credentials to an old set,
517 void revert_creds(const struct cred *old)
521 kdebug("revert_creds(%p{%ld})", old,
522 atomic_long_read(&old->usage));
524 revert_creds_light(old);
631 const struct cred *old;
643 old = get_task_cred(daemon);
645 *new = *old;
667 if (security_prepare_creds(new, old, GFP_KERNEL_ACCOUNT) < 0)
670 put_cred(old);
675 put_cred(old);