Module Name: src
Committed By: blymn
Date: Wed Nov 28 11:31:27 UTC 2012
Modified Files:
src/usr.sbin/user: user.c
Log Message:
Fix error message when trying to add a group using -g =uid that
that already exists, the old version printed the wrong GID.
To generate a diff of this commit:
cvs rdiff -u -r1.130 -r1.131 src/usr.sbin/user/user.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.sbin/user/user.c
diff -u src/usr.sbin/user/user.c:1.130 src/usr.sbin/user/user.c:1.131
--- src/usr.sbin/user/user.c:1.130 Wed Nov 28 11:20:58 2012
+++ src/usr.sbin/user/user.c Wed Nov 28 11:31:27 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: user.c,v 1.130 2012/11/28 11:20:58 blymn Exp $ */
+/* $NetBSD: user.c,v 1.131 2012/11/28 11:31:27 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.130 2012/11/28 11:20:58 blymn Exp $");
+__RCSID("$NetBSD: user.c,v 1.131 2012/11/28 11:31:27 blymn Exp $");
#endif
#include <sys/types.h>
@@ -1576,7 +1576,7 @@ moduser(char *login_name, char *newlogin
errx(EXIT_FAILURE,
"Can't modify user `%s': "
"gid %d is already in use",
- login_name, up->u_uid);
+ login_name, pwp->pw_uid);
}
pwp->pw_gid = pwp->pw_uid;
if (!creategid(newlogin, pwp->pw_uid, "")) {