Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src Move chown from usr.sbin to sbin and chgrp from usr.bin to b...
details: https://anonhg.NetBSD.org/src/rev/73cc377acf86
branches: trunk
changeset: 760827:73cc377acf86
user: haad <haad%NetBSD.org@localhost>
date: Thu Jan 13 22:28:35 2011 +0000
description:
Move chown from usr.sbin to sbin and chgrp from usr.bin to bin directories.
This was discussed and oked on tech-userlevel I have run full build release,
test anita cycle with this patch.
diffstat:
distrib/sets/lists/base/mi | 4 +-
distrib/sets/lists/comp/mi | 4 +-
sbin/Makefile | 4 +-
sbin/chown/Makefile | 12 +
sbin/chown/chgrp.1 | 155 +++++++++++++++++++++++++
sbin/chown/chown.8 | 162 ++++++++++++++++++++++++++
sbin/chown/chown.c | 274 +++++++++++++++++++++++++++++++++++++++++++++
usr.sbin/Makefile | 4 +-
usr.sbin/chown/Makefile | 9 -
usr.sbin/chown/chgrp.1 | 155 -------------------------
usr.sbin/chown/chown.8 | 162 --------------------------
usr.sbin/chown/chown.c | 274 ---------------------------------------------
12 files changed, 612 insertions(+), 607 deletions(-)
diffs (truncated from 1320 to 300 lines):
diff -r 0d00fd3bb2bb -r 73cc377acf86 distrib/sets/lists/base/mi
--- a/distrib/sets/lists/base/mi Thu Jan 13 22:02:05 2011 +0000
+++ b/distrib/sets/lists/base/mi Thu Jan 13 22:28:35 2011 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.914 2011/01/12 16:18:57 pooka Exp $
+# $NetBSD: mi,v 1.915 2011/01/13 22:28:36 haad Exp $
#
# Note: Don't delete entries from here - mark them as "obsolete" instead,
# unless otherwise stated below.
@@ -21,6 +21,7 @@
./bin/cp base-util-root
./bin/cpio base-util-root
./bin/csh base-util-root
+./bin/chgrp base-util-root
./bin/date base-util-root
./bin/dd base-util-root
./bin/df base-util-root
@@ -206,6 +207,7 @@
./sbin/brconfig base-netutil-root
./sbin/ccdconfig base-sysutil-root
./sbin/cgdconfig base-sysutil-root crypto
+./sbin/chown base-sysutil-root
./sbin/rump.cgdconfig base-sysutil-root crypto
./sbin/clri base-sysutil-root
./sbin/dhclient base-dhclient-root
diff -r 0d00fd3bb2bb -r 73cc377acf86 distrib/sets/lists/comp/mi
--- a/distrib/sets/lists/comp/mi Thu Jan 13 22:02:05 2011 +0000
+++ b/distrib/sets/lists/comp/mi Thu Jan 13 22:28:35 2011 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1565 2011/01/12 16:18:57 pooka Exp $
+# $NetBSD: mi,v 1.1566 2011/01/13 22:28:37 haad Exp $
#
# Note: don't delete entries from here - mark them as "obsolete" instead.
#
@@ -2954,6 +2954,7 @@
./usr/libdata/debug/sbin/brconfig.debug comp-netutil-debug debug
./usr/libdata/debug/sbin/ccdconfig.debug comp-sysutil-debug debug
./usr/libdata/debug/sbin/cgdconfig.debug comp-sysutil-debug crypto,debug
+./usr/libdata/debug/sbin/chown.debug comp-sysutil-debug debug
./usr/libdata/debug/sbin/rump.cgdconfig.debug comp-sysutil-debug crypto,debug
./usr/libdata/debug/sbin/clri.debug comp-sysutil-debug debug
./usr/libdata/debug/sbin/dhclient.debug comp-dhclient-debug debug
@@ -3597,7 +3598,6 @@
./usr/libdata/debug/usr/sbin/btuartd.debug comp-obsolete obsolete
./usr/libdata/debug/usr/sbin/catman.debug comp-man-debug debug
./usr/libdata/debug/usr/sbin/chat.debug comp-ppp-debug debug
-./usr/libdata/debug/usr/sbin/chown.debug comp-sysutil-debug debug
./usr/libdata/debug/usr/sbin/chroot.debug comp-sysutil-debug debug
./usr/libdata/debug/usr/sbin/chrtbl.debug comp-sysutil-debug debug
./usr/libdata/debug/usr/sbin/cnwctl.debug comp-netutil-debug debug
diff -r 0d00fd3bb2bb -r 73cc377acf86 sbin/Makefile
--- a/sbin/Makefile Thu Jan 13 22:02:05 2011 +0000
+++ b/sbin/Makefile Thu Jan 13 22:28:35 2011 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.117 2010/10/30 21:16:07 haad Exp $
+# $NetBSD: Makefile,v 1.118 2011/01/13 22:28:36 haad Exp $
# @(#)Makefile 8.5 (Berkeley) 3/31/94
# Not ported: XNSrouted enpload scsiformat startslip
@@ -7,7 +7,7 @@
.include <bsd.own.mk>
SUBDIR= amrctl apmlabel atactl badsect bioctl brconfig ccdconfig \
- disklabel dkctl dkscan_bsdlabel dmesg \
+ chown disklabel dkctl dkscan_bsdlabel dmesg \
drvctl fastboot fdisk fsck fsirand gpt ifconfig init ldconfig \
mbrlabel mknod modload modstat modunload mount newbtconf nologin \
pdisk ping pppoectl raidctl reboot rcorder rndctl route routed \
diff -r 0d00fd3bb2bb -r 73cc377acf86 sbin/chown/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sbin/chown/Makefile Thu Jan 13 22:28:35 2011 +0000
@@ -0,0 +1,12 @@
+# from: @(#)Makefile 8.1 (Berkeley) 6/6/93
+# $NetBSD: Makefile,v 1.5 2011/01/13 22:28:36 haad Exp $
+
+PROG= chown
+CPPFLAGS+=-DSUPPORT_DOT
+MAN= chgrp.1 chown.8
+LINKS= ${BINDIR}/chown /bin/chgrp
+
+LINKS+= ${BINDIR}/chown /usr/bin/chgrp
+LINKS+= ${BINDIR}/chown /usr/sbin/chown
+
+.include <bsd.prog.mk>
diff -r 0d00fd3bb2bb -r 73cc377acf86 sbin/chown/chgrp.1
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sbin/chown/chgrp.1 Thu Jan 13 22:28:35 2011 +0000
@@ -0,0 +1,155 @@
+.\" Copyright (c) 1983, 1990, 1993, 1994, 2003
+.\" The Regents of the University of California. All rights reserved.
+.\"
+.\" This code is derived from software contributed to Berkeley by
+.\" the Institute of Electrical and Electronics Engineers, Inc.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. Neither the name of the University nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" 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 $
+.\"
+.Dd September 25, 2003
+.Dt CHGRP 1
+.Os
+.Sh NAME
+.Nm chgrp
+.Nd change group
+.Sh SYNOPSIS
+.Nm
+.Oo
+.Fl R
+.Op Fl H | Fl L | Fl P
+.Oc
+.Op Fl fhv
+.Ar group
+.Ar file ...
+.Sh DESCRIPTION
+The
+.Nm
+utility sets the group ID of the file named by each
+.Ar file
+operand to the
+.Ar group
+ID specified by the group operand.
+.Pp
+Options:
+.Bl -tag -width Ds
+.It Fl H
+If the
+.Fl R
+option is specified, symbolic links on the command line are followed.
+(Symbolic links encountered in the tree traversal are not followed.)
+.It Fl L
+If the
+.Fl R
+option is specified, all symbolic links are followed.
+.It Fl P
+If the
+.Fl R
+option is specified, no symbolic links are followed.
+.It Fl R
+Change the group ID for the file hierarchies rooted
+in the files instead of just the files themselves.
+.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).
+.It Fl h
+If
+.Ar file
+is a symbolic link, the group of the link is changed.
+.It Fl v
+Cause
+.Nm
+to be verbose, showing files as they are processed.
+.El
+.Pp
+If
+.Fl h
+is not given, unless the
+.Fl H
+or
+.Fl L
+option is set,
+.Nm
+on a symbolic link always succeeds and has no effect.
+The
+.Fl H ,
+.Fl L
+and
+.Fl P
+options are ignored unless the
+.Fl R
+option is specified.
+In addition, these options override each other and the
+command's actions are determined by the last one specified.
+.Pp
+The
+.Ar group
+operand can be either a group name from the group database,
+or a numeric group ID.
+Since it is valid to have a group name that is numeric (and
+doesn't have the numeric ID that matches its name) the name lookup
+is always done first.
+Preceding the ID with a ``#'' character will force it to be taken
+as a number.
+.Pp
+The user invoking
+.Nm
+must belong to the specified group and be the owner of the file,
+or be the super-user.
+.Pp
+Unless invoked by the super-user,
+.Nm
+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 \*[Gt]0 if an error occurs.
+.Sh FILES
+.Bl -tag -width /etc/group -compact
+.It Pa /etc/group
+Group ID file
+.El
+.Sh SEE ALSO
+.Xr chown 2 ,
+.Xr lchown 2 ,
+.Xr fts 3 ,
+.Xr group 5 ,
+.Xr passwd 5 ,
+.Xr symlink 7 ,
+.Xr chown 8
+.Sh STANDARDS
+The
+.Nm
+utility is expected to be POSIX 1003.2 compatible.
+.Pp
+The
+.Fl v
+option and the use of ``#'' to force a numeric group ID
+are extensions to
+.St -p1003.2 .
diff -r 0d00fd3bb2bb -r 73cc377acf86 sbin/chown/chown.8
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/sbin/chown/chown.8 Thu Jan 13 22:28:35 2011 +0000
@@ -0,0 +1,162 @@
+.\" Copyright (c) 1990, 1991, 1993, 1994, 2003
+.\" The Regents of the University of California. All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\" notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\" notice, this list of conditions and the following disclaimer in the
+.\" documentation and/or other materials provided with the distribution.
+.\" 3. Neither the name of the University nor the names of its contributors
+.\" may be used to endorse or promote products derived from this software
+.\" without specific prior written permission.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+.\" 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 $
+.\"
+.Dd December 9, 2005
+.Dt CHOWN 8
+.Os
+.Sh NAME
+.Nm chown
+.Nd change file owner and group
+.Sh SYNOPSIS
+.Nm
+.Oo
+.Fl R
+.Op Fl H | Fl L | Fl P
+.Oc
+.Op Fl fhv
+.Ar owner Ns Op Ar :group
+.Ar file ...
+.Nm
+.Oo
+.Fl R
+.Op Fl H | Fl L | Fl P
+.Oc
+.Op Fl fhv
+.Ar :group
+.Ar file ...
Home |
Main Index |
Thread Index |
Old Index