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);
}
set_fs(new->fs);
set_fs_pwd(current->fs, new->pwdmnt, new->pwd);
+ if (save->override)
+ cap_lower(current->cap_effective, CAP_DAC_OVERRIDE);
}
void pop_ctxt(struct obd_run_ctxt *saved)
//printk("pc6\n");
current->fsuid = saved->fsuid;
current->fsgid = saved->fsgid;
+
+ if (saved->override)
+ cap_raise(current->cap_effective, CAP_DAC_OVERRIDE);
}
/* utility to make a file */