Whamcloud - gitweb
Initialize mu_(fs)uid/mu_(fs)gid when they are not squashed.
authorfanyong <fanyong>
Tue, 3 Oct 2006 06:33:18 +0000 (06:33 +0000)
committerfanyong <fanyong>
Tue, 3 Oct 2006 06:33:18 +0000 (06:33 +0000)
lustre/mdt/mdt_lib.c

index 95f3c1b..41d2d9e 100644 (file)
@@ -228,6 +228,9 @@ static int mdt_squash_root(struct mdt_device *mdt, struct md_ucred *ucred,
                 } else {
                         ucred->mu_fsuid = pud->pud_fsuid;
                 }
+        } else {
+                ucred->mu_uid   = pud->pud_uid;
+                ucred->mu_fsuid = pud->pud_fsuid;
         }
 
         if (rsi->rsi_gid) {
@@ -260,6 +263,9 @@ static int mdt_squash_root(struct mdt_device *mdt, struct md_ucred *ucred,
                                 squash_count++;
                         }
                 }
+        } else {
+                ucred->mu_gid   = pud->pud_gid;
+                ucred->mu_fsgid = pud->pud_fsgid;
         }
 
         if (squash_count || ucred->mu_fsuid)