ppp/ppp-pie.patch

37 lines
1.3 KiB
Diff

diff -Nur ppp-2.4.9/chat/Makefile.linux new/chat/Makefile.linux
--- ppp-2.4.9/chat/Makefile.linux 2021-01-05 00:06:37.000000000 +0100
+++ new/chat/Makefile.linux 2022-05-23 17:29:53.108022140 +0200
@@ -19,7 +19,7 @@
all: chat
chat: chat.o
- $(CC) $(LDFLAGS) -o chat chat.o
+ $(CC) -pie $(LDFLAGS) -o chat chat.o
chat.o: chat.c
$(CC) -c $(CFLAGS) -o chat.o chat.c
diff -Nur ppp-2.4.9/pppd/Makefile.linux new/pppd/Makefile.linux
--- ppp-2.4.9/pppd/Makefile.linux 2021-01-05 00:06:37.000000000 +0100
+++ new/pppd/Makefile.linux 2022-05-23 17:29:53.108022140 +0200
@@ -245,7 +245,7 @@
$(INSTALL) -c -m 444 pppd.8 $(MANDIR)
pppd: $(PPPDOBJS)
- $(CC) $(CFLAGS) $(LDFLAGS) $(LDFLAGS_PLUGIN) -o pppd $(PPPDOBJS) $(LIBS)
+ $(CC) $(CFLAGS) -pie -fPIC $(LDFLAGS) $(LDFLAGS_PLUGIN) -o pppd $(PPPDOBJS) $(LIBS)
srp-entry: srp-entry.c
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ srp-entry.c $(LIBS)
diff -Nur ppp-2.4.9/pppstats/Makefile.linux new/pppstats/Makefile.linux
--- ppp-2.4.9/pppstats/Makefile.linux 2021-01-05 00:06:37.000000000 +0100
+++ new/pppstats/Makefile.linux 2022-05-23 17:29:53.108022140 +0200
@@ -27,7 +27,7 @@
$(INSTALL) -c -m 444 pppstats.8 $(MANDIR)
pppstats: $(PPPSTATSRCS)
- $(CC) $(CFLAGS) $(LDFLAGS) -o pppstats pppstats.c $(LIBS)
+ $(CC) $(CFLAGS) -pie -fPIE $(LDFLAGS) -o pppstats pppstats.c $(LIBS)
clean:
rm -f pppstats *~ #* core