summaryrefslogtreecommitdiffstats
path: root/sys/security/mac_mls/mac_mls.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/security/mac_mls/mac_mls.c')
-rw-r--r--sys/security/mac_mls/mac_mls.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/sys/security/mac_mls/mac_mls.c b/sys/security/mac_mls/mac_mls.c
index 4adc3f5..57aacd3 100644
--- a/sys/security/mac_mls/mac_mls.c
+++ b/sys/security/mac_mls/mac_mls.c
@@ -469,6 +469,18 @@ mac_mls_create_devfs_directory(char *dirname, int dirnamelen,
}
static void
+mac_mls_create_devfs_symlink(struct ucred *cred, struct devfs_dirent *dd,
+ struct label *ddlabel, struct devfs_dirent *de, struct label *delabel)
+{
+ struct mac_mls *source, *dest;
+
+ source = SLOT(&cred->cr_label);
+ dest = SLOT(delabel);
+
+ mac_mls_copy_single(source, dest);
+}
+
+static void
mac_mls_create_devfs_vnode(struct devfs_dirent *devfs_dirent,
struct label *direntlabel, struct vnode *vp, struct label *vnodelabel)
{
@@ -1945,6 +1957,8 @@ static struct mac_policy_op_entry mac_mls_ops[] =
(macop_t)mac_mls_create_devfs_device },
{ MAC_CREATE_DEVFS_DIRECTORY,
(macop_t)mac_mls_create_devfs_directory },
+ { MAC_CREATE_DEVFS_SYMLINK,
+ (macop_t)mac_mls_create_devfs_symlink },
{ MAC_CREATE_DEVFS_VNODE,
(macop_t)mac_mls_create_devfs_vnode },
{ MAC_CREATE_VNODE,
OpenPOWER on IntegriCloud