Source-Changes-HG archive

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

[src/netbsd-3]: src/usr.sbin/user Pull up revision 1.78 (requested by peter i...



details:   https://anonhg.NetBSD.org/src/rev/71b8ec23ab1d
branches:  netbsd-3
changeset: 575333:71b8ec23ab1d
user:      tron <tron%NetBSD.org@localhost>
date:      Wed Apr 13 15:58:51 2005 +0000

description:
Pull up revision 1.78 (requested by peter in ticket #136):
Allow '_', '.' and '-' in group names, like in login names.
Fixes problem with groupadd(8) for _pflogd; pointed out by Jukka Salmi.
Approved by christos.

diffstat:

 usr.sbin/user/user.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r ed3b0f2c4dcc -r 71b8ec23ab1d usr.sbin/user/user.c
--- a/usr.sbin/user/user.c      Wed Apr 13 15:56:38 2005 +0000
+++ b/usr.sbin/user/user.c      Wed Apr 13 15:58:51 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: user.c,v 1.77 2005/02/05 10:43:14 jmmv Exp $ */
+/* $NetBSD: user.c,v 1.77.2.1 2005/04/13 15:58:51 tron Exp $ */
 
 /*
  * Copyright (c) 1999 Alistair G. Crooks.  All rights reserved.
@@ -35,7 +35,7 @@
 #ifndef lint
 __COPYRIGHT("@(#) Copyright (c) 1999 \
                The NetBSD Foundation, Inc.  All rights reserved.");
-__RCSID("$NetBSD: user.c,v 1.77 2005/02/05 10:43:14 jmmv Exp $");
+__RCSID("$NetBSD: user.c,v 1.77.2.1 2005/04/13 15:58:51 tron Exp $");
 #endif
 
 #include <sys/types.h>
@@ -663,7 +663,7 @@
        unsigned char   *cp;
 
        for (cp = group ; *cp ; cp++) {
-               if (!isalnum(*cp)) {
+               if (!isalnum(*cp) && *cp != '.' && *cp != '_' && *cp != '-') {
                        return 0;
                }
        }



Home | Main Index | Thread Index | Old Index