bind/bind-9.3.2b1-PIE.patch

314 lines
9.2 KiB
Diff
Raw Normal View History

2005-12-03 00:10:48 +00:00
--- bind-9.3.2b1/make/rules.in.PIE 2005-05-12 17:36:17.000000000 -0400
+++ bind-9.3.2b1/make/rules.in 2005-10-06 20:04:36.000000000 -0400
@@ -118,6 +118,9 @@
.c.@O@:
${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} -c $<
+.c.o:
+ ${CC} ${ALL_CFLAGS} -c $<
+
SHELL = @SHELL@
LIBTOOL = @LIBTOOL@
LIBTOOL_MODE_COMPILE = ${LIBTOOL} @LIBTOOL_MODE_COMPILE@
--- bind-9.3.2b1/bin/dnssec/Makefile.in.PIE 2005-05-01 20:25:54.000000000 -0400
+++ bind-9.3.2b1/bin/dnssec/Makefile.in 2005-10-06 20:04:36.000000000 -0400
@@ -41,7 +41,7 @@
# Alphabetically
TARGETS = dnssec-keygen@EXEEXT@ dnssec-signzone@EXEEXT@
-OBJS = dnssectool.@O@
+OBJS = dnssectool.o
SRCS = dnssec-keygen.c dnssec-signzone.c dnssectool.c
@@ -51,19 +51,25 @@
MANOBJS = ${MANPAGES} ${HTMLPAGES}
+EXT_CFLAGS = -fPIE
+
@BIND9_MAKE_RULES@
-dnssec-keygen@EXEEXT@: dnssec-keygen.@O@ ${OBJS} ${DEPLIBS}
+LDFLAGS += -pie -Wl,-z,relro,-z,now,-z,nodlopen,-z,noexecstack
+
+.SUFFIXES: .c .o
+
+dnssec-keygen@EXEEXT@: dnssec-keygen.o ${OBJS} ${DEPLIBS}
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \
- dnssec-keygen.@O@ ${OBJS} ${LIBS}
+ dnssec-keygen.o ${OBJS} ${LIBS}
-dnssec-signzone.@O@: dnssec-signzone.c
- ${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} -DVERSION=\"${VERSION}\" \
+dnssec-signzone.o: dnssec-signzone.c
+ ${CC} ${ALL_CFLAGS} -DVERSION=\"${VERSION}\" \
-c ${srcdir}/dnssec-signzone.c
-dnssec-signzone@EXEEXT@: dnssec-signzone.@O@ ${OBJS} ${DEPLIBS}
+dnssec-signzone@EXEEXT@: dnssec-signzone.o ${OBJS} ${DEPLIBS}
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \
- dnssec-signzone.@O@ ${OBJS} ${LIBS}
+ dnssec-signzone.o ${OBJS} ${LIBS}
doc man:: ${MANOBJS}
--- bind-9.3.2b1/bin/named/Makefile.in.PIE 2004-09-06 17:47:25.000000000 -0400
+++ bind-9.3.2b1/bin/named/Makefile.in 2005-10-06 20:04:36.000000000 -0400
@@ -63,17 +63,17 @@
TARGETS = named@EXEEXT@ lwresd@EXEEXT@
-OBJS = aclconf.@O@ builtin.@O@ client.@O@ config.@O@ control.@O@ \
- controlconf.@O@ interfacemgr.@O@ \
- listenlist.@O@ log.@O@ logconf.@O@ main.@O@ notify.@O@ \
- query.@O@ server.@O@ sortlist.@O@ \
- tkeyconf.@O@ tsigconf.@O@ update.@O@ xfrout.@O@ \
- zoneconf.@O@ \
- lwaddr.@O@ lwresd.@O@ lwdclient.@O@ lwderror.@O@ lwdgabn.@O@ \
- lwdgnba.@O@ lwdgrbn.@O@ lwdnoop.@O@ lwsearch.@O@ \
+OBJS = aclconf.o builtin.o client.o config.o control.o \
+ controlconf.o interfacemgr.o \
+ listenlist.o log.o logconf.o main.o notify.o \
+ query.o server.o sortlist.o \
+ tkeyconf.o tsigconf.o update.o xfrout.o \
+ zoneconf.o \
+ lwaddr.o lwresd.o lwdclient.o lwderror.o lwdgabn.o \
+ lwdgnba.o lwdgrbn.o lwdnoop.o lwsearch.o \
$(DBDRIVER_OBJS)
-UOBJS = unix/os.@O@
+UOBJS = unix/os.o
SRCS = aclconf.c builtin.c client.c config.c control.c \
controlconf.c interfacemgr.c \
@@ -91,16 +91,22 @@
MANOBJS = ${MANPAGES} ${HTMLPAGES}
+EXT_CFLAGS = -fPIE
+
@BIND9_MAKE_RULES@
-main.@O@: main.c
- ${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} \
+LDFLAGS += -pie -Wl,-z,relro,-z,now,-z,nodlopen,-z,noexecstack
+
+.SUFFIXES: .c .o
+
+main.o: main.c
+ ${CC} ${ALL_CFLAGS} \
-DVERSION=\"${VERSION}\" \
-DNS_LOCALSTATEDIR=\"${localstatedir}\" \
-DNS_SYSCONFDIR=\"${sysconfdir}\" -c ${srcdir}/main.c
-config.@O@: config.c
- ${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} \
+config.o: config.c
+ ${CC} ${ALL_CFLAGS} \
-DVERSION=\"${VERSION}\" \
-DNS_LOCALSTATEDIR=\"${localstatedir}\" \
-c ${srcdir}/config.c
--- bind-9.3.2b1/bin/named/unix/Makefile.in.PIE 2004-03-08 04:04:15.000000000 -0500
+++ bind-9.3.2b1/bin/named/unix/Makefile.in 2005-10-06 20:04:36.000000000 -0400
@@ -27,10 +27,14 @@
CDEFINES =
CWARNINGS =
-OBJS = os.@O@
+OBJS = os.o
SRCS = os.c
TARGETS = ${OBJS}
+EXT_CFLAGS = -fPIE
+
@BIND9_MAKE_RULES@
+
+.SUFFIXES: .c .o
\ No newline at end of file
--- bind-9.3.2b1/bin/check/Makefile.in.PIE 2004-07-20 03:01:48.000000000 -0400
+++ bind-9.3.2b1/bin/check/Makefile.in 2005-10-06 20:04:36.000000000 -0400
@@ -55,27 +55,33 @@
MANOBJS = ${MANPAGES} ${HTMLPAGES}
+EXT_CFLAGS = -fPIE
+
@BIND9_MAKE_RULES@
-named-checkconf.@O@: named-checkconf.c
- ${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} \
+LDFLAGS += -pie -Wl,-z,relro,-z,now,-z,nodlopen,-z,noexecstack
+
+.SUFFIXES: .c .o
+
+named-checkconf.o: named-checkconf.c
+ ${CC} ${ALL_CFLAGS} \
-DVERSION=\"${VERSION}\" \
-c ${srcdir}/named-checkconf.c
-named-checkzone.@O@: named-checkzone.c
- ${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} \
+named-checkzone.o: named-checkzone.c
+ ${CC} ${ALL_CFLAGS} \
-DVERSION=\"${VERSION}\" \
-c ${srcdir}/named-checkzone.c
-named-checkconf@EXEEXT@: named-checkconf.@O@ check-tool.@O@ ${ISCDEPLIBS} \
+named-checkconf@EXEEXT@: named-checkconf.o check-tool.o ${ISCDEPLIBS} \
${ISCCFGDEPLIBS} ${BIND9DEPLIBS}
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \
- named-checkconf.@O@ check-tool.@O@ ${BIND9LIBS} ${ISCCFGLIBS} \
+ named-checkconf.o check-tool.o ${BIND9LIBS} ${ISCCFGLIBS} \
${DNSLIBS} ${ISCLIBS} ${LIBS}
-named-checkzone@EXEEXT@: named-checkzone.@O@ check-tool.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
+named-checkzone@EXEEXT@: named-checkzone.o check-tool.o ${ISCDEPLIBS} ${DNSDEPLIBS}
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \
- named-checkzone.@O@ check-tool.@O@ ${DNSLIBS} ${ISCLIBS} ${LIBS}
+ named-checkzone.o check-tool.o ${DNSLIBS} ${ISCLIBS} ${LIBS}
doc man:: ${MANOBJS}
--- bind-9.3.2b1/bin/nsupdate/Makefile.in.PIE 2004-07-20 03:01:49.000000000 -0400
+++ bind-9.3.2b1/bin/nsupdate/Makefile.in 2005-10-06 20:04:36.000000000 -0400
@@ -49,7 +49,7 @@
TARGETS = nsupdate@EXEEXT@
-OBJS = nsupdate.@O@
+OBJS = nsupdate.o
UOBJS =
@@ -61,10 +61,16 @@
MANOBJS = ${MANPAGES} ${HTMLPAGES}
+EXT_CFLAGS = -fPIE
+
@BIND9_MAKE_RULES@
-nsupdate@EXEEXT@: nsupdate.@O@ ${UOBJS} ${DEPLIBS}
- ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ nsupdate.@O@ ${UOBJS} ${LIBS}
+LDFLAGS += -pie -Wl,-z,relro,-z,now,-z,nodlopen,-z,noexecstack
+
+.SUFFIXES: .c .o
+
+nsupdate@EXEEXT@: nsupdate.o ${UOBJS} ${DEPLIBS}
+ ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ nsupdate.o ${UOBJS} ${LIBS}
doc man:: ${MANOBJS}
--- bind-9.3.2b1/bin/rndc/Makefile.in.PIE 2004-07-20 03:01:50.000000000 -0400
+++ bind-9.3.2b1/bin/rndc/Makefile.in 2005-10-06 20:05:10.000000000 -0400
@@ -57,28 +57,34 @@
MANOBJS = ${MANPAGES} ${HTMLPAGES}
-UOBJS = unix/os.@O@
+UOBJS = unix/os.o
+
+EXT_CFLAGS = -fPIE
@BIND9_MAKE_RULES@
-rndc.@O@: rndc.c
- ${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} \
+LDFLAGS += -pie -Wl,-z,relro,-z,now,-z,nodlopen,-z,noexecstack
+
+.SUFFIXES: .c .o
+
+rndc.o: rndc.c
+ ${CC} ${ALL_CFLAGS} \
-DVERSION=\"${VERSION}\" \
-DRNDC_CONFFILE=\"${sysconfdir}/rndc.conf\" \
-DRNDC_KEYFILE=\"${sysconfdir}/rndc.key\" \
-c ${srcdir}/rndc.c
-rndc-confgen.@O@: rndc-confgen.c
- ${LIBTOOL_MODE_COMPILE} ${CC} ${ALL_CFLAGS} \
+rndc-confgen.o: rndc-confgen.c
+ ${CC} ${ALL_CFLAGS} \
-DRNDC_KEYFILE=\"${sysconfdir}/rndc.key\" \
-c ${srcdir}/rndc-confgen.c
-rndc@EXEEXT@: rndc.@O@ util.@O@ ${RNDCDEPLIBS}
- ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ rndc.@O@ util.@O@ \
+rndc@EXEEXT@: rndc.o util.o ${RNDCDEPLIBS}
+ ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ rndc.o util.o \
${RNDCLIBS}
-rndc-confgen@EXEEXT@: rndc-confgen.@O@ util.@O@ ${UOBJS} ${CONFDEPLIBS}
- ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ rndc-confgen.@O@ util.@O@ \
+rndc-confgen@EXEEXT@: rndc-confgen.o util.o ${UOBJS} ${CONFDEPLIBS}
+ ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ rndc-confgen.o util.o \
${UOBJS} ${CONFLIBS}
doc man:: ${MANOBJS}
--- bind-9.3.2b1/bin/rndc/unix/Makefile.in.PIE 2004-03-07 23:04:24.000000000 -0500
+++ bind-9.3.2b1/bin/rndc/unix/Makefile.in 2005-10-06 20:04:36.000000000 -0400
@@ -27,10 +27,16 @@
CDEFINES =
CWARNINGS =
-OBJS = os.@O@
+OBJS = os.o
SRCS = os.c
TARGETS = ${OBJS}
+EXT_CFLAGS = -fPIE
+
@BIND9_MAKE_RULES@
+
+LDFLAGS += -pie -Wl,-z,relro,-z,now,-z,nodlopen,-z,noexecstack
+
+.SUFFIXES: .c .o
--- bind-9.3.2b1/bin/dig/Makefile.in.PIE 2004-08-18 19:25:57.000000000 -0400
+++ bind-9.3.2b1/bin/dig/Makefile.in 2005-10-06 20:04:36.000000000 -0400
@@ -51,7 +51,7 @@
TARGETS = dig@EXEEXT@ host@EXEEXT@ nslookup@EXEEXT@
-OBJS = dig.@O@ dighost.@O@ host.@O@ nslookup.@O@
+OBJS = dig.o dighost.o host.o nslookup.o
UOBJS =
@@ -63,19 +63,25 @@
MANOBJS = ${MANPAGES} ${HTMLPAGES}
+EXT_CFLAGS = -fPIE
+
@BIND9_MAKE_RULES@
-dig@EXEEXT@: dig.@O@ dighost.@O@ ${UOBJS} ${DEPLIBS}
+LDFLAGS += -pie -Wl,-z,relro,-z,now,-z,nodlopen,-z,noexecstack
+
+.SUFFIXES: .c .o
+
+dig@EXEEXT@: dig.o dighost.o ${UOBJS} ${DEPLIBS}
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \
- dig.@O@ dighost.@O@ ${UOBJS} ${LIBS}
+ dig.o dighost.o ${UOBJS} ${LIBS}
-host@EXEEXT@: host.@O@ dighost.@O@ ${UOBJS} ${DEPLIBS}
+host@EXEEXT@: host.o dighost.o ${UOBJS} ${DEPLIBS}
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \
- host.@O@ dighost.@O@ ${UOBJS} ${LIBS}
+ host.o dighost.o ${UOBJS} ${LIBS}
-nslookup@EXEEXT@: nslookup.@O@ dighost.@O@ ${UOBJS} ${DEPLIBS}
+nslookup@EXEEXT@: nslookup.o dighost.o ${UOBJS} ${DEPLIBS}
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \
- nslookup.@O@ dighost.@O@ ${UOBJS} ${LIBS}
+ nslookup.o dighost.o ${UOBJS} ${LIBS}
doc man:: ${MANOBJS}