Skip to contentSkip to conversation

libselinux: drop build config EMBEDDED=y

PATCH Applied [email protected] 3 participants 5 messages Sep 28, 2016 SELinux security module

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 libselinux: drop build config EMBEDDED=y

From: William Roberts <[email protected]>

It was reported that this is no longer used, so drop it.

---
 libselinux/Makefile | 6 ------
 1 file changed, 6 deletions(-)
libselinux/Makefile +0 -6
index 5a8d42c..d1532e8 100644
@@ -4,12 +4,6 @@ DISABLE_AVC ?= n
 DISABLE_SETRANS ?= n
 DISABLE_RPM ?= n
 DISABLE_BOOL ?= n
-ifeq ($(EMBEDDED),y)
-	override DISABLE_AVC=y
-	override DISABLE_SETRANS=y
-	override DISABLE_RPM=y
-	override DISABLE_BOOL=y
-endif
 ifeq ($(DISABLE_AVC),y)
 	EMFLAGS+= -DDISABLE_AVC
 endif
Signature · 1 line
1.9.1
#1 lore raw

PATCH 2/3 libselinux: drop DISABLE_AVC=y

From: William Roberts <[email protected]>

Remove build config DISABLE_AVC, it is unused and broken.

---
 libselinux/Makefile       | 6 +-----
 libselinux/src/Makefile   | 3 ---
 libselinux/src/mapping.h  | 7 -------
 libselinux/utils/Makefile | 3 ---
 4 files changed, 1 insertion(+), 18 deletions(-)
libselinux/Makefile +1 -5
index d1532e8..c96695d 100644
@@ -1,12 +1,8 @@
 SUBDIRS = src include utils man
 
-DISABLE_AVC ?= n
 DISABLE_SETRANS ?= n
 DISABLE_RPM ?= n
 DISABLE_BOOL ?= n
-ifeq ($(DISABLE_AVC),y)
-	EMFLAGS+= -DDISABLE_AVC
-endif
 ifeq ($(DISABLE_BOOL),y)
 	EMFLAGS+= -DDISABLE_BOOL
 endif
@@ -16,7 +12,7 @@ endif
 ifeq ($(DISABLE_SETRANS),y)
 	EMFLAGS+= -DDISABLE_SETRANS
 endif
-export DISABLE_AVC DISABLE_SETRANS DISABLE_RPM DISABLE_BOOL EMFLAGS
+export DISABLE_SETRANS DISABLE_RPM DISABLE_BOOL EMFLAGS
 
 USE_PCRE2 ?= n
 ifeq ($(USE_PCRE2),y)
libselinux/src/Makefile +0 -3
index 36e42b8..8cfdf34 100644
@@ -41,9 +41,6 @@ LIBSO=$(TARGET).$(LIBVERSION)
 AUDIT2WHYLOBJ=$(PYPREFIX)audit2why.lo
 AUDIT2WHYSO=$(PYPREFIX)audit2why.so
 
-ifeq ($(DISABLE_AVC),y)
-	UNUSED_SRCS+=avc.c avc_internal.c avc_sidtab.c mapping.c stringrep.c checkAccess.c
-endif
 ifeq ($(DISABLE_BOOL),y)
 	UNUSED_SRCS+=booleans.c
 endif
libselinux/src/mapping.h +0 -7
index b96756b..22a4cca 100644
@@ -31,11 +31,4 @@ map_perm(security_class_t tclass, access_vector_t kperm);
 extern void
 map_decision(security_class_t tclass, struct av_decision *avd);
 
-/*mapping is not used for embedded build*/
-#ifdef DISABLE_AVC 
-#define unmap_perm(x,y) y
-#define unmap_class(x) x
-#define map_decision(x,y) 
-#endif
-
 #endif				/* _SELINUX_MAPPING_H_ */
libselinux/utils/Makefile +0 -3
index 1943bef..9ec928b 100644
@@ -36,9 +36,6 @@ sefcontext_compile: sefcontext_compile.o ../src/regex.o
 
 selinux_restorecon: LDLIBS += -lsepol
 
-ifeq ($(DISABLE_AVC),y)
-	UNUSED_TARGETS+=compute_av compute_create compute_member compute_relabel
-endif
 ifeq ($(DISABLE_BOOL),y)
 	UNUSED_TARGETS+=getsebool togglesebool
 endif
Signature · 1 line
1.9.1
#2 lore raw

PATCH 3/3 libselinux: drop DISABLE_BOOL=y option

In reply to [email protected]

From: William Roberts <[email protected]>

Build option DISABLE_BOOL=y is not being used, and is broken, drop it.

---
 libselinux/Makefile          | 6 +-----
 libselinux/src/Makefile      | 6 +-----
 libselinux/src/load_policy.c | 2 --
 libselinux/utils/Makefile    | 5 -----
 4 files changed, 2 insertions(+), 17 deletions(-)
libselinux/Makefile +1 -5
index c96695d..bfeb4b8 100644
@@ -2,17 +2,13 @@ SUBDIRS = src include utils man
 
 DISABLE_SETRANS ?= n
 DISABLE_RPM ?= n
