All of lore.kernel.org
 help / color / mirror / Atom feed
* patch for fsadm
@ 2004-08-23 21:50 Luke Kenneth Casson Leighton
  2004-08-24 15:36 ` Russell Coker
  0 siblings, 1 reply; 3+ messages in thread
From: Luke Kenneth Casson Leighton @ 2004-08-23 21:50 UTC (permalink / raw)
  To: SE-Linux

[-- Attachment #1: Type: text/plain, Size: 747 bytes --]

usb-mount uses sg_map and disktype.

both these programs require some extra stuff.

basically the usb-mount script uses sg_map, disktype and fdisk
to determine info about the usb scsi drive now within its evil
grasp: e.g. the volume name, volume id, and whether the disk
has a partition table on it or whether it _is_ a partition.

so, anyway, these additions were required to not have usb-mount
poo up.

l.

-- 
--
Truth, honesty and respect are rare commodities that all spring from
the same well: Love.  If you love yourself and everyone and everything
around you, funnily and coincidentally enough, life gets a lot better.
--
<a href="http://lkcl.net">      lkcl.net      </a> <br />
<a href="mailto:lkcl@lkcl.net"> lkcl@lkcl.net </a> <br />


[-- Attachment #2: fsadm --]
[-- Type: text/plain, Size: 1332 bytes --]

diff -Naur 
--- default.1.14/domains/program/fsadm.te	2004-08-02 08:28:37.000000000 +0100
+++ current/domains/program/fsadm.te	2004-08-22 17:58:20.000000000 +0100
@@ -117,3 +116,15 @@
 # Access to /initrd devices
 allow fsadm_t { file_t unlabeled_t }:dir rw_dir_perms;
 allow fsadm_t { file_t unlabeled_t }:blk_file rw_file_perms;
+
+# this is for sg_map and disktype
+allow fsadm_t scsi_generic_device_t:chr_file { ioctl read };
+allow fsadm_t tape_device_t:chr_file { read };
+allow fsadm_t removable_device_t:lnk_file { read };
+#allow fsadm_t device_t:chr_file { read ioctl };
+#allow fsadm_t device_t:blk_file { read ioctl getattr };
+
+# /bin/mountpoint to read /dev/shm
+allow fsadm_t devpts_t:dir { search };
+allow fsadm_t tmpfs_t:dir { getattr search };
+
diff -Naur 
--- default.1.14/file_contexts/program/fsadm.fc	2004-08-02 08:28:37.000000000 +0100
+++ current/file_contexts/program/fsadm.fc	2004-08-06 19:03:43.000000000 +0100
@@ -30,5 +30,7 @@
 /sbin/install-mbr	--	system_u:object_r:fsadm_exec_t
 /usr/bin/scsi_unique_id	--	system_u:object_r:fsadm_exec_t
 /usr/bin/raw		--	system_u:object_r:fsadm_exec_t
+/usr/bin/sg_map		--	system_u:object_r:fsadm_exec_t
+/usr/bin/disktype	--	system_u:object_r:fsadm_exec_t
 /sbin/partx		--	system_u:object_r:fsadm_exec_t
 /usr/bin/partition_uuid	--	system_u:object_r:fsadm_exec_t

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-08-24 15:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-23 21:50 patch for fsadm Luke Kenneth Casson Leighton
2004-08-24 15:36 ` Russell Coker
2004-08-24 16:05   ` Luke Kenneth Casson Leighton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.