Skip to contentSkip to conversation

We have moved matchpathcon to /sbin from /usr/sbin

PATCH Daniel J Walsh 3 participants 3 messages Apr 1, 2009 – May 18, 2009 SELinux security module

lore
Share & tools
lore
#0 lore raw

Some init scripts wanted to use matchpathcon before /usr is mounted.

utils/Makefile +9 -4
@@ -2,28 +2,33 @@
 PREFIX ?= $(DESTDIR)/usr
 LIBDIR ?= $(PREFIX)/lib
 BINDIR ?= $(PREFIX)/sbin
+_BINDIR ?= $(DESTDIR)/sbin
 
 CFLAGS ?= -Wall
 override CFLAGS += -I../include -D_GNU_SOURCE $(EMFLAGS)
 LDLIBS += -L../src -lselinux -L$(LIBDIR)
 
 TARGETS=$(patsubst %.c,%,$(wildcard *.c))
+
+
 ifeq ($(DISABLE_AVC),y)
 	UNUSED_TARGETS+=compute_av compute_create compute_member compute_relabel
 endif
 ifeq ($(DISABLE_BOOL),y)
 	UNUSED_TARGETS+=getsebool togglesebool
 endif
-TARGETS:= $(filter-out $(UNUSED_TARGETS), $(TARGETS))
+TARGETS:= $(filter-out $(UNUSED_TARGETS) matchpathcon, $(TARGETS))
 
-all: $(TARGETS)
+all: $(TARGETS) matchpathcon
 
 install: all
 	-mkdir -p $(BINDIR)
 	install -m 755 $(TARGETS) $(BINDIR)
-
+	-mkdir -p $(_BINDIR)
+	install -m 755 matchpathcon $(_BINDIR)
+	(cd $(BINDIR); 	ln -fs ../../sbin/matchpathcon)
 clean:
-	rm -f $(TARGETS) *.o 
+	rm -f $(TARGETS) *.o *~
 
 indent:
 	../../scripts/Lindent $(wildcard *.[ch])
Acked-by
#1 lore raw
Quoted 1 line · Daniel J Walsh

Some init scripts wanted to use matchpathcon before /usr is mounted.

Looks fine except for adding the now split out matchpathcon to the clean target. I'll fix that in the merge.

--
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 9 lines · Chad Sellers
Quoted 1 line · Daniel J Walsh

Some init scripts wanted to use matchpathcon before /usr is mounted.

Looks fine except for adding the now split out matchpathcon to the clean target. I'll fix that in the merge.

Merged in libselinux-2.0.81

--
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.