Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/user Google Code In bug fix by Philip Hayes, fixes ...
details: https://anonhg.NetBSD.org/src/rev/8bb35d55787b
branches: trunk
changeset: 782949:8bb35d55787b
user: blymn <blymn%NetBSD.org@localhost>
date: Wed Nov 28 11:20:58 2012 +0000
description:
Google Code In bug fix by Philip Hayes, fixes bin/41049
diffstat:
usr.sbin/user/user.c | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diffs (31 lines):
diff -r 9d55e8d1b260 -r 8bb35d55787b usr.sbin/user/user.c
--- a/usr.sbin/user/user.c Wed Nov 28 09:43:16 2012 +0000
+++ b/usr.sbin/user/user.c Wed Nov 28 11:20:58 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: user.c,v 1.129 2011/12/01 00:34:05 dholland Exp $ */
+/* $NetBSD: user.c,v 1.130 2012/11/28 11:20:58 blymn Exp $ */
/*
* Copyright (c) 1999 Alistair G. Crooks. All rights reserved.
@@ -33,7 +33,7 @@
#ifndef lint
__COPYRIGHT("@(#) Copyright (c) 1999\
The NetBSD Foundation, Inc. All rights reserved.");
-__RCSID("$NetBSD: user.c,v 1.129 2011/12/01 00:34:05 dholland Exp $");
+__RCSID("$NetBSD: user.c,v 1.130 2012/11/28 11:20:58 blymn Exp $");
#endif
#include <sys/types.h>
@@ -1579,6 +1579,12 @@
login_name, up->u_uid);
}
pwp->pw_gid = pwp->pw_uid;
+ if (!creategid(newlogin, pwp->pw_uid, "")) {
+ errx(EXIT_FAILURE,
+ "Could not create group %s "
+ "with uid %d", newlogin,
+ up->u_uid);
+ }
} else if ((grp = getgrnam(up->u_primgrp)) != NULL) {
pwp->pw_gid = grp->gr_gid;
} else if (is_number(up->u_primgrp) &&
Home |
Main Index |
Thread Index |
Old Index