mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
kernel/groups.c: remove return value of set_groups
After commit 6307f8fee2 ("security: remove dead hook task_setgroups"),
set_groups will always return zero, so we could just remove return value
of set_groups.
This patch reduces code size, and simplfies code to use set_groups,
because we don't need to check its return value any more.
[[email protected]: remove obsolete claims from set_groups() comment]
Signed-off-by: Wang YanQing <[email protected]>
Cc: "Eric W. Biederman" <[email protected]>
Cc: Serge Hallyn <[email protected]>
Cc: Eric Paris <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
6af9f7bf3c
commit
8f6c5ffc89
3 changed files with 4 additions and 17 deletions
|
|
@ -71,10 +71,8 @@ int nfsd_setuser(struct svc_rqst *rqstp, struct svc_export *exp)
|
|||
if (gid_eq(new->fsgid, INVALID_GID))
|
||||
new->fsgid = exp->ex_anon_gid;
|
||||
|
||||
ret = set_groups(new, gi);
|
||||
set_groups(new, gi);
|
||||
put_group_info(gi);
|
||||
if (ret < 0)
|
||||
goto error;
|
||||
|
||||
if (!uid_eq(new->fsuid, GLOBAL_ROOT_UID))
|
||||
new->cap_effective = cap_drop_nfsd_set(new->cap_effective);
|
||||
|
|
@ -89,7 +87,6 @@ int nfsd_setuser(struct svc_rqst *rqstp, struct svc_export *exp)
|
|||
|
||||
oom:
|
||||
ret = -ENOMEM;
|
||||
error:
|
||||
abort_creds(new);
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue