patch-2_6_7-vs1_9_1_12
[linux-2.6.git] / fs / nfsd / auth.c
index cfe9ce8..05822ee 100644 (file)
@@ -9,6 +9,7 @@
 #include <linux/sunrpc/svc.h>
 #include <linux/sunrpc/svcauth.h>
 #include <linux/nfsd/nfsd.h>
+#include <linux/vserver/xid.h>
 
 #define        CAP_NFSD_MASK (CAP_FS_MASK|CAP_TO_MASK(CAP_SYS_RESOURCE))
 
@@ -42,13 +43,15 @@ int nfsd_setuser(struct svc_rqst *rqstp, struct svc_export *exp)
        }
 
        if (cred->cr_uid != (uid_t) -1)
-               current->fsuid = cred->cr_uid;
+               current->fsuid = INOXID_UID(cred->cr_uid, cred->cr_gid);
        else
                current->fsuid = exp->ex_anon_uid;
        if (cred->cr_gid != (gid_t) -1)
-               current->fsgid = cred->cr_gid;
+               current->fsgid = INOXID_GID(cred->cr_uid, cred->cr_gid);
        else
                current->fsgid = exp->ex_anon_gid;
+       
+       current->xid = INOXID_XID(cred->cr_uid, cred->cr_gid, 0);
 
        if (!cred->cr_group_info)
                return -ENOMEM;