CVS commit: src/sbin/chown

2023-05-20 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat May 20 09:41:34 UTC 2023

Modified Files:
src/sbin/chown: chgrp.1

Log Message:
ALso fix chgrp Synopsis to include -d option


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sbin/chown/chgrp.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sbin/chown

2023-05-20 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat May 20 09:41:34 UTC 2023

Modified Files:
src/sbin/chown: chgrp.1

Log Message:
ALso fix chgrp Synopsis to include -d option


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sbin/chown/chgrp.1

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/chgrp.1
diff -u src/sbin/chown/chgrp.1:1.9 src/sbin/chown/chgrp.1:1.10
--- src/sbin/chown/chgrp.1:1.9	Thu May  4 17:07:56 2023
+++ src/sbin/chown/chgrp.1	Sat May 20 09:41:34 2023
@@ -29,9 +29,9 @@
 .\" SUCH DAMAGE.
 .\"
 .\" from: @(#)chgrp.1	8.3 (Berkeley) 3/31/94
-.\"	$NetBSD: chgrp.1,v 1.9 2023/05/04 17:07:56 pgoyette Exp $
+.\"	$NetBSD: chgrp.1,v 1.10 2023/05/20 09:41:34 pgoyette Exp $
 .\"
-.Dd May 1, 2023
+.Dd May 19, 2023
 .Dt CHGRP 1
 .Os
 .Sh NAME
@@ -43,7 +43,7 @@
 .Fl R
 .Op Fl H | Fl L | Fl P
 .Oc
-.Op Fl fhv
+.Op Fl dfhv
 .Ar group
 .Ar
 .Nm
@@ -51,7 +51,7 @@
 .Fl R
 .Op Fl H | Fl L | Fl P
 .Oc
-.Op Fl fhv
+.Op Fl dfhv
 .Fl Fl reference=rfile
 .Ar
 .Sh DESCRIPTION



CVS commit: src/sbin/chown

2023-05-19 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat May 20 00:54:15 UTC 2023

Modified Files:
src/sbin/chown: chown.8

Log Message:
dd -d to the Synopsis


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sbin/chown/chown.8

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sbin/chown

2023-05-19 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sat May 20 00:54:15 UTC 2023

Modified Files:
src/sbin/chown: chown.8

Log Message:
dd -d to the Synopsis


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sbin/chown/chown.8

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.8
diff -u src/sbin/chown/chown.8:1.13 src/sbin/chown/chown.8:1.14
--- src/sbin/chown/chown.8:1.13	Thu May  4 17:07:56 2023
+++ src/sbin/chown/chown.8	Sat May 20 00:54:15 2023
@@ -26,9 +26,9 @@
 .\" SUCH DAMAGE.
 .\"
 .\" from: @(#)chown.8	8.3 (Berkeley) 3/31/94
-.\"	$NetBSD: chown.8,v 1.13 2023/05/04 17:07:56 pgoyette Exp $
+.\"	$NetBSD: chown.8,v 1.14 2023/05/20 00:54:15 pgoyette Exp $
 .\"
-.Dd May 1, 2023
+.Dd May 19, 2023
 .Dt CHOWN 8
 .Os
 .Sh NAME
@@ -40,7 +40,7 @@
 .Fl R
 .Op Fl H | Fl L | Fl P
 .Oc
-.Op Fl fhv
+.Op Fl dfhv
 .Ar owner Ns Op Ar :group
 .Ar
 .Nm
@@ -48,7 +48,7 @@
 .Fl R
 .Op Fl H | Fl L | Fl P
 .Oc
-.Op Fl fhv
+.Op Fl dfhv
 .Ar :group
 .Ar
 .Nm
@@ -56,7 +56,7 @@
 .Fl R
 .Op Fl H | Fl L | Fl P
 .Oc
-.Op Fl fhv
+.Op Fl dfhv
 .Fl Fl reference=rfile
 .Ar
 .Sh DESCRIPTION



CVS commit: src/sbin/chown

2023-05-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu May  4 18:34:55 UTC 2023

Modified Files:
src/sbin/chown: chown.c

Log Message:
KNF: no space after ( and before ), constants on the RHS (like everywhere else
in this file).


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 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.11 src/sbin/chown/chown.c:1.12
--- src/sbin/chown/chown.c:1.11	Thu May  4 14:04:55 2023
+++ src/sbin/chown/chown.c	Thu May  4 14:34:55 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: chown.c,v 1.11 2023/05/04 18:04:55 martin Exp $	*/
+/*	$NetBSD: chown.c,v 1.12 2023/05/04 18:34:55 christos 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.11 2023/05/04 18:04:55 martin Exp $");
+__RCSID("$NetBSD: chown.c,v 1.12 2023/05/04 18:34:55 christos Exp $");
 #endif
 #endif /* not lint */
 
