]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/nfsd/auth.c
sdio: give sdio irq thread a host specific name
[linux-2.6-omap-h63xx.git] / fs / nfsd / auth.c
index 21928056e35ecad1c8aa5cb656d9d495df6a3022..294992e9bf69e18b17a52964dd0af23841894f26 100644 (file)
@@ -10,8 +10,7 @@
 #include <linux/sunrpc/svcauth.h>
 #include <linux/nfsd/nfsd.h>
 #include <linux/nfsd/export.h>
-
-#define        CAP_NFSD_MASK (CAP_FS_MASK|CAP_TO_MASK(CAP_SYS_RESOURCE))
+#include "auth.h"
 
 int nfsexp_flags(struct svc_rqst *rqstp, struct svc_export *exp)
 {
@@ -69,10 +68,12 @@ int nfsd_setuser(struct svc_rqst *rqstp, struct svc_export *exp)
        ret = set_current_groups(cred.cr_group_info);
        put_group_info(cred.cr_group_info);
        if ((cred.cr_uid)) {
-               cap_t(current->cap_effective) &= ~CAP_NFSD_MASK;
+               current->cap_effective =
+                       cap_drop_nfsd_set(current->cap_effective);
        } else {
-               cap_t(current->cap_effective) |= (CAP_NFSD_MASK &
-                                                 current->cap_permitted);
+               current->cap_effective =
+                       cap_raise_nfsd_set(current->cap_effective,
+                                          current->cap_permitted);
        }
        return ret;
 }