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);
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)
//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 */