Skip to contentSkip to conversation

busybox -- SELinux option support for coreutils: ver3

PATCH In review Yuichi Nakamura 1 participant 2 messages Feb 23, 2007 – Feb 26, 2007 1 message not in the archive SELinux security module

lore
Share & tools
lore
#0 lore raw

PATCH 5/8 busybox -- SELinux option support for coreutils: ver3

[5/8] busybox-coreutils-05-ls.v3.patch
- -Z option support for ls. Security context of file is shown by -Z option.
In current busybox, -k/-K shows security context. However, they are replaced by -Z option in recent coreutils, so -Z have to be added by this patch.

ls.c +5 -1
Index: coreutils/ls.c
===================================================================
@@ -716,7 +716,8 @@
 	USE_FEATURE_LS_RECURSIVE("R")
 	USE_FEATURE_HUMAN_READABLE("h")
 	USE_SELINUX("K")
-	USE_FEATURE_AUTOWIDTH("T:w:");
+	USE_FEATURE_AUTOWIDTH("T:w:")
+    USE_SELINUX("Z");
 
 enum {
 	LIST_MASK_TRIGGER	= 0,
@@ -769,6 +770,9 @@
 #if ENABLE_FEATURE_AUTOWIDTH
 	0, 0,                       /* T, w - ignored */
 #endif
+#if ENABLE_SELINUX	
+	LIST_MODEBITS|LIST_ID_NAME|LIST_CONTEXT, /*Z*/
+#endif
 	(1U<<31)
 };
 

A message that is not in the archive (sent off-list or not yet received): [email protected]

#2 lore raw
Quoted 11 lines · On Sat, 24 Feb 2007 16:01:11 +0100 Denis Vlasenko wrote:
Quoted 5 lines · Yuichi Nakamura

[5/8] busybox-coreutils-05-ls.v3.patch
- -Z option support for ls. Security context of file is shown by -Z option.
In current busybox, -k/-K shows security context. However, they are replaced by -Z option in recent coreutils, so -Z have to be added by this patch.

(quoted diff) +2 -0
+       USE_FEATURE_AUTOWIDTH("T:w:")
+    USE_SELINUX("Z");

Use tab here instead of four spaces.

Fixed.

Quoted 2 lines

--
vda

Attached is revised patch(v4).

Signature · 3 lines
Yuichi Nakamura
Hitachi Software Engineering Co., Ltd.
SELinux Policy Editor: http://seedit.sourceforge.net/
ls.c +5 -1
Index: coreutils/ls.c
===================================================================
@@ -716,7 +716,8 @@
 	USE_FEATURE_LS_RECURSIVE("R")
 	USE_FEATURE_HUMAN_READABLE("h")
 	USE_SELINUX("K")
-	USE_FEATURE_AUTOWIDTH("T:w:");
+	USE_FEATURE_AUTOWIDTH("T:w:")
+	USE_SELINUX("Z");
 
 enum {
 	LIST_MASK_TRIGGER	= 0,
@@ -769,6 +770,9 @@
 #if ENABLE_FEATURE_AUTOWIDTH
 	0, 0,                       /* T, w - ignored */
 #endif
+#if ENABLE_SELINUX	
+	LIST_MODEBITS|LIST_ID_NAME|LIST_CONTEXT, /*Z*/
+#endif
 	(1U<<31)
 };