mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Revert r210194, adding a comment explaining why calls to chgproccnt()
in unionfs are actually needed. I have a better fix in trasz_hrl p4 branch, but now is not a good moment to commit it. Reported by: Alex Kozlov
This commit is contained in:
parent
db1cea00ad
commit
81f6480d42
1 changed files with 6 additions and 0 deletions
|
|
@ -775,6 +775,11 @@ unionfs_mkshadowdir(struct unionfs_mount *ump, struct vnode *udvp,
|
|||
/* Authority change to root */
|
||||
rootinfo = uifind((uid_t)0);
|
||||
cred = crdup(cnp->cn_cred);
|
||||
/*
|
||||
* The calls to chgproccnt() are needed to compensate for change_ruid()
|
||||
* calling chgproccnt().
|
||||
*/
|
||||
chgproccnt(cred->cr_ruidinfo, 1, 0);
|
||||
change_euid(cred, rootinfo);
|
||||
change_ruid(cred, rootinfo);
|
||||
change_svuid(cred, (uid_t)0);
|
||||
|
|
@ -824,6 +829,7 @@ unionfs_mkshadowdir_free_out:
|
|||
|
||||
unionfs_mkshadowdir_abort:
|
||||
cnp->cn_cred = credbk;
|
||||
chgproccnt(cred->cr_ruidinfo, -1, 0);
|
||||
crfree(cred);
|
||||
|
||||
return (error);
|
||||
|
|
|
|||
Loading…
Reference in a new issue