Whamcloud - gitweb
- nodlm option to llanalyze
[fs/lustre-release.git] / lustre / lib / simple.c
index 98e2b46..0a3d058 100644 (file)
@@ -50,7 +50,6 @@ void push_ctxt(struct obd_run_ctxt *save, struct obd_run_ctxt *new,
         save->fs = get_fs();
         save->pwd = dget(current->fs->pwd);
         save->pwdmnt = mntget(current->fs->pwdmnt);
-        save->override = cap_raised(current->cap_effective, CAP_DAC_OVERRIDE);
 
         LASSERT(save->pwd);
         LASSERT(save->pwdmnt);
@@ -59,14 +58,16 @@ void push_ctxt(struct obd_run_ctxt *save, struct obd_run_ctxt *new,
 
         save->fsuid = current->fsuid;
         save->fsgid = current->fsgid;
+        save->cap = current->cap_effective;
         if (uc) { 
                 current->fsuid = uc->ouc_fsuid;
                 current->fsgid = uc->ouc_fsgid;
+                current->cap_effective = uc->ouc_cap;
         }
         set_fs(new->fs);
         set_fs_pwd(current->fs, new->pwdmnt, new->pwd);
-        if (save->override)
-                cap_lower(current->cap_effective, CAP_DAC_OVERRIDE);
+        //if (save->override)
+        //        cap_lower(current->cap_effective, CAP_DAC_OVERRIDE);
 }
 
 void pop_ctxt(struct obd_run_ctxt *saved)
@@ -87,9 +88,10 @@ void pop_ctxt(struct obd_run_ctxt *saved)
         //printk("pc6\n");
         current->fsuid = saved->fsuid;
         current->fsgid = saved->fsgid;
+        current->cap_effective = saved->cap;
 
-        if (saved->override)
-                cap_raise(current->cap_effective, CAP_DAC_OVERRIDE);
+        //        if (saved->override)
+        //       cap_raise(current->cap_effective, CAP_DAC_OVERRIDE);
 }
 
 /* utility to make a file */