summaryrefslogtreecommitdiffstats
path: root/fs/nfsd/auth.c
diff options
context:
space:
mode:
authorFelix Blyakher <felixb@sgi.com>2009-02-03 10:38:41 -0600
committerFelix Blyakher <felixb@sgi.com>2009-02-03 10:38:41 -0600
commit6d2160bfe7826aca1c94b4bca77093908a452ae7 (patch)
tree8153fcd8a7c467e5de136f312e8ef5b27bea9d6b /fs/nfsd/auth.c
parentf0e0059b9c18426cffdcc04161062251a8f9741e (diff)
parentb1792e367053968f2ddb48bc911d314143ce6242 (diff)
downloadlinux-6d2160bfe7826aca1c94b4bca77093908a452ae7.tar.bz2
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into for-linus
Diffstat (limited to 'fs/nfsd/auth.c')
-rw-r--r--fs/nfsd/auth.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/nfsd/auth.c b/fs/nfsd/auth.c
index c903e04aa217..5573508f707f 100644
--- a/fs/nfsd/auth.c
+++ b/fs/nfsd/auth.c
@@ -49,6 +49,8 @@ int nfsd_setuser(struct svc_rqst *rqstp, struct svc_export *exp)
new->fsuid = exp->ex_anon_uid;
new->fsgid = exp->ex_anon_gid;
gi = groups_alloc(0);
+ if (!gi)
+ goto oom;
} else if (flags & NFSEXP_ROOTSQUASH) {
if (!new->fsuid)
new->fsuid = exp->ex_anon_uid;
@@ -85,6 +87,7 @@ int nfsd_setuser(struct svc_rqst *rqstp, struct svc_export *exp)
new->cap_effective = cap_raise_nfsd_set(new->cap_effective,
new->cap_permitted);
put_cred(override_creds(new));
+ put_cred(new);
return 0;
oom: