diff options
author | Eric W. Biederman <ebiederm@xmission.com> | 2013-04-03 17:28:16 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-04-07 18:58:55 -0400 |
commit | 6b0ee8c036ecb3ac92e18e6ca0dca7bff88beaf0 (patch) | |
tree | c32395b07fd0da960d26d8980f65ed8d97352165 /net/core | |
parent | d978a6361ad13f1f9694fcb7b5852d253a544d92 (diff) | |
download | linux-exynos-6b0ee8c036ecb3ac92e18e6ca0dca7bff88beaf0.tar.gz linux-exynos-6b0ee8c036ecb3ac92e18e6ca0dca7bff88beaf0.tar.bz2 linux-exynos-6b0ee8c036ecb3ac92e18e6ca0dca7bff88beaf0.zip |
scm: Stop passing struct cred
Now that uids and gids are completely encapsulated in kuid_t
and kgid_t we no longer need to pass struct cred which allowed
us to test both the uid and the user namespace for equality.
Passing struct cred potentially allows us to pass the entire group
list as BSD does but I don't believe the cost of cache line misses
justifies retaining code for a future potential application.
Signed-off-by: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/scm.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/net/core/scm.c b/net/core/scm.c index 2dc6cdaaae8a..83b2b383c865 100644 --- a/net/core/scm.c +++ b/net/core/scm.c @@ -187,22 +187,6 @@ int __scm_send(struct socket *sock, struct msghdr *msg, struct scm_cookie *p) p->creds.uid = uid; p->creds.gid = gid; - - if (!p->cred || - !uid_eq(p->cred->euid, uid) || - !gid_eq(p->cred->egid, gid)) { - struct cred *cred; - err = -ENOMEM; - cred = prepare_creds(); - if (!cred) - goto error; - - cred->uid = cred->euid = uid; - cred->gid = cred->egid = gid; - if (p->cred) - put_cred(p->cred); - p->cred = cred; - } break; } default: |