X-Git-Url: http://git.cascardo.info/?a=blobdiff_plain;f=fs%2Fnfsd%2Fauth.c;h=36fcabbf5186452023707c360fe16e3f168200a2;hb=9eead2a8115d2a6aecf267c292f751f7761fa5f8;hp=5573508f707fa5cd652da4503049fa6e89c0f9f8;hpb=6967963d6d5cac40a091d075326f0e3ccb95c58a;p=cascardo%2Flinux.git diff --git a/fs/nfsd/auth.c b/fs/nfsd/auth.c index 5573508f707f..36fcabbf5186 100644 --- a/fs/nfsd/auth.c +++ b/fs/nfsd/auth.c @@ -34,6 +34,8 @@ int nfsd_setuser(struct svc_rqst *rqstp, struct svc_export *exp) int flags = nfsexp_flags(rqstp, exp); int ret; + validate_process_creds(); + /* discard any old override before preparing the new set */ revert_creds(get_cred(current->real_cred)); new = prepare_creds(); @@ -86,8 +88,10 @@ int nfsd_setuser(struct svc_rqst *rqstp, struct svc_export *exp) else new->cap_effective = cap_raise_nfsd_set(new->cap_effective, new->cap_permitted); + validate_process_creds(); put_cred(override_creds(new)); put_cred(new); + validate_process_creds(); return 0; oom: