Blame SOURCES/at-3.1.13-makefile.patch

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