]> granicus.if.org Git - shadow/commitdiff
* src/usermod.c (new_pwent): Document that pw_locate will not fail
authornekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Thu, 14 Jul 2011 13:29:48 +0000 (13:29 +0000)
committernekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Thu, 14 Jul 2011 13:29:48 +0000 (13:29 +0000)
because getpwnam returned successfully.

ChangeLog
src/usermod.c

index 3f95e7a5235eb03d560c8f08791f9fc3224d3193..38b0ed30d7d708e7eab0e4312ca75a4430407916 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -24,6 +24,8 @@
        * man/usermod.8.xml: Document behavior of an empty EXPIRE_DATE.
        * man/usermod.8.xml: Document that the mail spool might have to be
        renamed (as for the homedir)
+       * src/usermod.c (new_pwent): Document that pw_locate will not fail
+       because getpwnam returned successfully.
 
 2011-07-08  Nicolas François  <nicolas.francois@centraliens.net>
 
index d4bd5b160be970edd2368a44c7d683c9ef8484a4..1f3ebb76dc43edf707540a542132e3afe101ad06 100644 (file)
@@ -402,6 +402,10 @@ static void new_pwent (struct passwd *pwent)
 {
        if (lflg) {
                if (pw_locate (user_newname) != NULL) {
+                       /* This should never happen.
+                        * It was already checked that the user doesn't
+                        * exist on the system.
+                        */
                        fprintf (stderr,
                                 _("%s: user '%s' already exists in %s\n"),
                                 Prog, user_newname, pw_dbname ());