All of lore.kernel.org
 help / color / mirror / Atom feed
* policy mods for xfs (to support xfstt and xfs-xtt)
@ 2004-08-23 23:28 Luke Kenneth Casson Leighton
  2004-08-25 11:24 ` Russell Coker
  0 siblings, 1 reply; 5+ messages in thread
From: Luke Kenneth Casson Leighton @ 2004-08-23 23:28 UTC (permalink / raw)
  To: SE-Linux

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

i added quite a lot of fonts, two more xfont servers and also added
some non-free truetype fonts.

this resulted in a stack more mods needed to xfs.te.

xfstt and xfs-xtt behave a bit weird for example xfstt attempts
to delete /tmp/.font-unix.

a number of truetype fonts are symlinks.

also xfstt uses a cache which i assigned to the fonts_t type, this
may not be appropriate but i was in a hurry.

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: xfs --]
[-- Type: text/plain, Size: 2917 bytes --]

diff -Naur 
--- default.1.14/domains/program/xfs.te	2004-08-02 08:28:37.000000000 +0100
+++ current/domains/program/xfs.te	2004-08-17 19:10:23.000000000 +0100
@@ -24,6 +24,7 @@
 ')
 
 allow xfs_t { etc_t etc_runtime_t }:file { getattr read };
+allow xfs_t { etc_runtime_t }:dir { getattr search };
 allow xfs_t proc_t:file { getattr read };
 
 allow xfs_t self:process setpgid;
@@ -38,5 +39,37 @@
 allow xfs_t xfs_t:unix_dgram_socket create_socket_perms;
 
 # Read /usr/X11R6/lib/X11/fonts/.* and /usr/share/fonts/.*
-allow xfs_t fonts_t:dir search;
-allow xfs_t fonts_t:file { getattr read };
+# xfstt to access var/cache/xfstt and truetype somewhere
+allow xfs_t fonts_t:dir { getattr read search };
+allow xfs_t fonts_t:file { getattr read write };
+
+allow xfs_t var_lib_t:dir { search };
+	#EXE=/usr/X11R6/bin/xfs  NAME=lib   :  search
+
+allow xfs_t fonts_t:file { write };
+	#EXE=/usr/bin/xfstt  NAME=ttinfo.dir   :  write
+
+allow xfs_t tmp_t:dir { remove_name write };
+	#EXE=/usr/bin/xfstt  NAME=tmp   :  write
+	#EXE=/usr/bin/xfstt  NAME=tmp   :  write
+	#EXE=/usr/bin/xfstt  NAME=.font-unix   :  remove_name
+	#EXE=/usr/bin/xfstt  NAME=tmp   :  write
+	#EXE=/usr/bin/xfstt  NAME=.font-unix   :  remove_name
+
+allow xfs_t xfs_tmp_t:dir { remove_name rmdir search write };
+	#EXE=/usr/X11R6/bin/xfs  NAME=.font-unix   :  search
+	#EXE=/usr/X11R6/bin/xfs-xtt  NAME=.font-unix   :  search
+	#EXE=/usr/X11R6/bin/xfs  NAME=.font-unix   :  search
+	#EXE=/usr/X11R6/bin/xfs  NAME=.font-unix   :  write
+	#EXE=/usr/X11R6/bin/xfs  NAME=fs7100   :  remove_name
+	#EXE=/usr/bin/xfstt  NAME=.font-unix   :  rmdir
+	#EXE=/usr/X11R6/bin/xfs  NAME=.font-unix   :  search
+	#EXE=/usr/X11R6/bin/xfs  NAME=.font-unix   :  write
+	#EXE=/usr/X11R6/bin/xfs  NAME=fs7100   :  remove_name
+	#EXE=/usr/bin/xfstt  NAME=.font-unix   :  rmdir
+
+allow xfs_t fonts_t:lnk_file { read };
+	#EXE=/usr/X11R6/bin/xfs-xtt  NAME=luximb.ttf   :  read
+	#EXE=/usr/X11R6/bin/xfs-xtt  NAME=luximb.ttf   :  read
+	#EXE=/usr/X11R6/bin/xfs  NAME=luximb.ttf   :  read
+
diff -Naur 
--- default.1.14/file_contexts/program/xfs.fc	2004-08-02 08:28:37.000000000 +0100
+++ current/file_contexts/program/xfs.fc	2004-08-14 20:52:10.000000000 +0100
@@ -1,3 +1,5 @@
 # xfs
 /tmp/\.font-unix(/.*)?		system_u:object_r:xfs_tmp_t
 /usr/X11R6/bin/xfs	--	system_u:object_r:xfs_exec_t
+/usr/X11R6/bin/xfs-xtt	--	system_u:object_r:xfs_exec_t
+/usr/bin/xfstt		--	system_u:object_r:xfs_exec_t
diff -Naur 
--- default.1.14/file_contexts/types.fc	2004-08-02 08:28:37.000000000 +0100
+++ current/file_contexts/types.fc	2004-08-23 10:35:18.000000000 +0100
@@ -396,6 +404,8 @@
 # Fonts dir
 #
 /usr/X11R6/lib/X11/fonts(/.*)?		system_u:object_r:fonts_t
+/var/lib/msttcorefonts(/.*)?		system_u:object_r:fonts_t
+/var/cache/xfstt(/.*)?			system_u:object_r:fonts_t
 /usr/share/fonts(/.*)?			system_u:object_r:fonts_t
 /usr/local/share/fonts(/.*)?		system_u:object_r:fonts_t
 

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

end of thread, other threads:[~2004-08-26 10:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-23 23:28 policy mods for xfs (to support xfstt and xfs-xtt) Luke Kenneth Casson Leighton
2004-08-25 11:24 ` Russell Coker
2004-08-25 13:28   ` Luke Kenneth Casson Leighton
2004-08-25 22:16     ` Erich Schubert
2004-08-26 11:00       ` 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.