Source-Changes-HG archive

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

[src/trunk]: src Use ':' as group prefix; suggested by hubertf.



details:   https://anonhg.NetBSD.org/src/rev/7d9367caab2b
branches:  trunk
changeset: 494442:7d9367caab2b
user:      ad <ad%NetBSD.org@localhost>
date:      Thu Jul 06 13:09:46 2000 +0000

description:
Use ':' as group prefix; suggested by hubertf.

diffstat:

 lib/libutil/passwd.c         |  6 +++---
 share/man/man5/passwd.conf.5 |  6 +++---
 usr.bin/passwd/pwd_gensalt.c |  4 ++--
 3 files changed, 8 insertions(+), 8 deletions(-)

diffs (65 lines):

diff -r 81493ba2d38c -r 7d9367caab2b lib/libutil/passwd.c
--- a/lib/libutil/passwd.c      Thu Jul 06 12:56:26 2000 +0000
+++ b/lib/libutil/passwd.c      Thu Jul 06 13:09:46 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: passwd.c,v 1.20 2000/07/06 11:06:12 ad Exp $   */
+/*     $NetBSD: passwd.c,v 1.21 2000/07/06 13:09:47 ad Exp $   */
 
 /*
  * Copyright (c) 1987, 1993, 1994, 1995
@@ -35,7 +35,7 @@
 
 #include <sys/cdefs.h>
 #if defined(LIBC_SCCS) && !defined(lint)
-__RCSID("$NetBSD: passwd.c,v 1.20 2000/07/06 11:06:12 ad Exp $");
+__RCSID("$NetBSD: passwd.c,v 1.21 2000/07/06 13:09:47 ad Exp $");
 #endif /* LIBC_SCCS and not lint */
 
 #include <sys/types.h>
@@ -423,7 +423,7 @@
                /* Now we found our specified key */
                while (read_line(fp, line, LINE_MAX)) {
                        /* Leaving key field */
-                       if (strchr(line, ':') != NULL) {
+                       if (line[0] != '\0' && strchr(line + 1, ':') != NULL) {
                                got = 1;
                                break;
                        }
diff -r 81493ba2d38c -r 7d9367caab2b share/man/man5/passwd.conf.5
--- a/share/man/man5/passwd.conf.5      Thu Jul 06 12:56:26 2000 +0000
+++ b/share/man/man5/passwd.conf.5      Thu Jul 06 13:09:46 2000 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: passwd.conf.5,v 1.1 2000/07/06 11:23:11 ad Exp $
+.\"    $NetBSD: passwd.conf.5,v 1.2 2000/07/06 13:13:53 ad Exp $
 .\"
 .\" Copyright 1997 Niels Provos <provos%physnet.uni-hamburg.de@localhost>
 .\" All rights reserved.
@@ -50,8 +50,8 @@
 is used.
 .Pp
 To differentiate between user and group stanzas, groups are prefixed
-with a single dot
-.Pq Sq \&. .
+with a single colon
+.Pq Sq \&: .
 .Pp
 Some fields and their possible values that can appear in this file are:
 .Bl -tag -width localcipher
diff -r 81493ba2d38c -r 7d9367caab2b usr.bin/passwd/pwd_gensalt.c
--- a/usr.bin/passwd/pwd_gensalt.c      Thu Jul 06 12:56:26 2000 +0000
+++ b/usr.bin/passwd/pwd_gensalt.c      Thu Jul 06 13:09:46 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pwd_gensalt.c,v 1.1 2000/07/06 11:16:50 ad Exp $       */
+/*     $NetBSD: pwd_gensalt.c,v 1.2 2000/07/06 13:09:46 ad Exp $       */
 
 /*
  * Copyright 1997 Niels Provos <provos%physnet.uni-hamburg.de@localhost>
@@ -76,7 +76,7 @@
        /* Try to find an entry for the group */
        if (*option == 0) {
                if ((grp = getgrgid(pwd->pw_gid)) != NULL) {
-                        snprintf(grpkey, LINE_MAX - 1, ".%s", grp->gr_name);
+                        snprintf(grpkey, LINE_MAX - 1, ":%s", grp->gr_name);
                        grpkey[LINE_MAX-1] = 0;
                        pw_getconf(option, LINE_MAX, grpkey, cipher);
                }



Home | Main Index | Thread Index | Old Index