@@ -242,9 +242,9 @@ main(int argc, char **argv)
 		 * attempt to update.
 		 */
 		if (dflag &&
-		( (uid_t)-1 == uid || p->fts_statp->st_uid == uid ) &&
-		( (gid_t)-1 == gid || p->fts_statp->st_gid == gid ) &&
-		( p->fts_statp->st_mode & 07000 ) == 0)
+		(uid == (uid_t)-1 || p->fts_statp->st_uid == uid) &&
+		(gid == (gid_t)-1 || p->fts_statp->st_gid == gid) &&
+		(p->fts_statp->st_mode & 07000) == 0)
 			continue;
 
 		if ((*change_owner)(p->fts_accpath, uid, gid) && !fflag) {



CVS commit: src/sbin/chown

2023-05-04 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu May  4 18:34:55 UTC 2023

Modified Files:
src/sbin/chown: chown.c

Log Message:
KNF: no space after ( and before ), constants on the RHS (like everywhere else
in this file).


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sbin/chown/chown.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sbin/chown

2023-05-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu May  4 18:04:55 UTC 2023

Modified Files:
src/sbin/chown: chown.c

Log Message:
Cast -1 to expected type and fix a edititing mishap to make this build.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 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.10 src/sbin/chown/chown.c:1.11
--- src/sbin/chown/chown.c:1.10	Thu May  4 17:07:56 2023
+++ src/sbin/chown/chown.c	Thu May  4 18:04:55 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: chown.c,v 1.10 2023/05/04 17:07:56 pgoyette Exp $	*/
+/*	$NetBSD: chown.c,v 1.11 2023/05/04 18:04:55 martin 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.10 2023/05/04 17:07:56 pgoyette Exp $");
+__RCSID("$NetBSD: chown.c,v 1.11 2023/05/04 18:04:55 martin Exp $");
 #endif
 #endif /* not lint */
 
@@ -242,9 +242,9 @@ main(int argc, char **argv)
 		 * attempt to update.
 		 */
 		if (dflag &&
-		( -1 == uid || p->fts_statp->st_uid == uid ) &&
-		( -1 == gid || p->fts_statp->st_gid == gid ) &&
-		( p->fts_statp->st_mode & 07000 ) == 0))
+		( (uid_t)-1 == uid || p->fts_statp->st_uid == uid ) &&
+		( (gid_t)-1 == gid || p->fts_statp->st_gid == gid ) &&
+		( p->fts_statp->st_mode & 07000 ) == 0)
 			continue;
 
 		if ((*change_owner)(p->fts_accpath, uid, gid) && !fflag) {



CVS commit: src/sbin/chown

2023-05-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu May  4 18:04:55 UTC 2023

Modified Files:
src/sbin/chown: chown.c

Log Message:
Cast -1 to expected type and fix a edititing mishap to make this build.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sbin/chown/chown.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sbin/chown

2023-05-04 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu May  4 17:07:57 UTC 2023

Modified Files:
src/sbin/chown: chgrp.1 chown.8 chown.c

Log Message:
Add a -d flag to avoid changing a file's owner/group to the current
value.  This avoids some unnecessary operations on the file.

As discussed on tech-userlevel@


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sbin/chown/chgrp.1
cvs rdiff -u -r1.12 -r1.13 src/sbin/chown/chown.8
cvs rdiff -u -r1.9 -r1.10 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/chgrp.1
diff -u src/sbin/chown/chgrp.1:1.8 src/sbin/chown/chgrp.1:1.9
--- src/sbin/chown/chgrp.1:1.8	Tue Jul  4 06:52:20 2017
+++ src/sbin/chown/chgrp.1	Thu May  4 17:07:56 2023
@@ -29,9 +29,9 @@
 .\" SUCH DAMAGE.
 .\"
 .\" from: @(#)chgrp.1	8.3 (Berkeley) 3/31/94
-.\"	$NetBSD: chgrp.1,v 1.8 2017/07/04 06:52:20 wiz Exp $
+.\"	$NetBSD: chgrp.1,v 1.9 2023/05/04 17:07:56 pgoyette Exp $
 .\"
-.Dd October 22, 2012
+.Dd May 1, 2023
 .Dt CHGRP 1
 .Os
 .Sh NAME
@@ -86,6 +86,10 @@ option is specified, no symbolic links a
 .It Fl R
 Change the group ID for the file hierarchies rooted
 in the files instead of just the files themselves.
+.It Fl d
+Do not attempt to update a file's group, nor update the file's
+set-user-id or set-group-id bits if they are already set to the
+desired values.
 .It Fl f
 The force option ignores errors, except for usage errors and doesn't
 query about strange modes (unless the user does not have proper permissions).
@@ -164,6 +168,8 @@ utility is expected to be POSIX 1003.2 c
 .Pp
 The
 .Fl v
-option and the use of ``#'' to force a numeric group ID
+and
+.Fl d
+options and the use of ``#'' to force a numeric group ID
 are extensions to
 .St -p1003.2 .

Index: src/sbin/chown/chown.8
diff -u src/sbin/chown/chown.8:1.12 src/sbin/chown/chown.8:1.13
--- src/sbin/chown/chown.8:1.12	Tue Jul  4 06:53:12 2017
+++ src/sbin/chown/chown.8	Thu May  4 17:07:56 2023
@@ -26,9 +26,9 @@
 .\" SUCH DAMAGE.
 .\"
 .\" from: @(#)chown.8	8.3 (Berkeley) 3/31/94
-.\"	$NetBSD: chown.8,v 1.12 2017/07/04 06:53:12 wiz Exp $
+.\"	$NetBSD: chown.8,v 1.13 2023/05/04 17:07:56 pgoyette Exp $
 .\"
-.Dd September 11, 2016
+.Dd May 1, 2023
 .Dt CHOWN 8
 .Os
 .Sh NAME
@@ -84,6 +84,9 @@ option is specified, no symbolic links a
 .It Fl R
 Change the user ID and/or the group ID for the file hierarchies rooted
 in the files instead of just the files themselves.
+.It Fl d
+Do not attempt to update a file's owner or group or its set-user-id
+and set-group-id bits if they are all already set to the desired values.
 .It Fl f
 Do not report any failure to change file owner or group, nor modify
 the exit status to reflect such failures.
@@ -174,7 +177,9 @@ command is expected to be POSIX 1003.2 c
 .Pp
 The
 .Fl v
-option and the use of ``#'' to force a numeric lookup
+and
+.Fl d
+options and the use of ``#'' to force a numeric lookup
 are extensions to
 .St -p1003.2 .
 .Sh HISTORY

Index: src/sbin/chown/chown.c
diff -u src/sbin/chown/chown.c:1.9 src/sbin/chown/chown.c:1.10
--- src/sbin/chown/chown.c:1.9	Fri Apr 28 09:56:45 2023
+++ src/sbin/chown/chown.c	Thu May  4 17:07:56 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: chown.c,v 1.9 2023/04/28 09:56:45 pgoyette Exp $	*/
+/*	$NetBSD: chown.c,v 1.10 2023/05/04 17:07:56 pgoyette 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.9 2023/04/28 09:56:45 pgoyette Exp $");
+__RCSID("$NetBSD: chown.c,v 1.10 2023/05/04 17:07:56 pgoyette Exp $");
 #endif
 #endif /* not lint */
 
@@ -82,7 +82,7 @@ main(int argc, char **argv)
 {
 	FTS *ftsp;
 	FTSENT *p;
-	int Hflag, Lflag, Rflag, ch, fflag, fts_options, hflag, rval, vflag;
+	int Hflag, Lflag, Rflag, ch, fflag, fts_options, hflag, rval, vflag, dflag;
 	char *cp, *reference;
 	int (*change_owner)(const char *, uid_t, gid_t);
 
@@ -94,13 +94,16 @@ main(int argc, char **argv)
 	ischown = (myname[2] == 'o');
 	reference = NULL;
 
-	Hflag = Lflag = Rflag = fflag = hflag = vflag = 0;
-	while ((ch = getopt_long(argc, argv, "HLPRfhv",
+	Hflag = Lflag = Rflag = fflag = hflag = vflag = dflag = 0;
+	while ((ch = getopt_long(argc, argv, "HLPRdfhv",
 	chown_longopts, NULL)) != -1)
 		switch (ch) {
 		case 1:
 			reference = optarg;
 			break;
+		case 'd':
+			dflag = 1;
+			break;
 		case 'H':
 			Hflag = 1;
 			Lflag = 0;
@@ -232,6 +235,18 @@ main(int argc, char **argv)
 			break;
 		}
 
+		/*
+		 * If dflag was set, and the owner and group are already
+		 * set to the right values and the set-user-id and
+		 * set-group-id bits are both already clear, skip any
+		 * attempt to update.
+		 */
+		if (dflag &&
+		( -1 == uid || p->fts_statp->st_uid == uid ) &&
+		( -1 == gid || p->fts_statp->st_gid == gid ) &&
+		( 

CVS commit: src/sbin/chown

2023-05-04 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Thu May  4 17:07:57 UTC 2023

Modified Files:
src/sbin/chown: chgrp.1 chown.8 chown.c

Log Message:
Add a -d flag to avoid changing a file's owner/group to the current
value.  This avoids some unnecessary operations on the file.

As discussed on tech-userlevel@


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sbin/chown/chgrp.1
cvs rdiff -u -r1.12 -r1.13 src/sbin/chown/chown.8
cvs rdiff -u -r1.9 -r1.10 src/sbin/chown/chown.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sbin/chown

2023-04-28 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Apr 28 09:56:45 UTC 2023

Modified Files:
src/sbin/chown: chown.c

Log Message:
Fix typo in comment


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 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.8 src/sbin/chown/chown.c:1.9
--- src/sbin/chown/chown.c:1.8	Wed Oct 24 01:12:51 2012
+++ src/sbin/chown/chown.c	Fri Apr 28 09:56:45 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: chown.c,v 1.8 2012/10/24 01:12:51 enami Exp $	*/
+/*	$NetBSD: chown.c,v 1.9 2023/04/28 09:56:45 pgoyette 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.8 2012/10/24 01:12:51 enami Exp $");
+__RCSID("$NetBSD: chown.c,v 1.9 2023/04/28 09:56:45 pgoyette Exp $");
 #endif
 #endif /* not lint */
 
@@ -224,7 +224,7 @@ main(int argc, char **argv)
 			/*
 			 * The only symlinks that end up here are ones that
 			 * don't point to anything.  Note that if we are
-			 * doing a phisycal walk, we never reach here unless
+			 * doing a physical walk, we never reach here unless
 			 * we asked to follow explicitly.
 			 */
 			continue;



CVS commit: src/sbin/chown

2023-04-28 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Fri Apr 28 09:56:45 UTC 2023

Modified Files:
src/sbin/chown: chown.c

Log Message:
Fix typo in comment


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sbin/chown/chown.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sbin/chown

2017-07-04 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jul  4 06:53:12 UTC 2017

Modified Files:
src/sbin/chown: chown.8

Log Message:
Add EXIT STATUS section. Use Ex. Sort sections.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sbin/chown/chown.8

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.8
diff -u src/sbin/chown/chown.8:1.11 src/sbin/chown/chown.8:1.12
--- src/sbin/chown/chown.8:1.11	Mon Jul  3 21:33:41 2017
+++ src/sbin/chown/chown.8	Tue Jul  4 06:53:12 2017
@@ -26,7 +26,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\" from: @(#)chown.8	8.3 (Berkeley) 3/31/94
-.\"	$NetBSD: chown.8,v 1.11 2017/07/03 21:33:41 wiz Exp $
+.\"	$NetBSD: chown.8,v 1.12 2017/07/04 06:53:12 wiz Exp $
 .\"
 .Dd September 11, 2016
 .Dt CHOWN 8
@@ -151,10 +151,8 @@ Unless invoked by the super-user,
 clears the set-user-id and set-group-id bits on a file to prevent
 accidental or mischievous creation of set-user-id and set-group-id
 programs.
-.Pp
-The
-.Nm
-utility exits 0 on success, and >0 if an error occurs.
+.Sh EXIT STATUS
+.Ex -std chown
 .Sh COMPATIBILITY
 Previous versions of the
 .Nm
@@ -169,11 +167,6 @@ group names may contain the dot characte
 .Xr lchown 2 ,
 .Xr fts 3 ,
 .Xr symlink 7
-.Sh HISTORY
-A
-.Nm
-utility appeared in
-.At v1 .
 .Sh STANDARDS
 The
 .Nm
@@ -184,3 +177,8 @@ The
 option and the use of ``#'' to force a numeric lookup
 are extensions to
 .St -p1003.2 .
+.Sh HISTORY
+A
+.Nm
+utility appeared in
+.At v1 .



CVS commit: src/sbin/chown

2017-07-04 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jul  4 06:53:12 UTC 2017

Modified Files:
src/sbin/chown: chown.8

Log Message:
Add EXIT STATUS section. Use Ex. Sort sections.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sbin/chown/chown.8

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sbin/chown

2017-07-04 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jul  4 06:52:20 UTC 2017

Modified Files:
src/sbin/chown: chgrp.1

Log Message:
Add EXIT STATUS section. Use Ex.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sbin/chown/chgrp.1

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/chgrp.1
diff -u src/sbin/chown/chgrp.1:1.7 src/sbin/chown/chgrp.1:1.8
--- src/sbin/chown/chgrp.1:1.7	Mon Jul  3 21:33:41 2017
+++ src/sbin/chown/chgrp.1	Tue Jul  4 06:52:20 2017
@@ -29,7 +29,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\" from: @(#)chgrp.1	8.3 (Berkeley) 3/31/94
-.\"	$NetBSD: chgrp.1,v 1.7 2017/07/03 21:33:41 wiz Exp $
+.\"	$NetBSD: chgrp.1,v 1.8 2017/07/04 06:52:20 wiz Exp $
 .\"
 .Dd October 22, 2012
 .Dt CHGRP 1
@@ -142,15 +142,13 @@ Unless invoked by the super-user,
 clears the set-user-id and set-group-id bits on a file to prevent
 accidental or mischievous creation of set-user-id or set-group-id
 programs.
-.Pp
-The
-.Nm
-utility exits 0 on success, and >0 if an error occurs.
 .Sh FILES
 .Bl -tag -width /etc/group -compact
 .It Pa /etc/group
 Group ID file
 .El
+.Sh EXIT STATUS
+.Ex -std chgrp
 .Sh SEE ALSO
 .Xr chown 2 ,
 .Xr lchown 2 ,



CVS commit: src/sbin/chown

2017-07-04 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jul  4 06:52:20 UTC 2017

Modified Files:
src/sbin/chown: chgrp.1

Log Message:
Add EXIT STATUS section. Use Ex.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sbin/chown/chgrp.1

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sbin/chown

2016-09-10 Thread Sevan Janiyan
Module Name:src
Committed By:   sevan
Date:   Sun Sep 11 01:23:26 UTC 2016

Modified Files:
src/sbin/chown: chown.8

Log Message:
Document the version chown first appeared.
Replace contractions highlighted by textproc/igor.
Bump date.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sbin/chown/chown.8

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sbin/chown

2016-09-10 Thread Sevan Janiyan
Module Name:src
Committed By:   sevan
Date:   Sun Sep 11 01:23:26 UTC 2016

Modified Files:
src/sbin/chown: chown.8

Log Message:
Document the version chown first appeared.
Replace contractions highlighted by textproc/igor.
Bump date.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sbin/chown/chown.8

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.8
diff -u src/sbin/chown/chown.8:1.9 src/sbin/chown/chown.8:1.10
--- src/sbin/chown/chown.8:1.9	Tue Jul 12 10:56:01 2016
+++ src/sbin/chown/chown.8	Sun Sep 11 01:23:26 2016
@@ -26,9 +26,9 @@
 .\" SUCH DAMAGE.
 .\"
 .\" from: @(#)chown.8	8.3 (Berkeley) 3/31/94
-.\"	$NetBSD: chown.8,v 1.9 2016/07/12 10:56:01 wiz Exp $
+.\"	$NetBSD: chown.8,v 1.10 2016/09/11 01:23:26 sevan Exp $
 .\"
-.Dd July 12, 2016
+.Dd September 11, 2016
 .Dt CHOWN 8
 .Os
 .Sh NAME
@@ -85,7 +85,7 @@ option is specified, no symbolic links a
 Change the user ID and/or the group ID for the file hierarchies rooted
 in the files instead of just the files themselves.
 .It Fl f
-Don't report any failure to change file owner or group, nor modify
+Do not report any failure to change file owner or group, nor modify
 the exit status to reflect such failures.
 .It Fl h
 If
@@ -138,7 +138,7 @@ The
 .Ar group
 may be either a group name or a numeric group ID.
 Since it is valid to have a user or group name that is numeric (and
-doesn't have the numeric ID that matches its name) the name lookup
+does not have the numeric ID that matches its name) the name lookup
 is always done first.
 Preceding an ID with a ``#'' character will force it to be taken
 as a number.
@@ -169,6 +169,11 @@ group names may contain the dot characte
 .Xr lchown 2 ,
 .Xr fts 3 ,
 .Xr symlink 7
+.Sh HISTORY
+A
+.Nm
+utility appeared in
+.At v1 .
 .Sh STANDARDS
 The
 .Nm



CVS commit: src/sbin/chown

2016-07-12 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jul 12 10:56:01 UTC 2016

Modified Files:
src/sbin/chown: chown.8

Log Message:
Bump date for previous.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sbin/chown/chown.8

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.8
diff -u src/sbin/chown/chown.8:1.8 src/sbin/chown/chown.8:1.9
--- src/sbin/chown/chown.8:1.8	Tue Jul 12 09:59:42 2016
+++ src/sbin/chown/chown.8	Tue Jul 12 10:56:01 2016
@@ -26,9 +26,9 @@
 .\" SUCH DAMAGE.
 .\"
 .\" from: @(#)chown.8	8.3 (Berkeley) 3/31/94
-.\"	$NetBSD: chown.8,v 1.8 2016/07/12 09:59:42 zafer Exp $
+.\"	$NetBSD: chown.8,v 1.9 2016/07/12 10:56:01 wiz Exp $
 .\"
-.Dd October 22, 2012
+.Dd July 12, 2016
 .Dt CHOWN 8
 .Os
 .Sh NAME



CVS commit: src/sbin/chown

2016-07-12 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Jul 12 10:56:01 UTC 2016

Modified Files:
src/sbin/chown: chown.8

Log Message:
Bump date for previous.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sbin/chown/chown.8

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sbin/chown

2016-07-12 Thread Zafer Aydogan
Module Name:src
Committed By:   zafer
Date:   Tue Jul 12 09:59:42 UTC 2016

Modified Files:
src/sbin/chown: chown.8

Log Message:
improve description regarding symbolic links. ok @wiz.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sbin/chown/chown.8

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sbin/chown

2016-07-12 Thread Zafer Aydogan
Module Name:src
Committed By:   zafer
Date:   Tue Jul 12 09:59:42 UTC 2016

Modified Files:
src/sbin/chown: chown.8

Log Message:
improve description regarding symbolic links. ok @wiz.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sbin/chown/chown.8

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.8
diff -u src/sbin/chown/chown.8:1.7 src/sbin/chown/chown.8:1.8
--- src/sbin/chown/chown.8:1.7	Tue Dec 17 09:54:08 2013
+++ src/sbin/chown/chown.8	Tue Jul 12 09:59:42 2016
@@ -26,7 +26,7 @@
 .\" SUCH DAMAGE.
 .\"
 .\" from: @(#)chown.8	8.3 (Berkeley) 3/31/94
-.\"	$NetBSD: chown.8,v 1.7 2013/12/17 09:54:08 apb Exp $
+.\"	$NetBSD: chown.8,v 1.8 2016/07/12 09:59:42 zafer Exp $
 .\"
 .Dd October 22, 2012
 .Dt CHOWN 8
@@ -62,6 +62,9 @@
 .Sh DESCRIPTION
 .Nm
 sets the user ID and/or the group ID of the specified files.
+Symbolic links named by arguments are silently left unchanged unless
+.Fl h
+is used.
 .Pp
 The options are as follows:
 .Bl -tag -width Ds



CVS commit: src/sbin/chown

2012-10-23 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Oct 23 17:31:00 UTC 2012

Modified Files:
src/sbin/chown: chown.8

Log Message:
+ ly


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sbin/chown/chown.8

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.8
diff -u src/sbin/chown/chown.8:1.5 src/sbin/chown/chown.8:1.6
--- src/sbin/chown/chown.8:1.5	Mon Oct 22 18:02:26 2012
+++ src/sbin/chown/chown.8	Tue Oct 23 17:30:59 2012
@@ -26,7 +26,7 @@
 .\ SUCH DAMAGE.
 .\
 .\ from: @(#)chown.8	8.3 (Berkeley) 3/31/94
-.\	$NetBSD: chown.8,v 1.5 2012/10/22 18:02:26 christos Exp $
+.\	$NetBSD: chown.8,v 1.6 2012/10/23 17:30:59 wiz Exp $
 .\
 .Dd October 22, 2012
 .Dt CHOWN 8
@@ -115,7 +115,7 @@ The
 .Ar owner
 and
 .Ar group
-operands are both optional, however, one must be specified; alternative
+operands are both optional, however, one must be specified; alternatively,
 both the owner and group may be specified using a reference
 .Ar rfile
 specified using the



CVS commit: src/sbin/chown

2012-10-23 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Oct 23 17:55:46 UTC 2012

Modified Files:
src/sbin/chown: chown.c

Log Message:
- use {g,s}etprogname()
- fix usage


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 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.6 src/sbin/chown/chown.c:1.7
--- src/sbin/chown/chown.c:1.6	Mon Oct 22 14:02:26 2012
+++ src/sbin/chown/chown.c	Tue Oct 23 13:55:46 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: chown.c,v 1.6 2012/10/22 18:02:26 christos Exp $	*/
+/*	$NetBSD: chown.c,v 1.7 2012/10/23 17:55:46 christos 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.6 2012/10/22 18:02:26 christos Exp $);
+__RCSID($NetBSD: chown.c,v 1.7 2012/10/23 17:55:46 christos Exp $);
 #endif
 #endif /* not lint */
 
@@ -68,7 +68,7 @@ __dead static void	usage(void);
 static uid_t uid;
 static gid_t gid;
 static int ischown;
-static char *myname;
+static const char *myname;
 
 struct option chown_longopts[] = {
 	{ reference,		required_argument,	0,
@@ -86,9 +86,11 @@ main(int argc, char **argv)
 	char *cp, *reference;
 	int (*change_owner)(const char *, uid_t, gid_t);
 
+	setprogname(*argv);
+
 	(void)setlocale(LC_ALL, );
 
-	myname = (cp = strrchr(*argv, '/')) ? cp + 1 : *argv;
+	myname = getprogname();
 	ischown = (myname[2] == 'o');
 	reference = NULL;
 
@@ -292,7 +294,9 @@ usage(void)
 {
 
 	(void)fprintf(stderr,
-	usage: %s [-R [-H | -L | -P]] [-fhv] %s file ...\n,
-	myname, ischown ? [owner][:group] : group);
+	Usage: %s [-R [-H | -L | -P]] [-fhv] %s file ...\n
+	\t%s [-R [-H | -L | -P]] [-fhv] --reference=rfile file ...\n,
+	myname, ischown ? owner:group|owner|:group : group,
+	myname);
 	exit(EXIT_FAILURE);
 }



CVS commit: src/sbin/chown

2012-10-23 Thread enami tsugutomo
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)



CVS commit: src/sbin/chown

2012-10-23 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Oct 23 17:31:00 UTC 2012

Modified Files:
src/sbin/chown: chown.8

Log Message:
+ ly


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sbin/chown/chown.8

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sbin/chown

2012-10-23 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Oct 23 17:55:46 UTC 2012

Modified Files:
src/sbin/chown: chown.c

Log Message:
- use {g,s}etprogname()
- fix usage


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sbin/chown/chown.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sbin/chown

2012-10-23 Thread enami tsugutomo
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.



CVS commit: src/sbin/chown

2012-10-22 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Oct 22 18:02:26 UTC 2012

Modified Files:
src/sbin/chown: chgrp.1 chown.8 chown.c

Log Message:
support --reference=rfile


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sbin/chown/chgrp.1 src/sbin/chown/chown.8
cvs rdiff -u -r1.5 -r1.6 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/chgrp.1
diff -u src/sbin/chown/chgrp.1:1.4 src/sbin/chown/chgrp.1:1.5
--- src/sbin/chown/chgrp.1:1.4	Thu Jan 13 17:28:36 2011
+++ src/sbin/chown/chgrp.1	Mon Oct 22 14:02:26 2012
@@ -29,9 +29,9 @@
 .\ SUCH DAMAGE.
 .\
 .\ from: @(#)chgrp.1	8.3 (Berkeley) 3/31/94
-.\	$NetBSD: chgrp.1,v 1.4 2011/01/13 22:28:36 haad Exp $
+.\	$NetBSD: chgrp.1,v 1.5 2012/10/22 18:02:26 christos Exp $
 .\
-.Dd September 25, 2003
+.Dd October 22, 2012
 .Dt CHGRP 1
 .Os
 .Sh NAME
@@ -45,7 +45,15 @@
 .Oc
 .Op Fl fhv
 .Ar group
-.Ar file ...
+.Ar
+.Nm
+.Oo
+.Fl R
+.Op Fl H | Fl L | Fl P
+.Oc
+.Op Fl fhv
+.Fl Fl reference=rfile
+.Ar
 .Sh DESCRIPTION
 The
 .Nm
@@ -53,7 +61,12 @@ utility sets the group ID of the file na
 .Ar file
 operand to the
 .Ar group
-ID specified by the group operand.
+ID specified by the group operand,
+or to the group of the given
+.Ar rfile ,
+specified by the
+.Fl Fl reference
+argument.
 .Pp
 Options:
 .Bl -tag -width Ds
Index: src/sbin/chown/chown.8
diff -u src/sbin/chown/chown.8:1.4 src/sbin/chown/chown.8:1.5
--- src/sbin/chown/chown.8:1.4	Thu Jan 13 17:28:36 2011
+++ src/sbin/chown/chown.8	Mon Oct 22 14:02:26 2012
@@ -26,9 +26,9 @@
 .\ SUCH DAMAGE.
 .\
 .\ from: @(#)chown.8	8.3 (Berkeley) 3/31/94
-.\	$NetBSD: chown.8,v 1.4 2011/01/13 22:28:36 haad Exp $
+.\	$NetBSD: chown.8,v 1.5 2012/10/22 18:02:26 christos Exp $
 .\
-.Dd December 9, 2005
+.Dd October 22, 2012
 .Dt CHOWN 8
 .Os
 .Sh NAME
@@ -42,7 +42,7 @@
 .Oc
 .Op Fl fhv
 .Ar owner Ns Op Ar :group
-.Ar file ...
+.Ar
 .Nm
 .Oo
 .Fl R
@@ -50,7 +50,15 @@
 .Oc
 .Op Fl fhv
 .Ar :group
-.Ar file ...
+.Ar
+.Nm
+.Oo
+.Fl R
+.Op Fl H | Fl L | Fl P
+.Oc
+.Op Fl fhv
+.Fl Fl reference=rfile
+.Ar
 .Sh DESCRIPTION
 .Nm
 sets the user ID and/or the group ID of the specified files.
@@ -107,7 +115,12 @@ The
 .Ar owner
 and
 .Ar group
-operands are both optional, however, one must be specified.
+operands are both optional, however, one must be specified; alternative
+both the owner and group may be specified using a reference
+.Ar rfile
+specified using the
+.Fl Fl reference
+argument.
 If the
 .Ar group
 operand is specified, it must be preceded by a colon (``:'') character.

Index: src/sbin/chown/chown.c
diff -u src/sbin/chown/chown.c:1.5 src/sbin/chown/chown.c:1.6
--- src/sbin/chown/chown.c:1.5	Mon Aug 29 10:34:59 2011
+++ src/sbin/chown/chown.c	Mon Oct 22 14:02:26 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: chown.c,v 1.5 2011/08/29 14:34:59 joerg Exp $	*/
+/*	$NetBSD: chown.c,v 1.6 2012/10/22 18:02:26 christos 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.5 2011/08/29 14:34:59 joerg Exp $);
+__RCSID($NetBSD: chown.c,v 1.6 2012/10/22 18:02:26 christos Exp $);
 #endif
 #endif /* not lint */
 
@@ -58,6 +58,7 @@ __RCSID($NetBSD: chown.c,v 1.5 2011/08/
 #include stdlib.h
 #include string.h
 #include unistd.h
+#include getopt.h
 
 static void	a_gid(const char *);
 static void	a_uid(const char *);
@@ -69,23 +70,35 @@ static gid_t gid;
 static int ischown;
 static char *myname;
 
+struct option chown_longopts[] = {
+	{ reference,		required_argument,	0,
+		1 },
+	{ NULL,			0,			0,
+		0 },
+};
+
 int
 main(int argc, char **argv)
 {
 	FTS *ftsp;
 	FTSENT *p;
 	int Hflag, Lflag, Rflag, ch, fflag, fts_options, hflag, rval, vflag;
-	char *cp;
+	char *cp, *reference;
 	int (*change_owner)(const char *, uid_t, gid_t);
 
 	(void)setlocale(LC_ALL, );
 
 	myname = (cp = strrchr(*argv, '/')) ? cp + 1 : *argv;
 	ischown = (myname[2] == 'o');
+	reference = NULL;
 
 	Hflag = Lflag = Rflag = fflag = hflag = vflag = 0;
-	while ((ch = getopt(argc, argv, HLPRfhv)) != -1)
+	while ((ch = getopt_long(argc, argv, HLPRfhv,
+	chown_longopts, NULL)) != -1)
 		switch (ch) {
+		case 1:
+			reference = optarg;
+			break;
 		case 'H':
 			Hflag = 1;
 			Lflag = 0;
@@ -123,7 +136,7 @@ main(int argc, char **argv)
 	argv += optind;
 	argc -= optind;
 
-	if (argc  2)
+	if (argc == 0 || (argc == 1  reference == NULL))
 		usage();
 
 	fts_options = FTS_PHYSICAL;
@@ -143,24 +156,35 @@ main(int argc, char **argv)
 
 	uid = (uid_t)-1;
 	gid = (gid_t)-1;
-	if (ischown) {
-		if ((cp = strchr(*argv, ':')) != NULL) {
-			*cp++ = '\0';
-			a_gid(cp);
-		}
-#ifdef SUPPORT_DOT
-		else if ((cp = strrchr(*argv, '.')) != NULL) {
-			if (uid_from_user(*argv, uid) == -1) {
+	if (reference == NULL) {
+		if (ischown) {
+			if ((cp = strchr(*argv, ':')) 

CVS commit: src/sbin/chown

2012-10-22 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Oct 22 18:02:26 UTC 2012

Modified Files:
src/sbin/chown: chgrp.1 chown.8 chown.c

Log Message:
support --reference=rfile


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sbin/chown/chgrp.1 src/sbin/chown/chown.8
cvs rdiff -u -r1.5 -r1.6 src/sbin/chown/chown.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.



CVS commit: src/sbin/chown

2011-01-13 Thread Adam Hamsik
Module Name:src
Committed By:   haad
Date:   Thu Jan 13 23:44:11 UTC 2011

Modified Files:
src/sbin/chown: Makefile

Log Message:
Use SYMLINKS, I'm not sure why I ahve commited old version of my patch, but
it should be ok now. Thanks to tron@ for pointing at this issue.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sbin/chown/Makefile

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/Makefile
diff -u src/sbin/chown/Makefile:1.5 src/sbin/chown/Makefile:1.6
--- src/sbin/chown/Makefile:1.5	Thu Jan 13 22:28:36 2011
+++ src/sbin/chown/Makefile	Thu Jan 13 23:44:11 2011
@@ -1,12 +1,12 @@
 #	from: @(#)Makefile	8.1 (Berkeley) 6/6/93
-#	$NetBSD: Makefile,v 1.5 2011/01/13 22:28:36 haad Exp $
+#	$NetBSD: Makefile,v 1.6 2011/01/13 23:44:11 haad Exp $
 
 PROG=	chown
 CPPFLAGS+=-DSUPPORT_DOT
 MAN=	chgrp.1 chown.8
-LINKS=	${BINDIR}/chown /bin/chgrp
+SYMLINKS+=	${BINDIR}/chown /bin/chgrp
 
-LINKS+=	${BINDIR}/chown /usr/bin/chgrp
-LINKS+=	${BINDIR}/chown /usr/sbin/chown
+SYMLINKS+=	${BINDIR}/chown /usr/bin/chgrp
+SYMLINKS+=	${BINDIR}/chown /usr/sbin/chown
 
 .include bsd.prog.mk



CVS commit: src/sbin/chown

2011-01-13 Thread Adam Hamsik
Module Name:src
Committed By:   haad
Date:   Thu Jan 13 23:44:11 UTC 2011

Modified Files:
src/sbin/chown: Makefile

Log Message:
Use SYMLINKS, I'm not sure why I ahve commited old version of my patch, but
it should be ok now. Thanks to tron@ for pointing at this issue.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sbin/chown/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.