Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: CVS commit: src/usr.sbin/user



Christos Zoulas --> source-changes (2005-07-29 18:16:21 +0000):
> 
> Module Name:  src
> Committed By: christos
> Date:         Fri Jul 29 18:16:21 UTC 2005
> 
> Modified Files:
>       src/usr.sbin/user: user.c
> 
> Log Message:
> Don't make it fatal if the login class doe not exist. From Jukka Salmi.
> 
> 
> To generate a diff of this commit:
> cvs rdiff -r1.83 -r1.84 src/usr.sbin/user/user.c

Hmm, this prints

useradd: Access failed for `/etc/login.conf'; will not validate class `': No 
such file or directory

if login.conf does not exist... IMHO nothing should be printed if
`class' is empty.


Cheers, Jukka


> Please note that diffs are not public domain; they are subject to the
> copyright notices on the relevant files.

-- 
bashian roulette:
$ ((RANDOM%6)) || rm -rf ~
Index: user.c
===================================================================
RCS file: /pub/NetBSD-CVS/src/usr.sbin/user/user.c,v
retrieving revision 1.84
diff -u -r1.84 user.c
--- user.c      29 Jul 2005 18:16:21 -0000      1.84
+++ user.c      30 Jul 2005 08:57:03 -0000
@@ -982,8 +982,10 @@
         */
 
        if (access(PATH_LOGINCONF, R_OK) == -1) {
-               warn("Access failed for `%s'; will not validate class `%s'",
-                   PATH_LOGINCONF, class);
+               if (strlen(class) > 0)
+                       warn("Access failed for `%s'; "
+                           "will not validate class `%s'",
+                           PATH_LOGINCONF, class);
                return 1;
        }
 


Home | Main Index | Thread Index | Old Index