Blame SOURCES/at-3.1.13-makefile.patch

20eab7
diff -up at-3.1.13/Makefile.in.make at-3.1.13/Makefile.in
20eab7
--- at-3.1.13/Makefile.in.make	2011-06-25 14:43:14.000000000 +0200
20eab7
+++ at-3.1.13/Makefile.in	2011-07-29 08:06:28.317600053 +0200
20eab7
@@ -65,13 +65,13 @@ LIST = Filelist Filelist.asc
20eab7
 all: at atd atrun
20eab7
 
20eab7
 at: $(ATOBJECTS)
20eab7
-	$(CC) $(CFLAGS) -o at $(ATOBJECTS) $(LIBS) $(LEXLIB)
039958
+	$(CC) $(CFLAGS) $(LDFLAGS) -Wl,-z,now -o at -pie $(ATOBJECTS) $(LIBS) $(LEXLIB) $(SELINUXLIB) $(PAMLIB)
20eab7
 	rm -f $(CLONES)
20eab7
 	$(LN_S) -f at atq
20eab7
 	$(LN_S) -f at atrm
20eab7
 
20eab7
 atd: $(RUNOBJECTS)
20eab7
-	$(CC) $(CFLAGS) -o atd $(RUNOBJECTS) $(LIBS) $(PAMLIB)
039958
+	$(CC) $(CFLAGS) $(LDFLAGS) -Wl,-z,now -o atd -pie $(RUNOBJECTS) $(LIBS) $(SELINUXLIB) $(PAMLIB) 
20eab7
 
20eab7
 y.tab.c y.tab.h: parsetime.y
20eab7
 	$(YACC) -d parsetime.y
20eab7
@@ -83,38 +83,41 @@ atrun: atrun.in
20eab7
 	configure
20eab7
 
20eab7
 .c.o:
20eab7
-	$(CC) -c $(CFLAGS) $(DEFS) $*.c
20eab7
+	$(CC) -c $(CFLAGS) -fPIE $(DEFS) $*.c
20eab7
 
20eab7
 install: all
20eab7
-	$(INSTALL) -g root -o root -m 755 -d $(IROOT)$(etcdir)
20eab7
-	$(INSTALL) -g root -o root -m 755 -d $(IROOT)$(bindir)
20eab7
-	$(INSTALL) -g root -o root -m 755 -d $(IROOT)$(sbindir)
20eab7
-	$(INSTALL) -g root -o root -m 755 -d $(IROOT)$(docdir)
20eab7
-	$(INSTALL) -g root -o root -m 755 -d $(IROOT)$(atdocdir)
20eab7
-	$(INSTALL) -g $(DAEMON_GROUPNAME) -o $(DAEMON_USERNAME) -m 755 -d $(IROOT)$(ATSPOOL_DIR) $(IROOT)$(ATJOB_DIR)
20eab7
-	chmod 1770 $(IROOT)$(ATSPOOL_DIR) $(IROOT)$(ATJOB_DIR)
20eab7
+	$(INSTALL) -m 755 -d $(IROOT)$(etcdir)
20eab7
+	$(INSTALL) -m 755 -d $(IROOT)$(bindir)
20eab7
+	$(INSTALL) -m 755 -d $(IROOT)$(sbindir)
20eab7
+	$(INSTALL) -m 755 -d $(IROOT)$(docdir)
20eab7
+	$(INSTALL) -m 755 -d $(IROOT)$(atdocdir)
20eab7
+	$(INSTALL) -m 755 -d $(IROOT)$(etcdir)/pam.d/
20eab7
+	$(INSTALL) -g $(DAEMON_GROUPNAME) -o $(DAEMON_USERNAME) -m 755 -d $(IROOT)$(ATSPOOL_DIR)
20eab7
+	chmod 700 $(IROOT)$(ATJOB_DIR) $(IROOT)$(ATSPOOL_DIR)
20eab7
+	chown $(DAEMON_USERNAME):$(DAEMON_GROUPNAME) $(IROOT)$(ATJOB_DIR) $(IROOT)$(ATSPOOL_DIR)
20eab7
 	touch $(IROOT)$(LFILE)
20eab7
 	chmod 600 $(IROOT)$(LFILE)
20eab7
 	chown $(DAEMON_USERNAME):$(DAEMON_GROUPNAME) $(IROOT)$(LFILE)
