summaryrefslogtreecommitdiff
blob: a3eeaed901d5326e333189ff82112822ad11c24d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
diff -uNr policycoreutils-2.2.1.orig/newrole/Makefile policycoreutils-2.2.1/newrole/Makefile
--- policycoreutils-2.2.1.orig/newrole/Makefile	2013-11-04 21:37:27.197018032 +0100
+++ policycoreutils-2.2.1/newrole/Makefile	2013-11-04 21:37:47.602018075 +0100
@@ -4,8 +4,8 @@
 MANDIR ?= $(PREFIX)/share/man
 ETCDIR ?= $(DESTDIR)/etc
 LOCALEDIR = /usr/share/locale
-PAMH = $(shell ls /usr/include/security/pam_appl.h 2>/dev/null)
-AUDITH = $(shell ls /usr/include/libaudit.h 2>/dev/null)
+PAMH ?= no
+AUDITH ?= no
 # Enable capabilities to permit newrole to generate audit records.
 # This will make newrole a setuid root program.
 # The capabilities used are: CAP_AUDIT_WRITE.
@@ -24,7 +24,7 @@
 EXTRA_OBJS =
 override CFLAGS += -DVERSION=\"$(VERSION)\" $(LDFLAGS) -I$(PREFIX)/include -DUSE_NLS -DLOCALEDIR="\"$(LOCALEDIR)\"" -DPACKAGE="\"policycoreutils\""
 LDLIBS += -lselinux -L$(PREFIX)/lib
-ifeq ($(PAMH), /usr/include/security/pam_appl.h)
+ifeq ($(PAMH), yes)
 	override CFLAGS += -DUSE_PAM
 	EXTRA_OBJS += hashtab.o
 	LDLIBS += -lpam -lpam_misc
@@ -32,7 +32,7 @@
 	override CFLAGS += -D_XOPEN_SOURCE=500
 	LDLIBS += -lcrypt
 endif
-ifeq ($(AUDITH), /usr/include/libaudit.h)
+ifeq ($(AUDITH), yes)
 	override CFLAGS += -DUSE_AUDIT
 	LDLIBS += -laudit
 endif
@@ -49,7 +49,7 @@
 	IS_SUID=y
 endif
 ifeq ($(IS_SUID),y)
-	MODE := 4555
+	MODE := 0555
 	LDLIBS += -lcap-ng
 else
 	MODE := 0555
@@ -66,7 +66,7 @@
 	test -d $(MANDIR)/man1 || install -m 755 -d $(MANDIR)/man1
 	install -m $(MODE) newrole $(BINDIR)
 	install -m 644 newrole.1 $(MANDIR)/man1/
-ifeq ($(PAMH), /usr/include/security/pam_appl.h)
+ifeq ($(PAMH), yes)
 	test -d $(ETCDIR)/pam.d || install -m 755 -d $(ETCDIR)/pam.d
 ifeq ($(LSPP_PRIV),y)
 	install -m 644 newrole-lspp.pamd $(ETCDIR)/pam.d/newrole
diff -uNr policycoreutils-2.2.1.orig/run_init/Makefile policycoreutils-2.2.1/run_init/Makefile
--- policycoreutils-2.2.1.orig/run_init/Makefile	2013-11-04 21:37:27.115018032 +0100
+++ policycoreutils-2.2.1/run_init/Makefile	2013-11-04 21:37:47.603018075 +0100
@@ -5,20 +5,20 @@
 MANDIR ?= $(PREFIX)/share/man
 ETCDIR ?= $(DESTDIR)/etc
 LOCALEDIR ?= /usr/share/locale
-PAMH = $(shell ls /usr/include/security/pam_appl.h 2>/dev/null)
-AUDITH = $(shell ls /usr/include/libaudit.h 2>/dev/null)
+PAMH ?= no
+AUDITH ?= no
 
 CFLAGS ?= -Werror -Wall -W
 override CFLAGS += -I$(PREFIX)/include -DUSE_NLS -DLOCALEDIR="\"$(LOCALEDIR)\"" -DPACKAGE="\"policycoreutils\""
 LDLIBS += -lselinux -L$(PREFIX)/lib
-ifeq ($(PAMH), /usr/include/security/pam_appl.h)
+ifeq ($(PAMH), yes)
 	override CFLAGS += -DUSE_PAM
 	LDLIBS += -lpam -lpam_misc
 else
 	override CFLAGS += -D_XOPEN_SOURCE=500
 	LDLIBS += -lcrypt
 endif
-ifeq ($(AUDITH), /usr/include/libaudit.h)
+ifeq ($(AUDITH), yes)
 	override CFLAGS += -DUSE_AUDIT
 	LDLIBS += -laudit
 endif
@@ -38,7 +38,7 @@
 	install -m 755 open_init_pty $(SBINDIR)
 	install -m 644 run_init.8 $(MANDIR)/man8/
 	install -m 644 open_init_pty.8 $(MANDIR)/man8/
-ifeq ($(PAMH), /usr/include/security/pam_appl.h)
+ifeq ($(PAMH), yes)
 	install -m 644 run_init.pamd $(ETCDIR)/pam.d/run_init
 endif
 
diff -uNr policycoreutils-2.2.1.orig/setfiles/Makefile policycoreutils-2.2.1/setfiles/Makefile
--- policycoreutils-2.2.1.orig/setfiles/Makefile	2013-11-04 21:37:27.198018032 +0100
+++ policycoreutils-2.2.1/setfiles/Makefile	2013-11-04 21:37:47.603018075 +0100
@@ -3,7 +3,7 @@
 SBINDIR ?= $(DESTDIR)/sbin
 MANDIR = $(PREFIX)/share/man
 LIBDIR ?= $(PREFIX)/lib
-AUDITH = $(shell ls /usr/include/libaudit.h 2>/dev/null)
+AUDITH ?= no
 
 PROGRESS_STEP=$(shell grep "^\#define STAR_COUNT" restore.h | awk -S '{ print $$3 }')
 ABORT_ON_ERRORS=$(shell grep "^\#define ABORT_ON_ERRORS" setfiles.c | awk -S '{ print $$3 }')
@@ -12,7 +12,7 @@
 override CFLAGS += -I$(PREFIX)/include
 LDLIBS = -lselinux -lsepol -L$(LIBDIR)
 
-ifeq ($(AUDITH), /usr/include/libaudit.h)
+ifeq ($(AUDITH), yes)
 	override CFLAGS += -DUSE_AUDIT
 	LDLIBS += -laudit
 endif