Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/user Allow '_', '.' and '-' in group names, like in...
details: https://anonhg.NetBSD.org/src/rev/a32a78232edb
branches: trunk
changeset: 580036:a32a78232edb
user: peter <peter%NetBSD.org@localhost>
date: Tue Apr 05 22:03:57 2005 +0000
description:
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 13da6d49ec46 -r a32a78232edb usr.sbin/user/user.c
--- a/usr.sbin/user/user.c Tue Apr 05 20:56:58 2005 +0000
+++ b/usr.sbin/user/user.c Tue Apr 05 22:03:57 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.78 2005/04/05 22:03:57 peter 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.78 2005/04/05 22:03:57 peter 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