20eab7
-	test -f $(IROOT)$(etcdir)/at.allow || test -f $(IROOT)$(etcdir)/at.deny || $(INSTALL) -o root -g $(DAEMON_GROUPNAME) -m 640 at.deny $(IROOT)$(etcdir)/
20eab7
-	$(INSTALL) -g $(DAEMON_GROUPNAME) -o $(DAEMON_USERNAME) -m 6755 at $(IROOT)$(bindir)
20eab7
+	test -f $(IROOT)$(etcdir)/at.allow || test -f $(IROOT)$(etcdir)/at.deny || $(INSTALL) -m 600 at.deny $(IROOT)$(etcdir)/
20eab7
+	$(INSTALL) -o $(INSTALL_ROOT_USER) -g $(DAEMON_GROUPNAME) pam_atd $(IROOT)$(etcdir)/pam.d/atd
20eab7
+	$(INSTALL) -m 4755 at $(IROOT)$(bindir)
20eab7
 	$(LN_S) -f at $(IROOT)$(bindir)/atq
20eab7
 	$(LN_S) -f at $(IROOT)$(bindir)/atrm
20eab7
-	$(INSTALL) -g root -o root -m 755 batch $(IROOT)$(bindir)
20eab7
-	$(INSTALL) -d -o root -g root -m 755 $(IROOT)$(man1dir)
20eab7
-	$(INSTALL) -d -o root -g root -m 755 $(IROOT)$(man5dir)
20eab7
-	$(INSTALL) -d -o root -g root -m 755 $(IROOT)$(man8dir)
20eab7
-	$(INSTALL) -g root -o root -m 755 atd $(IROOT)$(sbindir)
20eab7
-	$(INSTALL) -g root -o root -m 755 atrun $(IROOT)$(sbindir)
20eab7
-	$(INSTALL) -g root -o root -m 644 at.1 $(IROOT)$(man1dir)/
20eab7
+	$(INSTALL) -m 755 batch $(IROOT)$(bindir)
20eab7
+	$(INSTALL) -d -m 755 $(IROOT)$(man1dir)
20eab7
+	$(INSTALL) -d -m 755 $(IROOT)$(man5dir)
20eab7
+	$(INSTALL) -d -m 755 $(IROOT)$(man8dir)
20eab7
+	$(INSTALL) -m 755 atd $(IROOT)$(sbindir)
20eab7
+	$(INSTALL) -m 755 atrun $(IROOT)$(sbindir)
20eab7
+	$(INSTALL) -m 644 at.1 $(IROOT)$(man1dir)/
20eab7
 	cd $(IROOT)$(man1dir) && $(LN_S) -f at.1 atq.1 && $(LN_S) -f at.1 batch.1 && $(LN_S) -f at.1 atrm.1
20eab7
-	$(INSTALL) -g root -o root -m 644 atd.8 $(IROOT)$(man8dir)/
20eab7
+	$(INSTALL) -m 644 atd.8 $(IROOT)$(man8dir)/
20eab7
 	sed "s,\$${exec_prefix},$(exec_prefix),g" <atrun.8>tmpman
20eab7
-	$(INSTALL) -g root -o root -m 644 tmpman $(IROOT)$(man8dir)/atrun.8
20eab7
+	$(INSTALL) -m 644 tmpman $(IROOT)$(man8dir)/atrun.8
20eab7
 	rm -f tmpman
20eab7
-	$(INSTALL) -g root -o root -m 644 at.allow.5 $(IROOT)$(man5dir)/
20eab7
+	$(INSTALL) -m 644 at.allow.5 $(IROOT)$(man5dir)/
20eab7
 	cd $(IROOT)$(man5dir) && $(LN_S) -f at.allow.5 at.deny.5
20eab7
-	$(INSTALL) -g root -o root -m 644 $(DOCS) $(IROOT)$(atdocdir)
20eab7
+	$(INSTALL) -m 644 $(DOCS) $(IROOT)$(atdocdir)
20eab7
 	rm -f $(IROOT)$(mandir)/cat1/at.1* $(IROOT)$(mandir)/cat1/batch.1* \
20eab7
 		$(IROOT)$(mandir)/cat1/atq.1*
20eab7
 	rm -f $(IROOT)$(mandir)/cat1/atd.8*