Skip to contentSkip to conversation

Adding audit messge to newrole

PATCH Steve G 1 participant 1 message Jan 25, 2006 SELinux security module

lore
Share & tools
lore

Steve G

author
#0 lore raw

Hi,

I am attaching a patch that lets newrole send messages to the audit system. This patch needs review as it changes newrole to be setuid root. The patch drops capabilities immediately after startup. This patch depends on USE_AUDIT already being defined by the Makefile.

You will need recent audit package in order to compile newrole since it uses the USER_ROLE_CHANGE message type. It is available in version 1.1.2 and later.

Thanks,
-Steve

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

newrole/Makefile +2 -2
diff -ur policycoreutils-1.29.9.orig/newrole/Makefile policycoreutils-1.29.9/newrole/Makefile
@@ -8,7 +8,7 @@
 
 CFLAGS ?= -Werror -Wall -W
 override CFLAGS += $(LDFLAGS) -I$(PREFIX)/include -DUSE_NLS -DLOCALEDIR="\"$(LOCALEDIR)\"" -DPACKAGE="\"policycoreutils\""
-LDLIBS += -lselinux -lsepol -L$(PREFIX)/lib
+LDLIBS += -lselinux -lsepol -L$(PREFIX)/lib -lcap -laudit
 ifeq (${PAMH}, /usr/include/security/pam_appl.h)
 	override CFLAGS += -DUSE_PAM
 	LDLIBS += -lpam -lpam_misc
@@ -26,7 +26,7 @@
 	test -d $(BINDIR)      || install -m 755 -d $(BINDIR)
 	test -d $(ETCDIR)/pam.d || install -m 755 -d $(ETCDIR)/pam.d
 	test -d $(MANDIR)/man1 || install -m 755 -d $(MANDIR)/man1
-	install -m 555 newrole $(BINDIR)
+	install -m 4555 newrole $(BINDIR)
 	install -m 644 newrole.1 $(MANDIR)/man1/
 ifeq (${PAMH}, /usr/include/security/pam_appl.h)
 	test -d $(ETCDIR)/pam.d || install -m 755 -d $(ETCDIR)/pam.d
newrole/newrole.c +92 -1

123 lines not on this page · raw message