-DISABLE_BOOL ?= n
-ifeq ($(DISABLE_BOOL),y)
-	EMFLAGS+= -DDISABLE_BOOL
-endif
 ifeq ($(DISABLE_RPM),y)
 	EMFLAGS+= -DDISABLE_RPM
 endif
 ifeq ($(DISABLE_SETRANS),y)
 	EMFLAGS+= -DDISABLE_SETRANS
 endif
-export DISABLE_SETRANS DISABLE_RPM DISABLE_BOOL EMFLAGS
+export DISABLE_SETRANS DISABLE_RPM EMFLAGS
 
 USE_PCRE2 ?= n
 ifeq ($(USE_PCRE2),y)
libselinux/src/Makefile +1 -5
index 8cfdf34..d8a79b4 100644
@@ -41,12 +41,8 @@ LIBSO=$(TARGET).$(LIBVERSION)
 AUDIT2WHYLOBJ=$(PYPREFIX)audit2why.lo
 AUDIT2WHYSO=$(PYPREFIX)audit2why.so
 
-ifeq ($(DISABLE_BOOL),y)
-	UNUSED_SRCS+=booleans.c
-endif
-
 GENERATED=$(SWIGCOUT) $(SWIGRUBYCOUT) selinuxswig_python_exception.i
-SRCS= $(filter-out $(UNUSED_SRCS) $(GENERATED) audit2why.c, $(sort $(wildcard *.c)))
+SRCS= $(filter-out $(GENERATED) audit2why.c, $(sort $(wildcard *.c)))
 
 MAX_STACK_SIZE=32768
 
libselinux/src/load_policy.c +0 -2
index 249f82f..b7e1a6f 100644
@@ -256,7 +256,6 @@ checkbool:
 			}
 		}
 		
-#ifndef DISABLE_BOOL
 		if (preservebools) {
 			int *values, len, i;
 			char **names;
@@ -279,7 +278,6 @@ checkbool:
 			(void)genbools(data, size,
 				       (char *)selinux_booleans_path());
 		}
-#endif
 	}
 
 
libselinux/utils/Makefile +0 -5
index 9ec928b..0708d6d 100644
@@ -36,11 +36,6 @@ sefcontext_compile: sefcontext_compile.o ../src/regex.o
 
 selinux_restorecon: LDLIBS += -lsepol
 
-ifeq ($(DISABLE_BOOL),y)
-	UNUSED_TARGETS+=getsebool togglesebool
-endif
-TARGETS:= $(filter-out $(UNUSED_TARGETS), $(TARGETS))
-
 all: $(TARGETS)
 
 install: all
Signature · 1 line
1.9.1
#3 lore raw

Re: [PATCH 3/3] libselinux: drop DISABLE_BOOL=y option

Quoted 5 lines · On 09/28/2016 11:26 AM, [email protected] wrote:

From: William Roberts <[email protected]>

Build option DISABLE_BOOL=y is not being used, and is broken, drop it.

Thanks, applied all three. At some point we might want to rename EMFLAGS (presumably short for embedded flags) to DISABLE_FLAGS or similar.

Quoted 85 lines
---
 libselinux/Makefile          | 6 +-----
 libselinux/src/Makefile      | 6 +-----
 libselinux/src/load_policy.c | 2 --
 libselinux/utils/Makefile    | 5 -----
 4 files changed, 2 insertions(+), 17 deletions(-)
libselinux/Makefile +1 -5
index c96695d..bfeb4b8 100644
@@ -2,17 +2,13 @@ SUBDIRS = src include utils man
 
 DISABLE_SETRANS ?= n
 DISABLE_RPM ?= n
-DISABLE_BOOL ?= n
-ifeq ($(DISABLE_BOOL),y)
-	EMFLAGS+= -DDISABLE_BOOL
-endif
 ifeq ($(DISABLE_RPM),y)
 	EMFLAGS+= -DDISABLE_RPM
 endif
 ifeq ($(DISABLE_SETRANS),y)
 	EMFLAGS+= -DDISABLE_SETRANS
 endif
-export DISABLE_SETRANS DISABLE_RPM DISABLE_BOOL EMFLAGS
+export DISABLE_SETRANS DISABLE_RPM EMFLAGS
 
 USE_PCRE2 ?= n
 ifeq ($(USE_PCRE2),y)
libselinux/src/Makefile +1 -5
index 8cfdf34..d8a79b4 100644
@@ -41,12 +41,8 @@ LIBSO=$(TARGET).$(LIBVERSION)
 AUDIT2WHYLOBJ=$(PYPREFIX)audit2why.lo
 AUDIT2WHYSO=$(PYPREFIX)audit2why.so
 
-ifeq ($(DISABLE_BOOL),y)
-	UNUSED_SRCS+=booleans.c
-endif
-
 GENERATED=$(SWIGCOUT) $(SWIGRUBYCOUT) selinuxswig_python_exception.i
-SRCS= $(filter-out $(UNUSED_SRCS) $(GENERATED) audit2why.c, $(sort $(wildcard *.c)))
+SRCS= $(filter-out $(GENERATED) audit2why.c, $(sort $(wildcard *.c)))
 
 MAX_STACK_SIZE=32768
 
