source: clfs-sysroot/patches/shadow-4.1.2.2-sysroot_hacks-1.patch@ ab1184b

Last change on this file since ab1184b was cd4af16, checked in by Joe Ciccone <jciccone@…>, 16 years ago

New Shadow Patch.

  • Property mode set to 100644
File size: 25.2 KB
RevLine 
[cd4af16]1Submitted By: Joe Ciccone <jciccone@gmail.com>
2Date: 2006-11-24
3Initial Package Version: 4.0.18.1
4 Rediffed Against 4.1.2.2 by Joe Ciccone on 2009-01-03
5Origin: Joe Ciccone
6Upstream Status: None
7Description: Changes the hardcoded /etc to the value of the --sysconfdir
8 parameter passed to configure. Allows the utilities to be run
9 as a user other then root and properly modify the passwd and group
10 files for the target system.
11
12diff -Naur shadow-4.1.2.2.orig/contrib/Makefile.in shadow-4.1.2.2/contrib/Makefile.in
13--- shadow-4.1.2.2.orig/contrib/Makefile.in 2008-11-22 19:10:51.000000000 -0500
14+++ shadow-4.1.2.2/contrib/Makefile.in 2009-01-03 16:35:58.976432977 -0500
15@@ -184,6 +184,7 @@
16 srcdir = @srcdir@
17 sysconfdir = @sysconfdir@
18 target_alias = @target_alias@
19+top_build_prefix = @top_build_prefix@
20 top_builddir = @top_builddir@
21 top_srcdir = @top_srcdir@
22 EXTRA_DIST = README adduser.c adduser-old.c adduser.sh adduser2.sh \
23diff -Naur shadow-4.1.2.2.orig/doc/Makefile.in shadow-4.1.2.2/doc/Makefile.in
24--- shadow-4.1.2.2.orig/doc/Makefile.in 2008-11-22 19:10:51.000000000 -0500
25+++ shadow-4.1.2.2/doc/Makefile.in 2009-01-03 16:35:59.023099983 -0500
26@@ -184,6 +184,7 @@
27 srcdir = @srcdir@
28 sysconfdir = @sysconfdir@
29 target_alias = @target_alias@
30+top_build_prefix = @top_build_prefix@
31 top_builddir = @top_builddir@
32 top_srcdir = @top_srcdir@
33 EXTRA_DIST = HOWTO README.limits \
34diff -Naur shadow-4.1.2.2.orig/etc/Makefile.in shadow-4.1.2.2/etc/Makefile.in
35--- shadow-4.1.2.2.orig/etc/Makefile.in 2008-11-22 19:10:51.000000000 -0500
36+++ shadow-4.1.2.2/etc/Makefile.in 2009-01-03 16:35:59.069766134 -0500
37@@ -209,6 +209,7 @@
38 srcdir = @srcdir@
39 sysconfdir = @sysconfdir@
40 target_alias = @target_alias@
41+top_build_prefix = @top_build_prefix@
42 top_builddir = @top_builddir@
43 top_srcdir = @top_srcdir@
44 sysconf_DATA = login.defs
45diff -Naur shadow-4.1.2.2.orig/etc/pam.d/Makefile.in shadow-4.1.2.2/etc/pam.d/Makefile.in
46--- shadow-4.1.2.2.orig/etc/pam.d/Makefile.in 2008-11-22 19:10:51.000000000 -0500
47+++ shadow-4.1.2.2/etc/pam.d/Makefile.in 2009-01-03 16:35:59.109766243 -0500
48@@ -194,6 +194,7 @@
49 srcdir = @srcdir@
50 sysconfdir = @sysconfdir@
51 target_alias = @target_alias@
52+top_build_prefix = @top_build_prefix@
53 top_builddir = @top_builddir@
54 top_srcdir = @top_srcdir@
55 pamd_files = \
56diff -Naur shadow-4.1.2.2.orig/lib/commonio.c shadow-4.1.2.2/lib/commonio.c
57--- shadow-4.1.2.2.orig/lib/commonio.c 2008-11-22 18:11:15.000000000 -0500
58+++ shadow-4.1.2.2/lib/commonio.c 2009-01-03 16:24:11.160122816 -0500
59@@ -183,14 +183,6 @@
60 if (!fp)
61 return NULL;
62
63-#ifdef HAVE_FCHOWN
64- if (fchown (fileno (fp), sb->st_uid, sb->st_gid))
65- goto fail;
66-#else
67- if (chown (name, sb->st_mode))
68- goto fail;
69-#endif
70-
71 #ifdef HAVE_FCHMOD
72 if (fchmod (fileno (fp), sb->st_mode & 0664))
73 goto fail;
74@@ -749,7 +741,7 @@
75 * Default permissions for new [g]shadow files.
76 * (passwd and group always exist...)
77 */
78- sb.st_mode = 0400;
79+ sb.st_mode = 0600;
80 sb.st_uid = 0;
81 sb.st_gid = 0;
82 }
83diff -Naur shadow-4.1.2.2.orig/lib/defines.h shadow-4.1.2.2/lib/defines.h
84--- shadow-4.1.2.2.orig/lib/defines.h 2008-11-22 18:11:15.000000000 -0500
85+++ shadow-4.1.2.2/lib/defines.h 2009-01-03 16:24:48.968136556 -0500
86@@ -265,20 +265,20 @@
87 (strncpy((A), (B), sizeof(A) - 1), (A)[sizeof(A) - 1] = '\0')
88
89 #ifndef PASSWD_FILE
90-#define PASSWD_FILE "/etc/passwd"
91+#define PASSWD_FILE SYSCONFDIR"/passwd"
92 #endif
93
94 #ifndef GROUP_FILE
95-#define GROUP_FILE "/etc/group"
96+#define GROUP_FILE SYSCONFDIR"/group"
97 #endif
98
99 #ifndef SHADOW_FILE
100-#define SHADOW_FILE "/etc/shadow"
101+#define SHADOW_FILE SYSCONFDIR"/shadow"
102 #endif
103
104 #ifdef SHADOWGRP
105 #ifndef SGROUP_FILE
106-#define SGROUP_FILE "/etc/gshadow"
107+#define SGROUP_FILE SYSCONFDIR"/gshadow"
108 #endif
109 #endif
110
111diff -Naur shadow-4.1.2.2.orig/lib/getdef.c shadow-4.1.2.2/lib/getdef.c
112--- shadow-4.1.2.2.orig/lib/getdef.c 2008-11-22 18:11:15.000000000 -0500
113+++ shadow-4.1.2.2/lib/getdef.c 2009-01-03 16:25:10.736499890 -0500
114@@ -127,7 +127,7 @@
115 };
116
117 #ifndef LOGINDEFS
118-#define LOGINDEFS "/etc/login.defs"
119+#define LOGINDEFS SYSCONFDIR"/login.defs"
120 #endif
121
122 static char def_fname[] = LOGINDEFS; /* login config defs file */
123diff -Naur shadow-4.1.2.2.orig/lib/gshadow_.h shadow-4.1.2.2/lib/gshadow_.h
124--- shadow-4.1.2.2.orig/lib/gshadow_.h 2008-11-22 18:11:15.000000000 -0500
125+++ shadow-4.1.2.2/lib/gshadow_.h 2009-01-03 16:25:26.133167409 -0500
126@@ -71,5 +71,5 @@
127 int putsgent ();
128 #endif
129
130-#define GSHADOW "/etc/gshadow"
131+#define GSHADOW SYSCONFDIR"/gshadow"
132 #endif /* ifndef _H_GSHADOW */
133diff -Naur shadow-4.1.2.2.orig/lib/Makefile.am shadow-4.1.2.2/lib/Makefile.am
134--- shadow-4.1.2.2.orig/lib/Makefile.am 2008-11-22 18:11:15.000000000 -0500
135+++ shadow-4.1.2.2/lib/Makefile.am 2009-01-03 16:21:23.733191690 -0500
136@@ -2,6 +2,7 @@
137 AUTOMAKE_OPTIONS = 1.0 foreign
138
139 DEFS =
140+AM_CPPFLAGS = -DSYSCONFDIR=\"$(sysconfdir)\"
141
142 noinst_LTLIBRARIES = libshadow.la
143
144diff -Naur shadow-4.1.2.2.orig/lib/Makefile.in shadow-4.1.2.2/lib/Makefile.in
145--- shadow-4.1.2.2.orig/lib/Makefile.in 2008-11-22 19:10:52.000000000 -0500
146+++ shadow-4.1.2.2/lib/Makefile.in 2009-01-03 16:35:59.163099536 -0500
147@@ -206,9 +206,11 @@
148 srcdir = @srcdir@
149 sysconfdir = @sysconfdir@
150 target_alias = @target_alias@
151+top_build_prefix = @top_build_prefix@
152 top_builddir = @top_builddir@
153 top_srcdir = @top_srcdir@
154 AUTOMAKE_OPTIONS = 1.0 foreign
155+AM_CPPFLAGS = -DSYSCONFDIR=\"$(sysconfdir)\"
156 noinst_LTLIBRARIES = libshadow.la
157 libshadow_la_LDFLAGS = -version-info 0:0:0
158 libshadow_la_SOURCES = \
159diff -Naur shadow-4.1.2.2.orig/lib/port.h shadow-4.1.2.2/lib/port.h
160--- shadow-4.1.2.2.orig/lib/port.h 2008-11-22 18:11:15.000000000 -0500
161+++ shadow-4.1.2.2/lib/port.h 2009-01-03 16:25:44.029827945 -0500
162@@ -52,7 +52,7 @@
163 * PORT_DAY - Day of the week to a bit value (0 = Sunday).
164 */
165
166-#define PORTS "/etc/porttime"
167+#define PORTS SYSCONFDIR"/porttime"
168 #define PORT_IDS 64
169 #define PORT_TTY 64
170 #define PORT_TIMES 24
171diff -Naur shadow-4.1.2.2.orig/libmisc/limits.c shadow-4.1.2.2/libmisc/limits.c
172--- shadow-4.1.2.2.orig/libmisc/limits.c 2008-11-22 18:11:08.000000000 -0500
173+++ shadow-4.1.2.2/libmisc/limits.c 2009-01-03 16:26:45.504180328 -0500
174@@ -54,7 +54,7 @@
175 #endif
176 #ifdef LIMITS
177 #ifndef LIMITS_FILE
178-#define LIMITS_FILE "/etc/limits"
179+#define LIMITS_FILE SYSCONFDIR"/limits"
180 #endif
181 #define LOGIN_ERROR_RLIMIT 1
182 #define LOGIN_ERROR_LOGIN 2
183diff -Naur shadow-4.1.2.2.orig/libmisc/Makefile.am shadow-4.1.2.2/libmisc/Makefile.am
184--- shadow-4.1.2.2.orig/libmisc/Makefile.am 2008-11-22 18:11:08.000000000 -0500
185+++ shadow-4.1.2.2/libmisc/Makefile.am 2009-01-03 16:26:26.072172852 -0500
186@@ -1,6 +1,8 @@
187
188 EXTRA_DIST = .indent.pro xgetXXbyYY.c
189
190+AM_CPPFLAGS = -DSYSCONFDIR=\"$(sysconfdir)\"
191+
192 INCLUDES = -I$(top_srcdir)/lib
193
194 noinst_LIBRARIES = libmisc.a
195diff -Naur shadow-4.1.2.2.orig/libmisc/Makefile.in shadow-4.1.2.2/libmisc/Makefile.in
196--- shadow-4.1.2.2.orig/libmisc/Makefile.in 2008-11-22 19:10:52.000000000 -0500
197+++ shadow-4.1.2.2/libmisc/Makefile.in 2009-01-03 16:35:59.229766152 -0500
198@@ -223,9 +223,11 @@
199 srcdir = @srcdir@
200 sysconfdir = @sysconfdir@
201 target_alias = @target_alias@
202+top_build_prefix = @top_build_prefix@
203 top_builddir = @top_builddir@
204 top_srcdir = @top_srcdir@
205 EXTRA_DIST = .indent.pro xgetXXbyYY.c
206+AM_CPPFLAGS = -DSYSCONFDIR=\"$(sysconfdir)\"
207 INCLUDES = -I$(top_srcdir)/lib
208 noinst_LIBRARIES = libmisc.a
209 libmisc_a_SOURCES = \
210diff -Naur shadow-4.1.2.2.orig/Makefile.in shadow-4.1.2.2/Makefile.in
211--- shadow-4.1.2.2.orig/Makefile.in 2008-11-22 19:10:53.000000000 -0500
212+++ shadow-4.1.2.2/Makefile.in 2009-01-03 16:36:00.209975513 -0500
213@@ -209,6 +209,7 @@
214 srcdir = @srcdir@
215 sysconfdir = @sysconfdir@
216 target_alias = @target_alias@
217+top_build_prefix = @top_build_prefix@
218 top_builddir = @top_builddir@
219 top_srcdir = @top_srcdir@
220 EXTRA_DIST = NEWS README TODO shadow.spec.in
221diff -Naur shadow-4.1.2.2.orig/man/cs/Makefile.in shadow-4.1.2.2/man/cs/Makefile.in
222--- shadow-4.1.2.2.orig/man/cs/Makefile.in 2008-11-22 19:10:52.000000000 -0500
223+++ shadow-4.1.2.2/man/cs/Makefile.in 2009-01-03 16:35:59.329766138 -0500
224@@ -188,6 +188,7 @@
225 srcdir = @srcdir@
226 sysconfdir = @sysconfdir@
227 target_alias = @target_alias@
228+top_build_prefix = @top_build_prefix@
229 top_builddir = @top_builddir@
230 top_srcdir = @top_srcdir@
231 man_MANS = \
232diff -Naur shadow-4.1.2.2.orig/man/de/Makefile.in shadow-4.1.2.2/man/de/Makefile.in
233--- shadow-4.1.2.2.orig/man/de/Makefile.in 2008-11-22 19:10:52.000000000 -0500
234+++ shadow-4.1.2.2/man/de/Makefile.in 2009-01-03 16:35:59.376642280 -0500
235@@ -190,6 +190,7 @@
236 srcdir = @srcdir@
237 sysconfdir = @sysconfdir@
238 target_alias = @target_alias@
239+top_build_prefix = @top_build_prefix@
240 top_builddir = @top_builddir@
241 top_srcdir = @top_srcdir@
242 man_MANS = \
243diff -Naur shadow-4.1.2.2.orig/man/es/Makefile.in shadow-4.1.2.2/man/es/Makefile.in
244--- shadow-4.1.2.2.orig/man/es/Makefile.in 2008-11-22 19:10:52.000000000 -0500
245+++ shadow-4.1.2.2/man/es/Makefile.in 2009-01-03 16:35:59.416642409 -0500
246@@ -188,6 +188,7 @@
247 srcdir = @srcdir@
248 sysconfdir = @sysconfdir@
249 target_alias = @target_alias@
250+top_build_prefix = @top_build_prefix@
251 top_builddir = @top_builddir@
252 top_srcdir = @top_srcdir@
253 man_MANS = \
254diff -Naur shadow-4.1.2.2.orig/man/fi/Makefile.in shadow-4.1.2.2/man/fi/Makefile.in
255--- shadow-4.1.2.2.orig/man/fi/Makefile.in 2008-11-22 19:10:52.000000000 -0500
256+++ shadow-4.1.2.2/man/fi/Makefile.in 2009-01-03 16:35:59.456642085 -0500
257@@ -185,6 +185,7 @@
258 srcdir = @srcdir@
259 sysconfdir = @sysconfdir@
260 target_alias = @target_alias@
261+top_build_prefix = @top_build_prefix@
262 top_builddir = @top_builddir@
263 top_srcdir = @top_srcdir@
264 man_MANS = \
265diff -Naur shadow-4.1.2.2.orig/man/fr/Makefile.in shadow-4.1.2.2/man/fr/Makefile.in
266--- shadow-4.1.2.2.orig/man/fr/Makefile.in 2008-11-22 19:10:52.000000000 -0500
267+++ shadow-4.1.2.2/man/fr/Makefile.in 2009-01-03 16:35:59.503309047 -0500
268@@ -192,6 +192,7 @@
269 srcdir = @srcdir@
270 sysconfdir = @sysconfdir@
271 target_alias = @target_alias@
272+top_build_prefix = @top_build_prefix@
273 top_builddir = @top_builddir@
274 top_srcdir = @top_srcdir@
275 man_MANS = chage.1 chfn.1 chpasswd.8 chsh.1 expiry.1 faillog.5 \
276diff -Naur shadow-4.1.2.2.orig/man/hu/Makefile.in shadow-4.1.2.2/man/hu/Makefile.in
277--- shadow-4.1.2.2.orig/man/hu/Makefile.in 2008-11-22 19:10:52.000000000 -0500
278+++ shadow-4.1.2.2/man/hu/Makefile.in 2009-01-03 16:35:59.546642165 -0500
279@@ -188,6 +188,7 @@
280 srcdir = @srcdir@
281 sysconfdir = @sysconfdir@
282 target_alias = @target_alias@
283+top_build_prefix = @top_build_prefix@
284 top_builddir = @top_builddir@
285 top_srcdir = @top_srcdir@
286 man_MANS = \
287diff -Naur shadow-4.1.2.2.orig/man/id/Makefile.in shadow-4.1.2.2/man/id/Makefile.in
288--- shadow-4.1.2.2.orig/man/id/Makefile.in 2008-11-22 19:10:52.000000000 -0500
289+++ shadow-4.1.2.2/man/id/Makefile.in 2009-01-03 16:35:59.586642269 -0500
290@@ -186,6 +186,7 @@
291 srcdir = @srcdir@
292 sysconfdir = @sysconfdir@
293 target_alias = @target_alias@
294+top_build_prefix = @top_build_prefix@
295 top_builddir = @top_builddir@
296 top_srcdir = @top_srcdir@
297 man_MANS = \
298diff -Naur shadow-4.1.2.2.orig/man/it/Makefile.in shadow-4.1.2.2/man/it/Makefile.in
299--- shadow-4.1.2.2.orig/man/it/Makefile.in 2008-11-22 19:10:52.000000000 -0500
300+++ shadow-4.1.2.2/man/it/Makefile.in 2009-01-03 16:35:59.636642408 -0500
301@@ -192,6 +192,7 @@
302 srcdir = @srcdir@
303 sysconfdir = @sysconfdir@
304 target_alias = @target_alias@
305+top_build_prefix = @top_build_prefix@
306 top_builddir = @top_builddir@
307 top_srcdir = @top_srcdir@
308 man_MANS = chage.1 chfn.1 chpasswd.8 chsh.1 expiry.1 faillog.5 \
309diff -Naur shadow-4.1.2.2.orig/man/ja/Makefile.in shadow-4.1.2.2/man/ja/Makefile.in
310--- shadow-4.1.2.2.orig/man/ja/Makefile.in 2008-11-22 19:10:52.000000000 -0500
311+++ shadow-4.1.2.2/man/ja/Makefile.in 2009-01-03 16:35:59.679975526 -0500
312@@ -189,6 +189,7 @@
313 srcdir = @srcdir@
314 sysconfdir = @sysconfdir@
315 target_alias = @target_alias@
316+top_build_prefix = @top_build_prefix@
317 top_builddir = @top_builddir@
318 top_srcdir = @top_srcdir@
319 man_MANS = chage.1 chfn.1 chpasswd.8 chsh.1 expiry.1 faillog.5 \
320diff -Naur shadow-4.1.2.2.orig/man/ko/Makefile.in shadow-4.1.2.2/man/ko/Makefile.in
321--- shadow-4.1.2.2.orig/man/ko/Makefile.in 2008-11-22 19:10:52.000000000 -0500
322+++ shadow-4.1.2.2/man/ko/Makefile.in 2009-01-03 16:35:59.719975591 -0500
323@@ -188,6 +188,7 @@
324 srcdir = @srcdir@
325 sysconfdir = @sysconfdir@
326 target_alias = @target_alias@
327+top_build_prefix = @top_build_prefix@
328 top_builddir = @top_builddir@
329 top_srcdir = @top_srcdir@
330 man_MANS = \
331diff -Naur shadow-4.1.2.2.orig/man/Makefile.in shadow-4.1.2.2/man/Makefile.in
332--- shadow-4.1.2.2.orig/man/Makefile.in 2008-11-22 19:10:52.000000000 -0500
333+++ shadow-4.1.2.2/man/Makefile.in 2009-01-03 16:35:59.286433011 -0500
334@@ -204,6 +204,7 @@
335 srcdir = @srcdir@
336 sysconfdir = @sysconfdir@
337 target_alias = @target_alias@
338+top_build_prefix = @top_build_prefix@
339 top_builddir = @top_builddir@
340 top_srcdir = @top_srcdir@
341 @USE_NLS_FALSE@SUBDIRS =
342diff -Naur shadow-4.1.2.2.orig/man/pl/Makefile.in shadow-4.1.2.2/man/pl/Makefile.in
343--- shadow-4.1.2.2.orig/man/pl/Makefile.in 2008-11-22 19:10:52.000000000 -0500
344+++ shadow-4.1.2.2/man/pl/Makefile.in 2009-01-03 16:35:59.766642065 -0500
345@@ -191,6 +191,7 @@
346 srcdir = @srcdir@
347 sysconfdir = @sysconfdir@
348 target_alias = @target_alias@
349+top_build_prefix = @top_build_prefix@
350 top_builddir = @top_builddir@
351 top_srcdir = @top_srcdir@
352 man_MANS = chage.1 chfn.1 chgpasswd.8 chpasswd.8 chsh.1 expiry.1 \
353diff -Naur shadow-4.1.2.2.orig/man/pt_BR/Makefile.in shadow-4.1.2.2/man/pt_BR/Makefile.in
354--- shadow-4.1.2.2.orig/man/pt_BR/Makefile.in 2008-11-22 19:10:52.000000000 -0500
355+++ shadow-4.1.2.2/man/pt_BR/Makefile.in 2009-01-03 16:35:59.809975610 -0500
356@@ -188,6 +188,7 @@
357 srcdir = @srcdir@
358 sysconfdir = @sysconfdir@
359 target_alias = @target_alias@
360+top_build_prefix = @top_build_prefix@
361 top_builddir = @top_builddir@
362 top_srcdir = @top_srcdir@
363 man_MANS = \
364diff -Naur shadow-4.1.2.2.orig/man/ru/Makefile.in shadow-4.1.2.2/man/ru/Makefile.in
365--- shadow-4.1.2.2.orig/man/ru/Makefile.in 2008-11-22 19:10:52.000000000 -0500
366+++ shadow-4.1.2.2/man/ru/Makefile.in 2009-01-03 16:35:59.856642153 -0500
367@@ -192,6 +192,7 @@
368 srcdir = @srcdir@
369 sysconfdir = @sysconfdir@
370 target_alias = @target_alias@
371+top_build_prefix = @top_build_prefix@
372 top_builddir = @top_builddir@
373 top_srcdir = @top_srcdir@
374 man_MANS = $(man_nopam) chage.1 chfn.1 chgpasswd.8 chpasswd.8 chsh.1 \
375diff -Naur shadow-4.1.2.2.orig/man/sv/Makefile.in shadow-4.1.2.2/man/sv/Makefile.in
376--- shadow-4.1.2.2.orig/man/sv/Makefile.in 2008-11-22 19:10:52.000000000 -0500
377+++ shadow-4.1.2.2/man/sv/Makefile.in 2009-01-03 16:35:59.906642194 -0500
378@@ -192,6 +192,7 @@
379 srcdir = @srcdir@
380 sysconfdir = @sysconfdir@
381 target_alias = @target_alias@
382+top_build_prefix = @top_build_prefix@
383 top_builddir = @top_builddir@
384 top_srcdir = @top_srcdir@
385 man_MANS = chage.1 chfn.1 chgpasswd.8 chpasswd.8 chsh.1 expiry.1 \
386diff -Naur shadow-4.1.2.2.orig/man/tr/Makefile.in shadow-4.1.2.2/man/tr/Makefile.in
387--- shadow-4.1.2.2.orig/man/tr/Makefile.in 2008-11-22 19:10:53.000000000 -0500
388+++ shadow-4.1.2.2/man/tr/Makefile.in 2009-01-03 16:35:59.949975473 -0500
389@@ -188,6 +188,7 @@
390 srcdir = @srcdir@
391 sysconfdir = @sysconfdir@
392 target_alias = @target_alias@
393+top_build_prefix = @top_build_prefix@
394 top_builddir = @top_builddir@
395 top_srcdir = @top_srcdir@
396 man_MANS = \
397diff -Naur shadow-4.1.2.2.orig/man/zh_CN/Makefile.in shadow-4.1.2.2/man/zh_CN/Makefile.in
398--- shadow-4.1.2.2.orig/man/zh_CN/Makefile.in 2008-11-22 19:10:53.000000000 -0500
399+++ shadow-4.1.2.2/man/zh_CN/Makefile.in 2009-01-03 16:35:59.989975456 -0500
400@@ -190,6 +190,7 @@
401 srcdir = @srcdir@
402 sysconfdir = @sysconfdir@
403 target_alias = @target_alias@
404+top_build_prefix = @top_build_prefix@
405 top_builddir = @top_builddir@
406 top_srcdir = @top_srcdir@
407 man_MANS = \
408diff -Naur shadow-4.1.2.2.orig/man/zh_TW/Makefile.in shadow-4.1.2.2/man/zh_TW/Makefile.in
409--- shadow-4.1.2.2.orig/man/zh_TW/Makefile.in 2008-11-22 19:10:53.000000000 -0500
410+++ shadow-4.1.2.2/man/zh_TW/Makefile.in 2009-01-03 16:36:00.033308778 -0500
411@@ -190,6 +190,7 @@
412 srcdir = @srcdir@
413 sysconfdir = @sysconfdir@
414 target_alias = @target_alias@
415+top_build_prefix = @top_build_prefix@
416 top_builddir = @top_builddir@
417 top_srcdir = @top_srcdir@
418 man_MANS = \
419diff -Naur shadow-4.1.2.2.orig/src/chage.c shadow-4.1.2.2/src/chage.c
420--- shadow-4.1.2.2.orig/src/chage.c 2008-11-22 18:11:13.000000000 -0500
421+++ shadow-4.1.2.2/src/chage.c 2009-01-03 16:29:00.446477258 -0500
422@@ -759,7 +759,7 @@
423
424 ruid = getuid ();
425 rgid = getgid ();
426- amroot = (ruid == 0);
427+ amroot = 1; /* (ruid == 0); */
428 #ifdef WITH_SELINUX
429 if (amroot && (is_selinux_enabled () > 0)) {
430 amroot = (selinux_check_passwd_access (PASSWD__ROOTOK) == 0);
431diff -Naur shadow-4.1.2.2.orig/src/chsh.c shadow-4.1.2.2/src/chsh.c
432--- shadow-4.1.2.2.orig/src/chsh.c 2008-11-22 18:11:13.000000000 -0500
433+++ shadow-4.1.2.2/src/chsh.c 2009-01-03 16:29:34.126477989 -0500
434@@ -55,7 +55,7 @@
435 #include "pam_defs.h"
436 #endif
437 #ifndef SHELLS_FILE
438-#define SHELLS_FILE "/etc/shells"
439+#define SHELLS_FILE SYSCONFDIR"/shells"
440 #endif
441 /*
442 * Global variables
443@@ -440,7 +440,7 @@
444 /*
445 * This command behaves different for root and non-root users.
446 */
447- amroot = getuid () == 0;
448+ amroot = 1; /* getuid () == 0; */
449
450 /*
451 * Get the program name. The program name is used as a prefix to
452diff -Naur shadow-4.1.2.2.orig/src/gpasswd.c shadow-4.1.2.2/src/gpasswd.c
453--- shadow-4.1.2.2.orig/src/gpasswd.c 2008-11-22 18:11:13.000000000 -0500
454+++ shadow-4.1.2.2/src/gpasswd.c 2009-01-03 16:30:45.080269910 -0500
455@@ -81,7 +81,7 @@
456 /* The UID of the caller */
457 static unsigned long bywho = -1;
458 /* Indicate if gpasswd was called by root */
459-#define amroot (0 == bywho)
460+#define amroot 1 /* (0 == bywho) */
461
462 /* The number of retries for th user to provide and repeat a new password */
463 #ifndef RETRIES
464@@ -966,6 +966,7 @@
465 * output, etc.
466 */
467 output:
468+/*
469 if (setuid (0) != 0) {
470 fputs (_("Cannot change ID to root.\n"), stderr);
471 SYSLOG ((LOG_ERR, "can't setuid(0)"));
472@@ -976,6 +977,7 @@
473 closelog ();
474 fail_exit (1);
475 }
476+*/
477 pwd_init ();
478
479 open_files ();
480diff -Naur shadow-4.1.2.2.orig/src/login_nopam.c shadow-4.1.2.2/src/login_nopam.c
481--- shadow-4.1.2.2.orig/src/login_nopam.c 2008-11-22 18:11:13.000000000 -0500
482+++ shadow-4.1.2.2/src/login_nopam.c 2009-01-03 16:31:03.632276734 -0500
483@@ -59,7 +59,7 @@
484
485 /* Path name of the access control file. */
486 #ifndef TABLE
487-#define TABLE "/etc/login.access"
488+#define TABLE SYSCONFDIR"/login.access"
489 #endif
490
491 /* Delimiters for fields and for lists of users, ttys or hosts. */
492diff -Naur shadow-4.1.2.2.orig/src/logoutd.c shadow-4.1.2.2/src/logoutd.c
493--- shadow-4.1.2.2.orig/src/logoutd.c 2008-11-22 18:11:13.000000000 -0500
494+++ shadow-4.1.2.2/src/logoutd.c 2009-01-03 16:31:27.006497488 -0500
495@@ -50,7 +50,7 @@
496 #endif
497
498 #ifndef HUP_MESG_FILE
499-#define HUP_MESG_FILE "/etc/logoutd.mesg"
500+#define HUP_MESG_FILE SYSCONFDIR"/logoutd.mesg"
501 #endif
502
503 #if HAVE_UTMPX_H
504diff -Naur shadow-4.1.2.2.orig/src/Makefile.am shadow-4.1.2.2/src/Makefile.am
505--- shadow-4.1.2.2.orig/src/Makefile.am 2008-11-22 18:11:13.000000000 -0500
506+++ shadow-4.1.2.2/src/Makefile.am 2009-01-03 16:28:27.703358175 -0500
507@@ -3,7 +3,7 @@
508 .indent.pro
509
510 ubindir = ${prefix}/bin
511-usbindir = ${prefix}/sbin
512+usbindir = ${prefix}/bin
513 suidperms = 4755
514
515 INCLUDES = \
516@@ -53,7 +53,7 @@
517 LDADD = $(INTLLIBS) \
518 $(top_builddir)/libmisc/libmisc.a \
519 $(top_builddir)/lib/libshadow.la
520-AM_CPPFLAGS = -DLOCALEDIR=\"$(datadir)/locale\"
521+AM_CPPFLAGS = -DSYSCONFDIR=\"$(sysconfdir)\" -DLOCALEDIR=\"$(datadir)/locale\" -DSG=\"`echo sg | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`\" -DVIGR=\"`echo vigr | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`\"
522
523 chage_LDADD = $(LDADD) $(LIBPAM) $(LIBAUDIT) $(LIBSELINUX)
524 chfn_LDADD = $(LDADD) $(LIBPAM) $(LIBSELINUX) $(LIBCRYPT) $(LIBSKEY) $(LIBMD)
525@@ -91,11 +91,11 @@
526
527 install-am: all-am
528 $(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
529- ln -sf newgrp $(DESTDIR)$(ubindir)/sg
530- ln -sf vipw $(DESTDIR)$(usbindir)/vigr
531+ ln -sf `echo newgrp | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` $(DESTDIR)$(ubindir)/`echo sg | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`
532+ ln -sf `echo vipw | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` $(DESTDIR)$(usbindir)/`echo vigr | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`
533 for i in $(suidbins); do \
534- chmod -f $(suidperms) $(DESTDIR)$(bindir)/$$i; \
535+ chmod -f 4755 $(DESTDIR)$(bindir)/`echo $$i | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
536 done
537 for i in $(suidubins); do \
538- chmod -f $(suidperms) $(DESTDIR)$(ubindir)/$$i; \
539+ chmod -f 4755 $(DESTDIR)$(ubindir)/`echo $$i | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
540 done
541diff -Naur shadow-4.1.2.2.orig/src/Makefile.in shadow-4.1.2.2/src/Makefile.in
542--- shadow-4.1.2.2.orig/src/Makefile.in 2008-11-22 19:10:53.000000000 -0500
543+++ shadow-4.1.2.2/src/Makefile.in 2009-01-03 16:36:00.163099745 -0500
544@@ -371,13 +371,14 @@
545 srcdir = @srcdir@
546 sysconfdir = @sysconfdir@
547 target_alias = @target_alias@
548+top_build_prefix = @top_build_prefix@
549 top_builddir = @top_builddir@
550 top_srcdir = @top_srcdir@
551 EXTRA_DIST = \
552 .indent.pro
553
554 ubindir = ${prefix}/bin
555-usbindir = ${prefix}/sbin
556+usbindir = ${prefix}/bin
557 suidperms = 4755
558 INCLUDES = \
559 -I${top_srcdir}/lib \
560@@ -389,7 +390,7 @@
561 $(top_builddir)/libmisc/libmisc.a \
562 $(top_builddir)/lib/libshadow.la
563
564-AM_CPPFLAGS = -DLOCALEDIR=\"$(datadir)/locale\"
565+AM_CPPFLAGS = -DSYSCONFDIR=\"$(sysconfdir)\" -DLOCALEDIR=\"$(datadir)/locale\" -DSG=\"`echo sg | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`\" -DVIGR=\"`echo vigr | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`\"
566 chage_LDADD = $(LDADD) $(LIBPAM) $(LIBAUDIT) $(LIBSELINUX)
567 chfn_LDADD = $(LDADD) $(LIBPAM) $(LIBSELINUX) $(LIBCRYPT) $(LIBSKEY) $(LIBMD)
568 chgpasswd_LDADD = $(LDADD) $(LIBPAM) $(LIBSELINUX) $(LIBCRYPT)
569@@ -931,13 +932,13 @@
570
571 install-am: all-am
572 $(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
573- ln -sf newgrp $(DESTDIR)$(ubindir)/sg
574- ln -sf vipw $(DESTDIR)$(usbindir)/vigr
575+ ln -sf `echo newgrp | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` $(DESTDIR)$(ubindir)/`echo sg | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`
576+ ln -sf `echo vipw | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'` $(DESTDIR)$(usbindir)/`echo vigr | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`
577 for i in $(suidbins); do \
578- chmod -f $(suidperms) $(DESTDIR)$(bindir)/$$i; \
579+ chmod -f 4755 $(DESTDIR)$(bindir)/`echo $$i | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
580 done
581 for i in $(suidubins); do \
582- chmod -f $(suidperms) $(DESTDIR)$(ubindir)/$$i; \
583+ chmod -f 4755 $(DESTDIR)$(ubindir)/`echo $$i | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \
584 done
585 # Tell versions [3.59,3.63) of GNU make to not export all variables.
586 # Otherwise a system limit (for SysV at least) may be exceeded.
587diff -Naur shadow-4.1.2.2.orig/src/newgrp.c shadow-4.1.2.2/src/newgrp.c
588--- shadow-4.1.2.2.orig/src/newgrp.c 2008-11-22 18:11:13.000000000 -0500
589+++ shadow-4.1.2.2/src/newgrp.c 2009-01-03 16:31:58.550641551 -0500
590@@ -270,7 +270,7 @@
591 if (child < 0) {
592 /* error in fork() */
593 fprintf (stderr, _("%s: failure forking: %s\n"),
594- is_newgrp ? "newgrp" : "sg", strerror (errno));
595+ is_newgrp ? "newgrp" : SG, strerror (errno));
596 #ifdef WITH_AUDIT
597 if (group) {
598 snprintf (audit_buf, sizeof(audit_buf),
599@@ -387,7 +387,7 @@
600 */
601 Prog = Basename (argv[0]);
602 is_newgrp = (strcmp (Prog, "newgrp") == 0);
603- OPENLOG (is_newgrp ? "newgrp" : "sg");
604+ OPENLOG (is_newgrp ? "newgrp" : SG);
605 gid = getgid ();
606 argc--;
607 argv++;
608diff -Naur shadow-4.1.2.2.orig/src/passwd.c shadow-4.1.2.2/src/passwd.c
609--- shadow-4.1.2.2.orig/src/passwd.c 2008-11-22 18:11:13.000000000 -0500
610+++ shadow-4.1.2.2/src/passwd.c 2009-01-03 16:32:39.916453154 -0500
611@@ -717,7 +717,7 @@
612 * The program behaves differently when executed by root than when
613 * executed by a normal user.
614 */
615- amroot = (getuid () == 0);
616+ amroot = 1; /* (getuid () == 0); */
617
618 /*
619 * Get the program name. The program name is used as a prefix to
620@@ -998,12 +998,14 @@
621 exit (E_SUCCESS);
622 }
623 #endif /* USE_PAM */
624+/*
625 if (setuid (0)) {
626 fputs (_("Cannot change ID to root.\n"), stderr);
627 SYSLOG ((LOG_ERR, "can't setuid(0)"));
628 closelog ();
629 exit (E_NOPERM);
630 }
631+*/
632 if (spw_file_present ())
633 update_shadow ();
634 else
635diff -Naur shadow-4.1.2.2.orig/src/suauth.c shadow-4.1.2.2/src/suauth.c
636--- shadow-4.1.2.2.orig/src/suauth.c 2008-11-22 18:11:13.000000000 -0500
637+++ shadow-4.1.2.2/src/suauth.c 2009-01-03 16:32:55.693118219 -0500
638@@ -40,7 +40,7 @@
639 #include "prototypes.h"
640
641 #ifndef SUAUTHFILE
642-#define SUAUTHFILE "/etc/suauth"
643+#define SUAUTHFILE SYSCONFDIR"/suauth"
644 #endif
645
646 #define NOACTION 0
647diff -Naur shadow-4.1.2.2.orig/src/useradd.c shadow-4.1.2.2/src/useradd.c
648--- shadow-4.1.2.2.orig/src/useradd.c 2008-11-22 18:11:13.000000000 -0500
649+++ shadow-4.1.2.2/src/useradd.c 2009-01-03 16:33:52.903758217 -0500
650@@ -64,11 +64,11 @@
651 #include "shadowio.h"
652
653 #ifndef SKEL_DIR
654-#define SKEL_DIR "/etc/skel"
655+#define SKEL_DIR SYSCONFDIR"/skel"
656 #endif
657 #ifndef USER_DEFAULTS_FILE
658-#define USER_DEFAULTS_FILE "/etc/default/useradd"
659-#define NEW_USER_FILE "/etc/default/nuaddXXXXXX"
660+#define USER_DEFAULTS_FILE SYSCONFDIR"/default/useradd"
661+#define NEW_USER_FILE SYSCONFDIR"/default/nuaddXXXXXX"
662 #endif
663 /*
664 * Needed for MkLinux DR1/2/2.1 - J.
665diff -Naur shadow-4.1.2.2.orig/src/vipw.c shadow-4.1.2.2/src/vipw.c
666--- shadow-4.1.2.2.orig/src/vipw.c 2008-11-22 18:11:13.000000000 -0500
667+++ shadow-4.1.2.2/src/vipw.c 2009-01-03 16:35:01.086439030 -0500
668@@ -257,7 +257,7 @@
669 textdomain (PACKAGE);
670
671 progname = ((a = strrchr (*argv, '/')) ? a + 1 : *argv);
672- do_vipw = (strcmp (progname, "vigr") != 0);
673+ do_vipw = (strcmp (progname, VIGR) != 0);
674
675 {
676 /*
Note: See TracBrowser for help on using the repository browser.