Skip to contentSkip to conversation

mount_ntfs policy

PATCH Daniel J Walsh 1 participant 1 message Mar 23, 2007 SELinux security module

lore
Share & tools
lore
#0 lore raw
policy/modules/system/mount.fc +1 -2
@@ -1,4 +1,3 @@
 /bin/mount.*			--	gen_context(system_u:object_r:mount_exec_t,s0)
 /bin/umount.*			--	gen_context(system_u:object_r:mount_exec_t,s0)
-
-/usr/bin/fusermount		--	gen_context(system_u:object_r:mount_exec_t,s0)
+/sbin/mount.ntfs-3g		--	gen_context(system_u:object_r:mount_ntfs_exec_t,s0)
policy/modules/system/mount.if +37 -0
@@ -143,3 +143,40 @@
 		mount_domtrans($1)
 	')
 ')
+
+########################################
+## <summary>
+##	Execute a domain transition to run mount_ntfs.
+## </summary>
+## <param name="domain">
+## <summary>
+##	Domain allowed to transition.
+## </summary>
+## </param>
+#
+interface(`mount_ntfs_domtrans',`
+	gen_require(`
+		type mount_ntfs_t, mount_ntfs_exec_t;
+	')
+
+	domtrans_pattern($1,mount_ntfs_exec_t,mount_ntfs_t)
+')
+
+########################################
+## <summary>
+##	Allow the specified domain to read/write to
+##	init scripts with a unix domain stream sockets.
+## </summary>
+## <param name="domain">
+##	<summary>
+##	Domain allowed access.
+##	</summary>
+## </param>
+#
+interface(`mount_ntfs_rw_stream_sockets',`
+	gen_require(`
+		type mount_ntfs_t;
+	')
+
+	allow $1 mount_ntfs_t:unix_stream_socket { read write };
+')
policy/modules/system/mount.te +43 -1

61 lines not on this page · raw message