source: patches/shadow-4.0.18.1-fixes-1.patch@ c30178f

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since c30178f was 406ed09, checked in by Jim Gifford <clfs@…>, 17 years ago

Updated Shadow Patch

  • Property mode set to 100644
File size: 28.6 KB
RevLine 
[406ed09]1Submitted By: Jim Gifford (patches at jg555 dot com)
2Date: 2007-09-04
3Initial Package Version: 4.0.18.1
4Origin: Mailing List
5Upstream Status: Submitted
6Description: Fixes Various Issues From Upstream
7 Adds compability for Samba Machine Names
8 Corrects Grammer in Man Files
9 Corrects Useradd issue
10 Fixes useradd -G and -g
11 Fix chpasswd and chgpasswd stack overflow
12
13diff -Naur shadow-4.0.18.1.orig/contrib/adduser.c shadow-4.0.18.1/contrib/adduser.c
14--- shadow-4.0.18.1.orig/contrib/adduser.c 1997-09-29 15:00:49.000000000 -0700
15+++ shadow-4.0.18.1/contrib/adduser.c 2007-09-03 17:40:36.000000000 -0700
16@@ -169,7 +169,7 @@
17 if (geteuid () != 0)
18 {
19 printf ("It seems you don't have access to add a new user. Try\n");
20- printf ("logging in as root or su root to gain super-user access.\n");
21+ printf ("logging in as root or su root to gain superuser access.\n");
22 exit (1);
23 }
24
25diff -Naur shadow-4.0.18.1.orig/contrib/groupmems.shar shadow-4.0.18.1/contrib/groupmems.shar
26--- shadow-4.0.18.1.orig/contrib/groupmems.shar 2000-08-26 11:37:32.000000000 -0700
27+++ shadow-4.0.18.1/contrib/groupmems.shar 2007-09-03 17:40:36.000000000 -0700
28@@ -211,8 +211,8 @@
29 #define EXIT_SUCCESS 0 /* success */
30 #define EXIT_USAGE 1 /* invalid command syntax */
31 #define EXIT_GROUP_FILE 2 /* group file access problems */
32-#define EXIT_NOT_ROOT 3 /* not super user */
33-#define EXIT_NOT_EROOT 4 /* not effective super user */
34+#define EXIT_NOT_ROOT 3 /* not superuser */
35+#define EXIT_NOT_EROOT 4 /* not effective superuser */
36 #define EXIT_NOT_PRIMARY 5 /* not primary owner of group */
37 #define EXIT_NOT_MEMBER 6 /* member of group does not exist */
38 #define EXIT_MEMBER_EXISTS 7 /* member of group already exists */
39@@ -481,11 +481,11 @@
40 [\fB-g\fI group_name \fR]
41 X.SH DESCRIPTION
42 The \fBgroupmems\fR utility allows a user to administer his/her own
43-group membership list without the requirement of super user privileges.
44+group membership list without the requirement of superuser privileges.
45 The \fBgroupmems\fR utility is for systems that configure its users to
46 be in their own name sake primary group (i.e., guest / guest).
47 X.P
48-Only the super user, as administrator, can use \fBgroupmems\fR to alter
49+Only the superuser, as administrator, can use \fBgroupmems\fR to alter
50 the memberships of other groups.
51 X.IP "\fB-a \fIuser_name\fR"
52 Add a new user to the group membership list.
53@@ -496,7 +496,7 @@
54 X.IP "\fB-D\fR"
55 Delete all users from the group membership list.
56 X.IP "\fB-g \fIgroup_name\fR"
57-The super user can specify which group membership list to modify.
58+The superuser can specify which group membership list to modify.
59 X.SH SETUP
60 The \fBgroupmems\fR executable should be in mode \fB2770\fR as user \fBroot\fR
61 and in group \fBgroups\fR. The system administrator can add users to
62diff -Naur shadow-4.0.18.1.orig/libmisc/chkname.c shadow-4.0.18.1/libmisc/chkname.c
63--- shadow-4.0.18.1.orig/libmisc/chkname.c 2005-08-31 10:24:57.000000000 -0700
64+++ shadow-4.0.18.1/libmisc/chkname.c 2007-09-03 17:30:39.000000000 -0700
65@@ -18,16 +18,24 @@
66 static int good_name (const char *name)
67 {
68 /*
69- * User/group names must match [a-z_][a-z0-9_-]*[$]
70- */
71- if (!*name || !((*name >= 'a' && *name <= 'z') || *name == '_'))
72+ * User/group names must match gnu e-regex:
73+ * [a-zA-Z0-9_.][a-zA-Z0-9_.-]{0,30}[a-zA-Z0-9_.$-]?
74+ *
75+ * as a non-POSIX, extension, allow "$" as the last char for
76+ * sake of Samba 3.x "add machine script"
77+ */
78+ if (!*name || !((*name >= 'a' && *name <= 'z')
79+ || (*name >= 'A' && *name <= 'Z')
80+ || (*name >= '0' && *name <= '9')
81+ || *name == '_' || *name == '.'))
82 return 0;
83
84 while (*++name) {
85- if (!((*name >= 'a' && *name <= 'z') ||
86- (*name >= '0' && *name <= '9') ||
87- *name == '_' || *name == '-' ||
88- (*name == '$' && *(name + 1) == '\0')))
89+ if (!( (*name >= 'a' && *name <= 'z')
90+ || (*name >= 'A' && *name <= 'Z')
91+ || (*name >= '0' && *name <= '9')
92+ || *name == '_' || *name == '.' || *name == '-'
93+ || (*name == '$' && *(name + 1) == '\0')))
94 return 0;
95 }
96
97@@ -43,10 +51,9 @@
98 #endif
99
100 /*
101- * User names are limited by whatever utmp can
102- * handle (usually max 8 characters).
103+ * User names are limited by whatever utmp can handle.
104 */
105- if (strlen (name) > sizeof (ut.ut_user))
106+ if (strlen(name) + 1 > sizeof(ut.ut_user))
107 return 0;
108
109 return good_name (name);
110@@ -54,11 +61,13 @@
111
112 int check_group_name (const char *name)
113 {
114- /*
115- * Arbitrary limit for group names - max 16
116- * characters (same as on HP-UX 10).
117- */
118- if (strlen (name) > 16)
119+#if HAVE_UTMPX_H
120+ struct utmpx ut;
121+#else
122+ struct utmp ut;
123+#endif
124+
125+ if (strlen(name) + 1 > sizeof(ut.ut_user))
126 return 0;
127
128 return good_name (name);
129diff -Naur shadow-4.0.18.1.orig/man/chfn.1.xml shadow-4.0.18.1/man/chfn.1.xml
130--- shadow-4.0.18.1.orig/man/chfn.1.xml 2006-07-23 22:48:36.000000000 -0700
131+++ shadow-4.0.18.1/man/chfn.1.xml 2007-09-03 17:40:36.000000000 -0700
132@@ -32,8 +32,8 @@
133 </citerefentry> and similar programs. A normal user may only change
134 the fields for her own account, subject to the restrictions in
135 <filename>/etc/login.defs</filename>. (The default configuration is to
136- prevent users from changing their fullname.) The super user may change
137- any field for any account. Additionally, only the super user may use
138+ prevent users from changing their fullname.) The superuser may change
139+ any field for any account. Additionally, only the superuser may use
140 the <option>-o</option> option to change the undefined portions of the
141 GECOS field.
142 </para>
143diff -Naur shadow-4.0.18.1.orig/man/chsh.1.xml shadow-4.0.18.1/man/chsh.1.xml
144--- shadow-4.0.18.1.orig/man/chsh.1.xml 2006-07-23 22:48:36.000000000 -0700
145+++ shadow-4.0.18.1/man/chsh.1.xml 2007-09-03 17:41:09.000000000 -0700
146@@ -28,7 +28,7 @@
147 <para>
148 <command>chsh</command> changes the user login shell. This determines
149 the name of the user's initial login command. A normal user may only
150- change the login shell for her own account, the super user may change
151+ change the login shell for her own account, the superuser may change
152 the login shell for any account.
153 </para>
154
155@@ -72,7 +72,7 @@
156 <para>
157 The only restriction placed on the login shell is that the command
158 name must be listed in <filename>/etc/shells</filename>, unless the
159- invoker is the super-user, and then any value may be added. An
160+ invoker is the superuser, and then any value may be added. An
161 account with a restricted login shell may not change her login shell.
162 For this reason, placing <filename>/bin/rsh</filename> in
163 <filename>/etc/shells</filename> is discouraged since accidentally
164diff -Naur shadow-4.0.18.1.orig/man/groupadd.8 shadow-4.0.18.1/man/groupadd.8
165--- shadow-4.0.18.1.orig/man/groupadd.8 2006-07-30 13:53:48.000000000 -0700
166+++ shadow-4.0.18.1/man/groupadd.8 2007-09-03 17:30:39.000000000 -0700
167@@ -70,15 +70,11 @@
168 Shadow password suite configuration.
169 .SH "CAVEATS"
170 .PP
171-Groupnames must begin with a lower case letter or an underscore, and only lower case letters, underscores, dashes, and dollar signs may follow. In regular expression terms: [a\-z_][a\-z0\-9_\-]*[$]
172-.PP
173-Groupnames may only be up to 16 characters long.
174+Groupnames may only be up to 32 characters long.
175 .PP
176 If the groupname already exists in an external group database such as NIS,
177 \fBgroupadd\fR
178 will deny the group creation request.
179-.PP
180-Groupnames may only be up to 16 characters long.
181 .SH "EXIT VALUES"
182 .PP
183 The
184diff -Naur shadow-4.0.18.1.orig/man/groupadd.8.xml shadow-4.0.18.1/man/groupadd.8.xml
185--- shadow-4.0.18.1.orig/man/groupadd.8.xml 2006-07-23 22:48:36.000000000 -0700
186+++ shadow-4.0.18.1/man/groupadd.8.xml 2007-09-03 17:37:35.000000000 -0700
187@@ -29,7 +29,7 @@
188 <refsect1 id='description'>
189 <title>DESCRIPTION</title>
190 <para>The <command>groupadd</command> command creates a new group
191- account using the values specified on the command line and the default
192+ account using the values specified on the command line plus the default
193 values from the system. The new group will be entered into the system
194 files as needed.
195 </para>
196@@ -47,9 +47,11 @@
197 <option>-f</option>
198 </term>
199 <listitem>
200- <para>This option causes to just exit with success status if the
201- specified group already exists. With <option>-g</option>, if
202- specified GID already exists, other (unique) GID is chosen (i.e.
203+ <para>This option causes the command to simply exit with success
204+ status if the
205+ specified group already exists. When used with
206+ <option>-g</option>, and the
207+ specified GID already exists, another (unique) GID is chosen (i.e.
208 <option>-g</option> is turned off).
209 </para>
210 </listitem>
211@@ -101,7 +103,7 @@
212 </term>
213 <listitem>
214 <para>
215- This option permits to add group with non-unique GID.
216+ This option permits to add a group with a non-unique GID.
217 </para>
218 </listitem>
219 </varlistentry>
220@@ -138,16 +140,12 @@
221 only lower case letters, underscores, dashes, and dollar signs may
222 follow. In regular expression terms: [a-z_][a-z0-9_-]*[$]
223 </para>
224- <para>Groupnames may only be up to 16 characters long.</para>
225-
226 <para>
227 If the groupname already exists in an external group database
228 such as NIS, <command>groupadd</command> will deny the group
229 creation request.
230 </para>
231-
232 <para>Groupnames may only be up to 16 characters long.</para>
233-
234 </refsect1>
235
236 <refsect1 id='exit_values'>
237diff -Naur shadow-4.0.18.1.orig/man/groupmems.8.xml shadow-4.0.18.1/man/groupmems.8.xml
238--- shadow-4.0.18.1.orig/man/groupmems.8.xml 2006-07-23 22:48:36.000000000 -0700
239+++ shadow-4.0.18.1/man/groupmems.8.xml 2007-09-03 17:41:54.000000000 -0700
240@@ -27,13 +27,13 @@
241 <title>DESCRIPTION</title>
242 <para>
243 The <command>groupmems</command> utility allows a user to administer
244- his/her own group membership list without the requirement of super
245- user privileges. The <command>groupmems</command> utility is for
246+ his/her own group membership list without the requirement of
247+ superuser privileges. The <command>groupmems</command> utility is for
248 systems that configure its users to be in their own name sake primary
249 group (i.e., guest / guest).
250 </para>
251
252- <para>Only the super user, as administrator, can use
253+ <para>Only the superuser, as administrator, can use
254 <command>groupmems</command> to alter the memberships of other groups.
255 </para>
256 </refsect1>
257@@ -66,7 +66,7 @@
258 <varlistentry>
259 <term><option>-g</option> <replaceable>group_name</replaceable></term>
260 <listitem>
261- <para>The super user can specify which group membership
262+ <para>The superuser can specify which group membership
263 list to modify.
264 </para>
265 </listitem>
266diff -Naur shadow-4.0.18.1.orig/man/groupmod.8.xml shadow-4.0.18.1/man/groupmod.8.xml
267--- shadow-4.0.18.1.orig/man/groupmod.8.xml 2006-07-23 22:48:36.000000000 -0700
268+++ shadow-4.0.18.1/man/groupmod.8.xml 2007-09-03 17:37:35.000000000 -0700
269@@ -43,12 +43,14 @@
270 </term>
271 <listitem>
272 <para>
273- Specify the new group ID for the <replaceable>GROUP</replaceable>.
274- The numerical value of the <replaceable>GID</replaceable> must be
275+ The group ID of the given <replaceable>GROUP</replaceable> will be
276+ changed to <replaceable>GID</replaceable>.
277+ The value of <replaceable>GID</replaceable> must be
278 a non-negative decimal integer. This value must be unique, unless
279 the <option>-o</option> option is used. Values between 0 and 999
280- are typically reserved for system groups. Any files which the old
281- group ID is the file group ID must have the file group ID changed
282+ are typically reserved for system groups. Any files that have
283+ the old group ID and must continue to belong to
284+ <replaceable>GROUP</replaceable>, must have their group ID changed
285 manually.
286 </para>
287 </listitem>
288@@ -77,8 +79,8 @@
289 </term>
290 <listitem>
291 <para>
292- When used with the <option>-g</option> option allow to change the
293- group <replaceable>GID</replaceable> to non-unique value.
294+ When used with the <option>-g</option> option, allow to change the
295+ group <replaceable>GID</replaceable> to a non-unique value.
296 </para>
297 </listitem>
298 </varlistentry>
299diff -Naur shadow-4.0.18.1.orig/man/login.1.xml shadow-4.0.18.1/man/login.1.xml
300--- shadow-4.0.18.1.orig/man/login.1.xml 2006-07-23 22:48:36.000000000 -0700
301+++ shadow-4.0.18.1/man/login.1.xml 2007-09-03 17:37:35.000000000 -0700
302@@ -184,11 +184,11 @@
303 </para>
304
305 <para>
306- As any program, <command>login</command> appearance could be faked.
307- If non-trusted users have a physical access to the machine, an
308+ As with any program, <command>login</command>'s appearance can be faked.
309+ If non-trusted users have physical access to a machine, an
310 attacker could use this to obtain the password of the next person
311- sitting in front of the machine. Under Linux, the SAK mecanism can be
312- used by users to initiate of a trusted path and prevent this kind of
313+ coming to sit in front of the machine. Under Linux, the SAK mechanism can be
314+ used by users to initiate a trusted path and prevent this kind of
315 attack.
316 </para>
317
318diff -Naur shadow-4.0.18.1.orig/man/newusers.8.xml shadow-4.0.18.1/man/newusers.8.xml
319--- shadow-4.0.18.1.orig/man/newusers.8.xml 2006-07-23 22:48:36.000000000 -0700
320+++ shadow-4.0.18.1/man/newusers.8.xml 2007-09-03 17:39:26.000000000 -0700
321@@ -60,10 +60,11 @@
322 </term>
323 <listitem>
324 <para>
325- This field may be the name of an existing group, in which case
326- the named user will be added as a member. If a non-existent
327- numerical group is given, a new group will be created having
328- this number.
329+ This field must contain the name (or number) of a group. The user
330+ will be added as a member to this group. When a non-existent
331+ group name or number is specified, a new group will be created.
332+ In the case of a non-existent group number, both the name and the
333+ number of the new group will be this number.
334 </para>
335 </listitem>
336 </varlistentry>
337@@ -73,8 +74,8 @@
338 </term>
339 <listitem>
340 <para>
341- This field will be checked for existence as a directory and a
342- new directory with the same name will be created if it does not
343+ This field will be checked for existence as a directory, and a
344+ new directory with this name will be created if it does not
345 already exist. The ownership of the directory will be set to be
346 that of the user being created or updated.
347 </para>
348diff -Naur shadow-4.0.18.1.orig/man/passwd.1.xml shadow-4.0.18.1/man/passwd.1.xml
349--- shadow-4.0.18.1.orig/man/passwd.1.xml 2006-07-23 22:48:36.000000000 -0700
350+++ shadow-4.0.18.1/man/passwd.1.xml 2007-09-03 17:42:21.000000000 -0700
351@@ -28,7 +28,7 @@
352 <para>
353 <command>passwd</command> changes passwords for user accounts. A
354 normal user may only change the password for his/her own account, while
355- the super user may change the password for any account.
356+ the superuser may change the password for any account.
357 <command>passwd</command> also changes account information, such as
358 the full name of the user, the user's login shell, or his/her password
359 expiry date and interval.
360@@ -40,7 +40,7 @@
361 The user is first prompted for his/her old password, if one is
362 present. This password is then encrypted and compared against the
363 stored password. The user has only one chance to enter the correct
364- password. The super user is permitted to bypass this step so that
365+ password. The superuser is permitted to bypass this step so that
366 forgotten passwords may be changed.
367 </para>
368
369diff -Naur shadow-4.0.18.1.orig/man/shadow.3.xml shadow-4.0.18.1/man/shadow.3.xml
370--- shadow-4.0.18.1.orig/man/shadow.3.xml 2006-07-23 22:48:36.000000000 -0700
371+++ shadow-4.0.18.1/man/shadow.3.xml 2007-09-03 17:40:36.000000000 -0700
372@@ -163,7 +163,7 @@
373 <refsect1 id='caveats'>
374 <title>CAVEATS</title>
375 <para>
376- These routines may only be used by the super user as access to the
377+ These routines may only be used by the superuser as access to the
378 shadow password file is restricted.
379 </para>
380 </refsect1>
381diff -Naur shadow-4.0.18.1.orig/man/su.1.xml shadow-4.0.18.1/man/su.1.xml
382--- shadow-4.0.18.1.orig/man/su.1.xml 2006-07-23 22:48:36.000000000 -0700
383+++ shadow-4.0.18.1/man/su.1.xml 2007-09-03 17:40:36.000000000 -0700
384@@ -8,7 +8,7 @@
385 </refmeta>
386 <refnamediv id='name'>
387 <refname>su</refname>
388- <refpurpose>change user ID or become super-user</refpurpose>
389+ <refpurpose>change user ID or become superuser</refpurpose>
390 </refnamediv>
391 <refsynopsisdiv id='synopsis'>
392 <cmdsynopsis>
393@@ -30,7 +30,7 @@
394 <command>su</command> is used to become another user during a login
395 session. Invoked without a <option>username</option>,
396 <command>su</command> defaults to
397- becoming the super user. The optional argument <option>-</option> may
398+ becoming the superuser. The optional argument <option>-</option> may
399 be used to provide an environment similar to what the user would
400 expect had the user logged in directly.
401 </para>
402@@ -58,7 +58,7 @@
403 The current environment is passed to the new shell. The value of
404 <envar>$PATH</envar> is reset to <filename>/bin:/usr/bin</filename>
405 for normal users, or <filename>/sbin:/bin:/usr/sbin:/usr/bin</filename>
406- for the super user. This may be changed with the
407+ for the superuser. This may be changed with the
408 <emphasis>ENV_PATH</emphasis> and <emphasis>ENV_SUPATH</emphasis>
409 definitions in <filename>/etc/login.defs</filename>.
410 </para>
411@@ -78,7 +78,7 @@
412 <varlistentry>
413 <term>
414 <option>-c</option>, <option>--command</option>
415- <replaceable>SHELL</replaceable>
416+ <replaceable>COMMAND</replaceable>
417 </term>
418 <listitem>
419 <para>
420@@ -112,10 +112,10 @@
421 <listitem>
422 <para>The shell that will be invoked.</para>
423 <para>
424- The invoked shell is choosen among (higest priority first):
425+ The invoked shell is chosen from (highest priority first):
426 <itemizedlist>
427 <listitem>
428- <para>The shell specified with --shell</para>
429+ <para>The shell specified with --shell.</para>
430 </listitem>
431 <listitem>
432 <para>
433@@ -141,10 +141,10 @@
434 <para>
435 If the target user has a restricted shell (i.e. the shell field of
436 this user's entry in <filename>/etc/passwd</filename> is not
437- specified in <filename>/etc/shell</filename>), then the
438+ listed in <filename>/etc/shell</filename>), then the
439 <option>--shell</option> option or the <envar>$SHELL</envar>
440- environment variable won't be taken into account unless
441- <command>su</command> is called by the root.
442+ environment variable won't be taken into account, unless
443+ <command>su</command> is called by root.
444 </para>
445 </listitem>
446 </varlistentry>
447diff -Naur shadow-4.0.18.1.orig/man/useradd.8 shadow-4.0.18.1/man/useradd.8
448--- shadow-4.0.18.1.orig/man/useradd.8 2006-07-30 13:54:26.000000000 -0700
449+++ shadow-4.0.18.1/man/useradd.8 2007-09-03 17:30:39.000000000 -0700
450@@ -168,8 +168,6 @@
451 Similarly, if the username already exists in an external user database such as NIS,
452 \fBuseradd\fR
453 will deny the user account creation request.
454-.PP
455-Usernames must begin with a lower case letter or an underscore, and only lower case letters, underscores, dashes, and dollar signs may follow. In regular expression terms: [a\-z_][a\-z0\-9_\-]*[$]
456 .SH "FILES"
457 .TP 3n
458 \fI/etc/passwd\fR
459diff -Naur shadow-4.0.18.1.orig/man/useradd.8.xml shadow-4.0.18.1/man/useradd.8.xml
460--- shadow-4.0.18.1.orig/man/useradd.8.xml 2006-07-23 22:48:36.000000000 -0700
461+++ shadow-4.0.18.1/man/useradd.8.xml 2007-09-03 17:37:35.000000000 -0700
462@@ -36,8 +36,9 @@
463 <para>
464 When invoked without the <option>-D</option> option, the
465 <command>useradd</command> command creates a new user account using
466- the values specified on the command line and the default values from
467- the system. Depending on command line options, the useradd command
468+ the values specified on the command line plus the default values from
469+ the system. Depending on command line options, the
470+ <command>useradd</command> command
471 will update system files and may also create the new user's home
472 directory and copy initial files.
473 </para>
474@@ -78,6 +79,16 @@
475 </varlistentry>
476 <varlistentry>
477 <term>
478+ <option>-D</option>
479+ </term>
480+ <listitem>
481+ <para>
482+ See below, the subsection "Changing the default values".
483+ </para>
484+ </listitem>
485+ </varlistentry>
486+ <varlistentry>
487+ <term>
488 <option>-d</option>, <option>--home</option>
489 <replaceable>HOME_DIR</replaceable>
490 </term>
491@@ -256,10 +267,11 @@
492 <refsect2 id='changing_the_default_values'>
493 <title>Changing the default values</title>
494 <para>
495- When invoked with the <option>-D</option> option,
496- <command>useradd</command> will either display the current default
497- values, or update the default values from the command line. The
498- valid options are
499+ When invoked with only the <option>-D</option> option,
500+ <command>useradd</command> will display the current default values.
501+ When invoked with <option>-D</option> plus other options,
502+ <command>useradd</command> will update the default values for the
503+ specified options. Valid default-changing options are:
504 </para>
505 <variablelist remap='IP'>
506 <varlistentry>
507@@ -269,10 +281,10 @@
508 </term>
509 <listitem>
510 <para>
511- The initial path prefix for a new user's home directory. The
512+ The path prefix for a new user's home directory. The
513 user's name will be affixed to the end of
514- <replaceable>HOME_DIR</replaceable> to create the new
515- directory name if the <option>-d</option> option is not used
516+ <replaceable>BASE_DIR</replaceable> to form the new user's
517+ home directory name, if the <option>-d</option> option is not used
518 when creating a new account.
519 </para>
520 </listitem>
521@@ -318,17 +330,12 @@
522 </term>
523 <listitem>
524 <para>
525- The name of the new user's login shell. The named program will
526- be used for all future new user accounts.
527+ The name of a new user's login shell.
528 </para>
529 </listitem>
530 </varlistentry>
531 </variablelist>
532
533- <para>
534- If no options are specified, <command>useradd</command> displays the
535- current default values.
536- </para>
537 </refsect2>
538 </refsect1>
539
540diff -Naur shadow-4.0.18.1.orig/man/userdel.8.xml shadow-4.0.18.1/man/userdel.8.xml
541--- shadow-4.0.18.1.orig/man/userdel.8.xml 2006-07-23 22:48:36.000000000 -0700
542+++ shadow-4.0.18.1/man/userdel.8.xml 2007-09-03 17:37:35.000000000 -0700
543@@ -24,8 +24,8 @@
544 <title>DESCRIPTION</title>
545 <para>
546 The <command>userdel</command> command modifies the system account
547- files, deleting all entries that refer to <emphasis
548- remap='I'>login_name</emphasis>. The named user must exist.
549+ files, deleting all entries that refer to the user name <emphasis
550+ remap='I'>LOGIN</emphasis>. The named user must exist.
551 </para>
552 </refsect1>
553
554@@ -41,9 +41,10 @@
555 </term>
556 <listitem>
557 <para>
558- This option forces the removal of the user, even if she is still
559+ This option forces the removal of the user account, even if the
560+ user is still
561 logged in. It also forces <command>userdel</command> to remove
562- the user's home directory or her mail spool, even if another
563+ the user's home directory and mail spool, even if another
564 user uses the same home directory or if the mail spool is not
565 owned by the specified user. If
566 <emphasis>USERGROUPS_ENAB</emphasis> is defined to <emphasis
567diff -Naur shadow-4.0.18.1.orig/man/usermod.8.xml shadow-4.0.18.1/man/usermod.8.xml
568--- shadow-4.0.18.1.orig/man/usermod.8.xml 2006-07-23 22:48:36.000000000 -0700
569+++ shadow-4.0.18.1/man/usermod.8.xml 2007-09-03 17:37:35.000000000 -0700
570@@ -127,8 +127,8 @@
571 restrictions as the group given with the <option>-g</option>
572 option. If the user is currently a member of a group which is
573 not listed, the user will be removed from the group. This
574- behaviour can be changed via <option>-a</option> option, which
575- appends user to the current supplementary group list.
576+ behaviour can be changed via the <option>-a</option> option, which
577+ appends the user to the current supplementary group list.
578 </para>
579 </listitem>
580 </varlistentry>
581@@ -143,7 +143,7 @@
582 remap='I'>LOGIN</emphasis> to <emphasis
583 remap='I'>NEW_LOGIN</emphasis>. Nothing else is changed. In
584 particular, the user's home directory name should probably be
585- changed to reflect the new login name.
586+ changed manually to reflect the new login name.
587 </para>
588 </listitem>
589 </varlistentry>
590diff -Naur shadow-4.0.18.1.orig/src/chgpasswd.c shadow-4.0.18.1/src/chgpasswd.c
591--- shadow-4.0.18.1.orig/src/chgpasswd.c 2006-06-20 13:00:04.000000000 -0700
592+++ shadow-4.0.18.1/src/chgpasswd.c 2007-09-03 18:04:15.000000000 -0700
593@@ -243,9 +243,13 @@
594 newpwd = cp;
595 if (!eflg) {
596 if (md5flg) {
597- char salt[12] = "$1$";
598+ char tmp[12];
599+ char salt[15] = "\0";
600
601- strcat (salt, crypt_make_salt ());
602+ strcpy( tmp, crypt_make_salt ());
603+ if( !strncmp( tmp, "$1$", 3) )
604+ strcat( salt, "$1$");
605+ strcat( salt, tmp);
606 cp = pw_encrypt (newpwd, salt);
607 } else
608 cp = pw_encrypt (newpwd, crypt_make_salt ());
609diff -Naur shadow-4.0.18.1.orig/src/chpasswd.c shadow-4.0.18.1/src/chpasswd.c
610--- shadow-4.0.18.1.orig/src/chpasswd.c 2006-06-24 03:18:55.000000000 -0700
611+++ shadow-4.0.18.1/src/chpasswd.c 2007-09-03 18:04:15.000000000 -0700
612@@ -239,9 +239,13 @@
613 newpwd = cp;
614 if (!eflg) {
615 if (md5flg) {
616- char salt[12] = "$1$";
617+ char tmp[12];
618+ char salt[15] = "\0";
619
620- strcat (salt, crypt_make_salt ());
621+ strcpy( tmp, crypt_make_salt ());
622+ if( !strncmp( tmp, "$1$", 3) )
623+ strcat( salt, "$1$");
624+ strcat( salt, tmp);
625 cp = pw_encrypt (newpwd, salt);
626 } else
627 cp = pw_encrypt (newpwd, crypt_make_salt ());
628diff -Naur shadow-4.0.18.1.orig/src/groupmems.c shadow-4.0.18.1/src/groupmems.c
629--- shadow-4.0.18.1.orig/src/groupmems.c 2006-08-03 02:50:01.000000000 -0700
630+++ shadow-4.0.18.1/src/groupmems.c 2007-09-03 17:40:36.000000000 -0700
631@@ -47,8 +47,8 @@
632 #define EXIT_SUCCESS 0 /* success */
633 #define EXIT_USAGE 1 /* invalid command syntax */
634 #define EXIT_GROUP_FILE 2 /* group file access problems */
635-#define EXIT_NOT_ROOT 3 /* not super user */
636-#define EXIT_NOT_EROOT 4 /* not effective super user */
637+#define EXIT_NOT_ROOT 3 /* not superuser */
638+#define EXIT_NOT_EROOT 4 /* not effective superuser */
639 #define EXIT_NOT_PRIMARY 5 /* not primary owner of group */
640 #define EXIT_NOT_MEMBER 6 /* member of group does not exist */
641 #define EXIT_MEMBER_EXISTS 7 /* member of group already exists */
642diff -Naur shadow-4.0.18.1.orig/src/useradd.c shadow-4.0.18.1/src/useradd.c
643--- shadow-4.0.18.1.orig/src/useradd.c 2006-07-28 10:42:48.000000000 -0700
644+++ shadow-4.0.18.1/src/useradd.c 2007-09-03 18:06:19.000000000 -0700
645@@ -203,13 +203,14 @@
646 long gid;
647 char *errptr;
648
649+ struct group* grp = getgrnam (grname);
650+ if (grp)
651+ return grp;
652+
653 gid = strtol (grname, &errptr, 10);
654- if (*errptr || errno == ERANGE || gid < 0) {
655- fprintf (stderr,
656- _("%s: invalid numeric argument '%s'\n"), Prog, grname);
657- exit (E_BAD_ARG);
658- }
659- return getgrnam (grname);
660+ if (*grname != '\0' && *errptr == '\0' && errno != ERANGE && gid >= 0)
661+ return getgrgid (gid);
662+ return getgrgid (gid);
663 }
664
665 static long get_number (const char *numstr)
666diff -Naur shadow-4.0.18.1.orig/src/usermod.c shadow-4.0.18.1/src/usermod.c
667--- shadow-4.0.18.1.orig/src/usermod.c 2006-07-28 10:42:48.000000000 -0700
668+++ shadow-4.0.18.1/src/usermod.c 2007-09-03 18:07:00.000000000 -0700
669@@ -165,13 +165,14 @@
670 long val;
671 char *errptr;
672
673+ struct group* grp = getgrnam (grname);
674+ if (grp)
675+ return grp;
676+
677 val = strtol (grname, &errptr, 10);
678- if (*errptr || errno == ERANGE || val < 0) {
679- fprintf (stderr, _("%s: invalid numeric argument '%s'\n"), Prog,
680- grname);
681- exit (E_BAD_ARG);
682- }
683- return getgrnam (grname);
684+ if (*grname != '\0' && *errptr == '\0' && errno != ERANGE && val >= 0)
685+ return getgrgid (val);
686+ return getgrgid (val);
687 }
688
689 /*
690@@ -908,7 +909,7 @@
691 */
692 int c;
693 static struct option long_options[] = {
694- {"append", required_argument, NULL, 'a'},
695+ {"append", no_argument, NULL, 'a'},
696 {"comment", required_argument, NULL, 'c'},
697 {"home", required_argument, NULL, 'd'},
698 {"expiredate", required_argument, NULL, 'e'},
699
Note: See TracBrowser for help on using the repository browser.