PERFORCE change 110119 for review
Todd Miller
millert at FreeBSD.org
Thu Nov 16 19:12:10 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=110119
Change 110119 by millert at millert_macbook on 2006/11/16 19:11:19
Update vanity policy with fdesc-related entrypoints
Affected files ...
.. //depot/projects/trustedbsd/sedarwin8/policies/vanity/vanity.c#9 edit
Differences ...
==== //depot/projects/trustedbsd/sedarwin8/policies/vanity/vanity.c#9 (text+ko) ====
@@ -3,6 +3,9 @@
#include <sys/kernel.h>
#include <sys/sysctl.h>
+#include <sys/posix_sem.h>
+#include <sys/posix_shm.h>
+#include <sys/pipe.h>
#include <sys/proc.h>
#include <sys/file_internal.h>
#include <sys/mount_internal.h>
@@ -116,12 +119,58 @@
}
static void
+vanity_vnode_label_associate_file(struct ucred *cred,
+ struct mount *mp, struct label *mntlabel,
+ struct fileglob *fg, struct label *label,
+ struct vnode *vp, struct label *vlabel)
+{
+ if (vp->v_lflag & VL_LABELED)
+ v_print("VANITY: vanity_vnode_label_associate_file() already associated", vp);
+}
+
+static void
+vanity_vnode_label_associate_posixshm(struct ucred *cred,
+ struct pshminfo *pshm, struct label *pshmlabel,
+ struct vnode *vp, struct label *vlabel)
+{
+ if (vp->v_lflag & VL_LABELED)
+ v_print("VANITY: vanity_vnode_label_associate_posixshm() already associated", vp);
+}
+
+static void
+vanity_vnode_label_associate_posixsem(struct ucred *cred,
+ struct pseminfo *psem, struct label *psemlabel,
+ struct vnode *vp, struct label *vlabel)
+{
+ if (vp->v_lflag & VL_LABELED)
+ v_print("VANITY: vanity_vnode_label_associate_posixsem() already associated", vp);
+}
+
+static void
+vanity_vnode_label_associate_pipe(struct ucred *cred,
+ struct pipe *cpipe, struct label *pipelabel,
+ struct vnode *vp, struct label *vlabel)
+{
+ if (vp->v_lflag & VL_LABELED)
+ v_print("VANITY: vanity_vnode_label_associate_pipe() already associated", vp);
+}
+
+static void
vanity_vnode_label_associate_singlelabel(struct mount *mp, struct label *mntlabel, struct vnode *vp, struct label *vlabel)
{
if (vp->v_lflag & VL_LABELED)
v_print("VANITY: vanity_vnode_label_associate_singlelabel() already associated", vp);
}
+static void
+vanity_vnode_label_associate_socket(struct ucred *cred,
+ struct xsocket *xso, struct label *solabel,
+ struct vnode *vp, struct label *vlabel)
+{
+ if (vp->v_lflag & VL_LABELED)
+ v_print("VANITY: vanity_vnode_label_associate_socket() already associated", vp);
+}
+
static int
vanity_vnode_notify_create(struct ucred *cred, struct mount *mp, struct label *mntlabel, struct vnode *dvp, struct label *dlabel, struct vnode *vp, struct label *vlabel, struct componentname *cnp)
{
@@ -476,7 +525,12 @@
.mpo_vnode_label_update_extattr = vanity_vnode_label_update_extattr,
.mpo_vnode_label_associate_devfs= vanity_vnode_label_associate_devfs,
.mpo_vnode_label_associate_extattr= vanity_vnode_label_associate_extattr,
+ .mpo_vnode_label_associate_file = vanity_vnode_label_associate_file,
.mpo_vnode_label_associate_singlelabel= vanity_vnode_label_associate_singlelabel,
+ .mpo_vnode_label_associate_posixshm= vanity_vnode_label_associate_posixshm,
+ .mpo_vnode_label_associate_posixsem= vanity_vnode_label_associate_posixsem,
+ .mpo_vnode_label_associate_pipe = vanity_vnode_label_associate_pipe,
+ .mpo_vnode_label_associate_socket= vanity_vnode_label_associate_socket,
.mpo_vnode_notify_create = vanity_vnode_notify_create,
.mpo_vnode_label_update = vanity_vnode_label_update,
.mpo_vnode_label_store = vanity_vnode_label_store,
More information about the trustedbsd-cvs
mailing list