]> git.cameronkatri.com Git - pw-darwin.git/blobdiff - libc/gen/pw_scan.c
Set the pw_class field to NULL when scanning the non-master passwd file.
[pw-darwin.git] / libc / gen / pw_scan.c
index 82679311429fbd27dc81eea88132bebda96de70c..01146e9111d102670774dd2f3a3181599ddcb665 100644 (file)
  * SUCH DAMAGE.
  */
 
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)pw_scan.c  8.3 (Berkeley) 4/2/94";
-#endif /* LIBC_SCCS and not lint */
 #include <sys/cdefs.h>
+__SCCSID("@(#)pw_scan.c        8.3 (Berkeley) 4/2/94");
 __FBSDID("$FreeBSD$");
 
 /*
@@ -44,9 +42,7 @@ __FBSDID("$FreeBSD$");
 
 #include <err.h>
 #include <errno.h>
-#include <fcntl.h>
 #include <pwd.h>
-#include <stdio.h>
 #include <string.h>
 #include <stdlib.h>
 #include <unistd.h>
@@ -174,7 +170,8 @@ __pw_scan(char *bp, struct passwd *pw, int flags)
                if (p[0])
                        pw->pw_fields |= _PWF_EXPIRE;
                pw->pw_expire = atol(p);
-       }
+       } else
+               pw->pw_class = NULL;
        if (!(pw->pw_gecos = strsep(&bp, ":")))         /* gecos */
                goto fmt;
        if (pw->pw_gecos[0])