Module Name: src
Committed By: enami
Date: Wed Oct 24 01:12:52 UTC 2012
Modified Files:
src/sbin/chown: chown.c
Log Message:
The id chgrp command is required to change is not uid but gid.
To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sbin/chown/chown.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sbin/chown/chown.c
diff -u src/sbin/chown/chown.c:1.7 src/sbin/chown/chown.c:1.8
--- src/sbin/chown/chown.c:1.7 Tue Oct 23 17:55:46 2012
+++ src/sbin/chown/chown.c Wed Oct 24 01:12:51 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: chown.c,v 1.7 2012/10/23 17:55:46 christos Exp $ */
+/* $NetBSD: chown.c,v 1.8 2012/10/24 01:12:51 enami Exp $ */
/*
* Copyright (c) 1988, 1993, 1994, 2003
@@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 19
#if 0
static char sccsid[] = "@(#)chown.c 8.8 (Berkeley) 4/4/94";
#else
-__RCSID("$NetBSD: chown.c,v 1.7 2012/10/23 17:55:46 christos Exp $");
+__RCSID("$NetBSD: chown.c,v 1.8 2012/10/24 01:12:51 enami Exp $");
#endif
#endif /* not lint */
@@ -181,9 +181,9 @@ main(int argc, char **argv)
if (stat(reference, &st) == -1)
err(EXIT_FAILURE, "Cannot stat `%s'", reference);
- uid = st.st_uid;
if (ischown)
- gid = st.st_gid;
+ uid = st.st_uid;
+ gid = st.st_gid;
}
if ((ftsp = fts_open(argv, fts_options, NULL)) == NULL)