libselinux/src/load_policy.c +0 -2
index 249f82f..b7e1a6f 100644
@@ -256,7 +256,6 @@ checkbool:
 			}
 		}
 
-#ifndef DISABLE_BOOL
 		if (preservebools) {
 			int *values, len, i;
 			char **names;
@@ -279,7 +278,6 @@ checkbool:
 			(void)genbools(data, size,
 				       (char *)selinux_booleans_path());
 		}
-#endif
 	}
 
 
libselinux/utils/Makefile +0 -5
index 9ec928b..0708d6d 100644
@@ -36,11 +36,6 @@ sefcontext_compile: sefcontext_compile.o ../src/regex.o
 
 selinux_restorecon: LDLIBS += -lsepol
 
-ifeq ($(DISABLE_BOOL),y)
-	UNUSED_TARGETS+=getsebool togglesebool
-endif
-TARGETS:= $(filter-out $(UNUSED_TARGETS), $(TARGETS))
-
 all: $(TARGETS)
 
 install: all
#4 lore raw

Re: [PATCH 3/3] libselinux: drop DISABLE_BOOL=y option

Quoted 9 lines · Stephen Smalley
Quoted 5 lines · On 09/28/2016 11:26 AM, [email protected] wrote:

From: William Roberts <[email protected]>

Build option DISABLE_BOOL=y is not being used, and is broken, drop it.

Thanks, applied all three. At some point we might want to rename EMFLAGS (presumably short for embedded flags) to DISABLE_FLAGS or similar.

Sure, I can do that, and set the RPM to true.

Quoted 92 lines
Quoted 76 lines
---
 libselinux/Makefile          | 6 +-----
 libselinux/src/Makefile      | 6 +-----
 libselinux/src/load_policy.c | 2 --
 libselinux/utils/Makefile    | 5 -----
 4 files changed, 2 insertions(+), 17 deletions(-)
libselinux/Makefile +1 -5
index c96695d..bfeb4b8 100644
@@ -2,17 +2,13 @@ SUBDIRS = src include utils man
 
 DISABLE_SETRANS ?= n
 DISABLE_RPM ?= n
-DISABLE_BOOL ?= n
-ifeq ($(DISABLE_BOOL),y)
-     EMFLAGS+= -DDISABLE_BOOL
-endif
 ifeq ($(DISABLE_RPM),y)
      EMFLAGS+= -DDISABLE_RPM
 endif
 ifeq ($(DISABLE_SETRANS),y)
      EMFLAGS+= -DDISABLE_SETRANS
 endif
-export DISABLE_SETRANS DISABLE_RPM DISABLE_BOOL EMFLAGS
+export DISABLE_SETRANS DISABLE_RPM EMFLAGS
 
 USE_PCRE2 ?= n
 ifeq ($(USE_PCRE2),y)
libselinux/src/Makefile +1 -5
index 8cfdf34..d8a79b4 100644
@@ -41,12 +41,8 @@ LIBSO=$(TARGET).$(LIBVERSION)
 AUDIT2WHYLOBJ=$(PYPREFIX)audit2why.lo
 AUDIT2WHYSO=$(PYPREFIX)audit2why.so
 
-ifeq ($(DISABLE_BOOL),y)
-     UNUSED_SRCS+=booleans.c
-endif
-
 GENERATED=$(SWIGCOUT) $(SWIGRUBYCOUT) selinuxswig_python_exception.i
-SRCS= $(filter-out $(UNUSED_SRCS) $(GENERATED) audit2why.c, $(sort $(wildcard *.c)))
+SRCS= $(filter-out $(GENERATED) audit2why.c, $(sort $(wildcard *.c)))
 
 MAX_STACK_SIZE=32768
 
libselinux/src/load_policy.c +0 -2
index 249f82f..b7e1a6f 100644
@@ -256,7 +256,6 @@ checkbool:
                      }
              }
 
-#ifndef DISABLE_BOOL
              if (preservebools) {
                      int *values, len, i;
                      char **names;
@@ -279,7 +278,6 @@ checkbool:
                      (void)genbools(data, size,
                                     (char *)selinux_booleans_path());
              }
-#endif
      }
 
 
libselinux/utils/Makefile +0 -0
index 9ec928b..0708d6d 100644
@@ -36,11 +36,6 @@ sefcontext_compile: sefcontext_compile.o ../src/regex.o
 

libselinux/utils/Makefile sefcontext_compile: sefcontext_compile.o ../src/regex.o · line 41

Quoted 10 lines
libselinux/utils/Makefile +0 -5
 selinux_restorecon: LDLIBS += -lsepol
 
-ifeq ($(DISABLE_BOOL),y)
-     UNUSED_TARGETS+=getsebool togglesebool
-endif
-TARGETS:= $(filter-out $(UNUSED_TARGETS), $(TARGETS))
-
 all: $(TARGETS)
 
 install: all

_______________________________________________
Selinux mailing list
[email protected]
To unsubscribe, send email to [email protected].
To get help, send an email containing "help" to [email protected].

Signature · 3 lines
Respectfully,

William C Roberts