All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel J Walsh <dwalsh@redhat.com>
To: SE Linux <selinux@tycho.nsa.gov>
Subject: Proposed patch to policy file_contexts
Date: Thu, 26 Feb 2004 15:10:21 -0500	[thread overview]
Message-ID: <403E52AD.5090103@redhat.com> (raw)

[-- 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)

             reply	other threads:[~2004-02-26 20:10 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-26 20:10 Daniel J Walsh [this message]
2004-02-26 23:39 ` Proposed patch to policy file_contexts 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=403E52AD.5090103@redhat.com \
    --to=dwalsh@redhat.com \
    --cc=selinux@tycho.nsa.gov \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.