When MAC is enabled, warn if getnewvnode() is asked to produce a vnode
without a mountpoint. In this scenario, there's no useful source for a label on the vnode, since we can't query the mountpoint for the labeling strategy or default label.
This commit is contained in:
parent
ff7c5a4880
commit
b0e86f6ac2
@ -858,6 +858,8 @@ getnewvnode(tag, mp, vops, vpp)
|
||||
mac_init_vnode(vp);
|
||||
if (mp != NULL && (mp->mnt_flag & MNT_MULTILABEL) == 0)
|
||||
mac_associate_vnode_singlelabel(mp, vp);
|
||||
else if (mp == NULL)
|
||||
printf("NULL mp in getnewvnode()\n");
|
||||
#endif
|
||||
delmntque(vp);
|
||||
if (mp != NULL) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user