1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
|
diff --git a/usr.bin/at/Makefile b/usr.bin/at/Makefile
index d199a85..dc5cafd 100644
--- a/usr.bin/at/Makefile
+++ b/usr.bin/at/Makefile
@@ -17,6 +17,8 @@ BINOWN= root
BINMODE= 4555
CLEANFILES+= at.1
+LDFLAGS+=-Wl,-z,now
+
at.1: at.man
@${ECHO} Making ${.TARGET:T} from ${.ALLSRC:T}; \
sed -e \
diff --git a/usr.bin/chpass/Makefile b/usr.bin/chpass/Makefile
index 4427417..4f774a1 100644
--- a/usr.bin/chpass/Makefile
+++ b/usr.bin/chpass/Makefile
@@ -17,6 +17,8 @@ CFLAGS+= -DYP
#CFLAGS+=-DRESTRICT_FULLNAME_CHANGE
CFLAGS+=-I${.CURDIR}/../../usr.sbin/pwd_mkdb -I${.CURDIR}/../../lib/libc/gen -I.
+LDFLAGS+=-Wl,-z,now
+
LIBADD= crypt util
.if ${MK_NIS} != "no"
LIBADD+= ypclnt
diff --git a/usr.bin/fstat/Makefile b/usr.bin/fstat/Makefile
index cd03a51..9a0fe6e 100644
--- a/usr.bin/fstat/Makefile
+++ b/usr.bin/fstat/Makefile
@@ -9,3 +9,5 @@ LIBADD= procstat
MAN1= fuser.1 fstat.1
.include <bsd.prog.mk>
+LDFLAGS+=-Wl,-z,now
+
diff --git a/usr.bin/lock/Makefile b/usr.bin/lock/Makefile
index 07321f7..ed2c786 100644
--- a/usr.bin/lock/Makefile
+++ b/usr.bin/lock/Makefile
@@ -7,4 +7,6 @@ BINMODE=4555
LIBADD= crypt
+LDFLAGS+=-Wl,-z,now
+
.include <bsd.prog.mk>
diff --git a/usr.bin/login/Makefile b/usr.bin/login/Makefile
index 3499575..62a7356 100644
--- a/usr.bin/login/Makefile
+++ b/usr.bin/login/Makefile
@@ -16,6 +16,8 @@ CFLAGS+= -DUSE_BSM_AUDIT
LIBADD+= bsm
.endif
+LDFLAGS+=-Wl,-z,now
+
.if ${MK_SETUID_LOGIN} != "no"
BINOWN= root
BINMODE=4555
diff --git a/usr.bin/netstat/Makefile b/usr.bin/netstat/Makefile
index 52cc3c7..11ebb2f 100644
--- a/usr.bin/netstat/Makefile
+++ b/usr.bin/netstat/Makefile
@@ -57,6 +57,8 @@ BINGRP= kmem
BINMODE=2555
LIBADD= kvm memstat xo util
+LDFLAGS+=-Wl,-z,now
+
.if ${MK_NETGRAPH_SUPPORT} != "no"
SRCS+= netgraph.c
LIBADD+= netgraph
diff --git a/usr.bin/opieinfo/Makefile b/usr.bin/opieinfo/Makefile
index 3114a92..5c41213 100644
--- a/usr.bin/opieinfo/Makefile
+++ b/usr.bin/opieinfo/Makefile
@@ -12,6 +12,8 @@ WARNS?= 0
LIBADD= opie
+LDFLAGS+=-Wl,-z,now
+
BINOWN= root
BINMODE=4555
PRECIOUSPROG=
diff --git a/usr.bin/opiepasswd/Makefile b/usr.bin/opiepasswd/Makefile
index ae35b20..32ba59b 100644
--- a/usr.bin/opiepasswd/Makefile
+++ b/usr.bin/opiepasswd/Makefile
@@ -12,6 +12,8 @@ WARNS?= 0
LIBADD= opie
+LDFLAGS+=-Wl,-z,now
+
BINOWN= root
BINMODE=4555
PRECIOUSPROG=
diff --git a/usr.bin/passwd/Makefile b/usr.bin/passwd/Makefile
index 758be2d..ebde1a6 100644
--- a/usr.bin/passwd/Makefile
+++ b/usr.bin/passwd/Makefile
@@ -13,6 +13,8 @@ SYMLINKS = ${BINDIR}/passwd ${BINDIR}/yppasswd
MLINKS = passwd.1 yppasswd.1
.endif
+LDFLAGS+=-Wl,-z,now
+
beforeinstall:
.for i in passwd yppasswd
[ ! -e ${DESTDIR}${BINDIR}/$i ] || \
diff --git a/usr.bin/su/Makefile b/usr.bin/su/Makefile
index b3dd829..26eaa63 100644
--- a/usr.bin/su/Makefile
+++ b/usr.bin/su/Makefile
@@ -10,6 +10,8 @@ WARNS?= 5
LIBADD= util pam
.if ${MK_AUDIT} != "no"
+LDFLAGS+=-Wl,-z,now
+
CFLAGS+= -DUSE_BSM_AUDIT
LIBADD+= bsm
.endif
diff --git a/usr.bin/wall/Makefile b/usr.bin/wall/Makefile
index 0579add..571be8d 100644
--- a/usr.bin/wall/Makefile
+++ b/usr.bin/wall/Makefile
@@ -6,4 +6,6 @@ SRCS= ttymsg.c wall.c
BINGRP= tty
BINMODE=2555
+LDFLAGS+=-Wl,-z,now
+
.include <bsd.prog.mk>
diff --git a/usr.bin/write/Makefile b/usr.bin/write/Makefile
index ba06110..ba6ce04 100644
--- a/usr.bin/write/Makefile
+++ b/usr.bin/write/Makefile
@@ -5,4 +5,6 @@ PROG= write
BINMODE=2555
BINGRP= tty
+LDFLAGS+=-Wl,-z,now
+
.include <bsd.prog.mk>
|