Changeset View
Changeset View
Standalone View
Standalone View
sys/fs/unionfs/union_subr.c
Show First 20 Lines • Show All 766 Lines • ▼ Show 20 Lines | unionfs_mkshadowdir(struct unionfs_mount *ump, struct vnode *udvp, | ||||
rootinfo = uifind((uid_t)0); | rootinfo = uifind((uid_t)0); | ||||
cred = crdup(cnp->cn_cred); | cred = crdup(cnp->cn_cred); | ||||
/* | /* | ||||
* The calls to chgproccnt() are needed to compensate for change_ruid() | * The calls to chgproccnt() are needed to compensate for change_ruid() | ||||
* calling chgproccnt(). | * calling chgproccnt(). | ||||
*/ | */ | ||||
chgproccnt(cred->cr_ruidinfo, 1, 0); | chgproccnt(cred->cr_ruidinfo, 1, 0); | ||||
change_euid(cred, rootinfo); | change_euid(cred, rootinfo); | ||||
change_ruid(cred, rootinfo); | change_ruid(cred, rootinfo, 1); | ||||
change_svuid(cred, (uid_t)0); | change_svuid(cred, (uid_t)0); | ||||
uifree(rootinfo); | uifree(rootinfo); | ||||
cnp->cn_cred = cred; | cnp->cn_cred = cred; | ||||
memset(&cn, 0, sizeof(cn)); | memset(&cn, 0, sizeof(cn)); | ||||
if ((error = VOP_GETATTR(lvp, &lva, cnp->cn_cred))) | if ((error = VOP_GETATTR(lvp, &lva, cnp->cn_cred))) | ||||
goto unionfs_mkshadowdir_abort; | goto unionfs_mkshadowdir_abort; | ||||
▲ Show 20 Lines • Show All 484 Lines • Show Last 20 Lines |