All of lore.kernel.org
 help / color / mirror / Atom feed
* Is the usercanread attribute still needed?
@ 2007-02-19  0:33 Ryan Bradetich
  2007-02-20 20:44 ` Christopher J. PeBenito
  0 siblings, 1 reply; 6+ messages in thread
From: Ryan Bradetich @ 2007-02-19  0:33 UTC (permalink / raw)
  To: selinux

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

Hello all,

I noticed the apache.te file used the file_types() macro instead of
the file_config_file() macro for the configuration files, so I looked
into the differences between the macros.

The files_config_file macro is listed below:

interface(`files_config_file',`
        gen_require(`
                attribute usercanread;
        ')

        files_type($1)

        # this is a hack and should be removed.
        typeattribute $1 usercanread;
')


After reading the comment above the typeattribute, I was curious to
figure out what the usercanread attribute was used for. Looking
through the SVN tree I found the following uses.

$ find . -type f | xargs grep  usercanread | grep -v '.svn'
./modules/kernel/files.if:              attribute usercanread;
./modules/kernel/files.if:      typeattribute $1 usercanread;
./modules/kernel/files.te:attribute usercanread;


I used the attached patched to remove the attribute from the files.te
and files.if file and the policy still compiled.  Is it safe to assume
we can remove the attribute now?  Or is the hack still needed for
something I am not seeing?

Thanks!

- Ryan

[-- Attachment #2: files.patch --]
[-- Type: text/x-patch, Size: 849 bytes --]

Index: policy/modules/kernel/files.if
===================================================================
--- policy/modules/kernel/files.if	(revision 2181)
+++ policy/modules/kernel/files.if	(working copy)
@@ -110,14 +110,7 @@
 ## </param>
 #
 interface(`files_config_file',`
-	gen_require(`
-		attribute usercanread;
-	')
-
 	files_type($1)
-
-	# this is a hack and should be removed.
-	typeattribute $1 usercanread;
 ')
 
 ########################################
Index: policy/modules/kernel/files.te
===================================================================
--- policy/modules/kernel/files.te	(revision 2181)
+++ policy/modules/kernel/files.te	(working copy)
@@ -30,9 +30,6 @@
 attribute tmpfile;
 attribute tmpfsfile;
 
-# this is a hack and should be changed
-attribute usercanread;
-
 #
 # boot_t is the type for files in /boot
 #

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

end of thread, other threads:[~2007-02-26 15:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-19  0:33 Is the usercanread attribute still needed? Ryan Bradetich
2007-02-20 20:44 ` Christopher J. PeBenito
     [not found]   ` <e739902b0702201944t104d6915raff5949c8e579885@mail.gmail.com>
2007-02-21  3:51     ` Ryan Bradetich
2007-02-23 16:33       ` Christopher J. PeBenito
2007-02-24 16:02         ` Ryan Bradetich
2007-02-26 15:09           ` Christopher J. PeBenito

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.