Skip to contentSkip to conversation

Dropping compat support for /etc/security policy file paths

RFC In review Stephen Smalley 4 participants 7 messages Feb 28, 2007 – Mar 12, 2007 SELinux security module

lore
Share & tools
lore
#0 lore raw

Hi,

Are any active distributions still using the old /etc/security/ location and layout for SELinux policy files? If not, we could drop the compat file path support from libselinux on the trunk.

Signature · 8 lines
Stephen Smalley
National Security Agency


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.
#1 lore raw
Quoted 9 lines

From: Stephen Smalley [mailto:[email protected]]

Hi,

Are any active distributions still using the old /etc/security/ location and layout for SELinux policy files? If not, we could drop the compat file path support from libselinux on the trunk.

Gentoo has switched to refpolicy with standard paths since this is required for modular policy and semanage. I'm fine with its removal.

--
This message was distributed to subscribers of the selinux mailing list. If you no longer wish to subscribe, send mail to [email protected] with the words "unsubscribe selinux" without quotes as the message.

#2 lore raw
Quoted 7 lines · Joshua Brindle
Quoted 4 lines

Are any active distributions still using the old /etc/security/ location and layout for SELinux policy files? If not, we could drop the compat file path support from libselinux on the trunk.

Gentoo has switched to refpolicy with standard paths since this is required for modular policy and semanage. I'm fine with its removal.

Same with Debian, I agree.

Signature · 9 lines
[email protected]
http://etbe.blogspot.com/          My Blog

http://www.coker.com.au/sponsorship.html Sponsoring Free Software development

--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.
#3 lore raw

PATCH 1/1 Dropping compat support for /etc/security policy file paths

In reply to Stephen Smalley
Quoted 3 lines

Are any active distributions still using the old /etc/security/ location and layout for SELinux policy files? If not, we could drop the compat file path support from libselinux on the trunk.

Here's a patch dropping support.

-Steve

____________________________________________________________________________________
Now that's room service! Choose from over 150,000 hotels in 45,000 destinations on Yahoo! Travel to find your fit.
http://farechase.yahoo.com/promo-generic-14795097

src/compat_file_path.h +0 -12
diff -urpN libselinux-2.0.4.orig/src/compat_file_path.h libselinux-2.0.4/src/compat_file_path.h
@@ -1,12 +0,0 @@
-/* Compatibility file name suffixes.  */
-S_(BINPOLICY, SECURITYDIR "/selinux/policy")
-    S_(CONTEXTS_DIR, SECURITYDIR)
-    S_(FILE_CONTEXTS, SECURITYDIR "/selinux/file_contexts")
-    S_(HOMEDIR_CONTEXTS, SECURITYDIR "/homedir_template")
-    S_(DEFAULT_CONTEXTS, SECURITYDIR "/default_contexts")
-    S_(USER_CONTEXTS, SECURITYDIR "/default_contexts.user/")
-    S_(FAILSAFE_CONTEXT, SECURITYDIR "/failsafe_context")
-    S_(DEFAULT_TYPE, SECURITYDIR "/default_type")
-    S_(BOOLEANS, SECURITYDIR "/booleans")
-    S_(MEDIA_CONTEXTS, SECURITYDIR "/default_media")
-    S_(REMOVABLE_CONTEXT, SECURITYDIR "/removable_context")
src/selinux_config.c +2 -40

81 lines not on this page · raw message

#4 lore raw
Quoted 5 lines · Steve G
Quoted 3 lines

Are any active distributions still using the old /etc/security/ location and layout for SELinux policy files? If not, we could drop the compat file path support from libselinux on the trunk.

Here's a patch dropping support.

src/selinux_config.c +1 -0
diff -urpN libselinux-2.0.4.orig/src/selinux_config.c libselinux-2.0.4/src/selinux_config.c
@@ -10,6 +10,7 @@
 #include "selinux_internal.h"
 #include "get_default_type_internal.h"
 
+#define SECURITYCONFIG "/etc/sysconfig/selinux"
 

I think we can drop this altogether, along with the use of it - it too reflects the legacy locations (/etc/sysconfig/selinux
vs. /etc/selinux/config). On modern distros, if they have an /etc/sysconfig/selinux at all, it is a symlink
to /etc/selinux/config.

Signature · 8 lines
Stephen Smalley
National Security Agency


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.
#5 lore raw
Quoted 9 lines
Quoted 5 lines
Quoted 3 lines

Are any active distributions still using the old /etc/security/ location and layout for SELinux policy files? If not, we could drop the compat file path support from libselinux on the trunk.

Here's a patch dropping support.

+#define SECURITYCONFIG "/etc/sysconfig/selinux"

I think we can drop this altogether, along with the use of it

Sure. New patch attached.

-Steve

____________________________________________________________________________________
Food fight? Enjoy some healthy debate
in the Yahoo! Answers Food & Drink Q&A.
http://answers.yahoo.com/dir/?link=list&sid=396545367

src/compat_file_path.h +0 -12
diff -urpN libselinux-2.0.4.orig/src/compat_file_path.h libselinux-2.0.4/src/compat_file_path.h
@@ -1,12 +0,0 @@
-/* Compatibility file name suffixes.  */
-S_(BINPOLICY, SECURITYDIR "/selinux/policy")
-    S_(CONTEXTS_DIR, SECURITYDIR)
-    S_(FILE_CONTEXTS, SECURITYDIR "/selinux/file_contexts")
-    S_(HOMEDIR_CONTEXTS, SECURITYDIR "/homedir_template")
-    S_(DEFAULT_CONTEXTS, SECURITYDIR "/default_contexts")
-    S_(USER_CONTEXTS, SECURITYDIR "/default_contexts.user/")
-    S_(FAILSAFE_CONTEXT, SECURITYDIR "/failsafe_context")
-    S_(DEFAULT_TYPE, SECURITYDIR "/default_type")
-    S_(BOOLEANS, SECURITYDIR "/booleans")
-    S_(MEDIA_CONTEXTS, SECURITYDIR "/default_media")
-    S_(REMOVABLE_CONTEXT, SECURITYDIR "/removable_context")
src/selinux_config.c +3 -45

86 lines not on this page · raw message

#6 lore raw
Quoted 11 lines · Steve G
Quoted 9 lines
Quoted 5 lines
Quoted 3 lines

Are any active distributions still using the old /etc/security/ location and layout for SELinux policy files? If not, we could drop the compat file path support from libselinux on the trunk.

Here's a patch dropping support.

+#define SECURITYCONFIG "/etc/sysconfig/selinux"

I think we can drop this altogether, along with the use of it

Sure. New patch attached.

Thanks, merged on the trunk.

Signature · 8 lines
Stephen Smalley
National Security Agency


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.