All of lore.kernel.org
 help / color / mirror / Atom feed
* Proposed patch to policy file_contexts
@ 2004-02-26 20:10 Daniel J Walsh
  2004-02-26 23:39 ` Dale Amon
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Daniel J Walsh @ 2004-02-26 20:10 UTC (permalink / raw)
  To: SE Linux

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

Since the file_contexts file is now being build with m4, I am proposing 
this patch to allow for simpler specifications of alternate 
homedirectories or staff users.

As we are roling this out we are finding many users placing their 
homedirectories in the non standard location.

What do you think?

Dan

[-- Attachment #2: policy-homedir.patch --]
[-- Type: text/x-diff, Size: 2654 bytes --]

--- policy-1.6/file_contexts/users.fc.homedir	2004-02-26 15:03:53.957826373 -0500
+++ policy-1.6/file_contexts/users.fc	2004-02-26 15:03:07.283167405 -0500
@@ -0,0 +1,9 @@
+#
+# If you have an alternate homedir you would specify it here
+#
+#home_dir(user, /local_home)
+#
+#  If you have alternate members of staff you would specify it here
+#
+#home_dir(staff, /home,jadmin)
+#home_dir(staff, /local_home,jadmin)
--- policy-1.6/file_contexts/types.fc.homedir	2004-02-26 14:57:19.071019536 -0500
+++ policy-1.6/file_contexts/types.fc	2004-02-26 14:59:04.624938026 -0500
@@ -82,9 +82,7 @@
 # 
 # Ordinary user home directories.
 #
-/home			-d	system_u:object_r:home_root_t
-/home/[^/]+		-d	system_u:object_r:user_home_dir_t
-/home/[^/]+/.+			system_u:object_r:user_home_t
+home_dir(user,/home)
 
 #
 # /bin
@@ -418,7 +416,8 @@
 /lost\+found(/.*)?		system_u:object_r:lost_found_t
 /usr/lost\+found(/.*)?		system_u:object_r:lost_found_t
 /boot/lost\+found(/.*)?		system_u:object_r:lost_found_t
-/home/lost\+found(/.*)?		system_u:object_r:lost_found_t
+# moved to home.fc 
+# /home/lost\+found(/.*)?		system_u:object_r:lost_found_t
 /var/lost\+found(/.*)?		system_u:object_r:lost_found_t
 /tmp/lost\+found(/.*)?		system_u:object_r:lost_found_t
 /usr/local/lost\+found(/.*)?	system_u:object_r:lost_found_t
--- policy-1.6/file_contexts/homedir.homedir	2004-02-26 14:57:07.079392137 -0500
+++ policy-1.6/file_contexts/homedir	2004-02-26 14:56:33.529232470 -0500
@@ -0,0 +1,14 @@
+define(`home_dir',`
+$2			-d	system_u:object_r:home_root_t
+ifelse($3,`',`
+$2/[^/]+		-d	system_u:object_r:$1_home_dir_t
+$2/[^/]+/.+			system_u:object_r:$1_home_t
+$2/\.journal			<<none>>
+$2/lost\+found(/.*)?		system_u:object_r:lost_found_t
+', `
+$2/$3/[^/]+		-d	system_u:object_r:$1_home_dir_t
+$2/$3/[^/]+/.+			system_u:object_r:$1_home_t
+$2/$3/\.journal			<<none>>
+$2/$3/lost\+found(/.*)?		system_u:object_r:lost_found_t
+')
+')
--- policy-1.6/Makefile.homedir	2004-02-26 15:00:50.902774628 -0500
+++ policy-1.6/Makefile	2004-02-26 15:01:16.167883200 -0500
@@ -51,7 +51,7 @@
 UNUSED_TE_FILES := $(wildcard domains/program/unused/*.te)
 
 FC = file_contexts/file_contexts
-FCFILES=file_contexts/types.fc $(wildcard file_contexts/misc/*.fc) $(patsubst domains/program/%.te,file_contexts/program/%.fc, $(wildcard domains/program/*.te))
+FCFILES=file_contexts/homedir file_contexts/types.fc file_contexts/users.fc $(wildcard file_contexts/misc/*.fc) $(patsubst domains/program/%.te,file_contexts/program/%.fc, $(wildcard domains/program/*.te))
 
 APPDIR=$(DESTDIR)/etc/security
 APPFILES = $(addprefix $(APPDIR)/,default_contexts default_type initrc_context failsafe_context)

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

end of thread, other threads:[~2004-03-08 17:33 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-26 20:10 Proposed patch to policy file_contexts Daniel J Walsh
2004-02-26 23:39 ` Dale Amon
2004-02-27 19:28 ` Stephen Smalley
2004-02-27 21:18 ` Karl MacMillan
2004-03-02 16:36   ` Daniel J Walsh
2004-03-03 14:22     ` Karl MacMillan
2004-03-03 21:21       ` Stephen Smalley
2004-03-03 21:36         ` Karl MacMillan
2004-03-05 17:18           ` Stephen Smalley
2004-03-08 15:59             ` Karl MacMillan
2004-03-08 16:05               ` Russell Coker
2004-03-08 17:33               ` Stephen Smalley

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.