LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File ppp-2.4.2-pie.patch of Package ppp (Project network)

Index: ppp-2.4.7/pppd/Makefile.linux
===================================================================
--- ppp-2.4.7.orig/pppd/Makefile.linux
+++ ppp-2.4.7/pppd/Makefile.linux
@@ -213,10 +213,10 @@ install: pppd
 	$(INSTALL) -m 644 pppd.8 $(MANDIR)
 
 pppd: $(PPPDOBJS)
-	$(CC) $(CFLAGS) $(LDFLAGS) -o pppd $(PPPDOBJS) $(LIBS)
+	$(CC) $(CFLAGS) -pie $(LDFLAGS) -o pppd $(PPPDOBJS) $(LIBS)
 
 srp-entry:	srp-entry.c
-	$(CC) $(CFLAGS) $(LDFLAGS) -o $@ srp-entry.c $(LIBS)
+	$(CC) $(CFLAGS) -pie -fPIE $(LDFLAGS) -o $@ srp-entry.c $(LIBS)
 
 install-devel:
 	mkdir -p $(INCDIR)/pppd
Index: ppp-2.4.7/chat/Makefile.linux
===================================================================
--- ppp-2.4.7.orig/chat/Makefile.linux
+++ ppp-2.4.7/chat/Makefile.linux
@@ -18,7 +18,7 @@ INSTALL= install
 all:	chat
 
 chat:	chat.o
-	$(CC) -o chat chat.o
+	$(CC) -pie -o chat chat.o
 
 chat.o:	chat.c
 	$(CC) -c $(CFLAGS) -o chat.o chat.c
Index: ppp-2.4.7/pppstats/Makefile.linux
===================================================================
--- ppp-2.4.7.orig/pppstats/Makefile.linux
+++ ppp-2.4.7/pppstats/Makefile.linux
@@ -26,7 +26,7 @@ install: pppstats
 	$(INSTALL) -m 444 pppstats.8 $(MANDIR)
 
 pppstats: $(PPPSTATSRCS)
-	$(CC) $(CFLAGS) -o pppstats pppstats.c $(LIBS)
+	$(CC) $(CFLAGS) -pie -fPIE -o pppstats pppstats.c $(LIBS)
 
 clean:
 	rm -f pppstats *~ #* core