aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/chown
Commit message (Collapse)AuthorAgeFilesLines
* Per letter dated July 22, 1999, delete clause 3 from code directlyWarner Losh2004-08-073-12/+0
| | | | | | | from Berkeley. Notes: svn path=/head/; revision=133248
* Use uid_t.Philippe Charnier2003-09-071-3/+4
| | | | Notes: svn path=/head/; revision=119856
* Erase whitespace at EOL.Ruslan Ermilov2003-05-221-1/+1
| | | | | | | Approved by: re (blanket) Notes: svn path=/head/; revision=115224
* Use __FBSDID over rcsid[]. Protect copyright[] where needed.David E. O'Brien2003-05-031-3/+2
| | | | Notes: svn path=/head/; revision=114601
* Similar to chmod(1); make -v -v mean very verbose and showJohan Karlsson2003-04-254-6/+44
| | | | | | | | | | | the old and new uid/gid. PR: 41341 Submitted by: Edward Brocklesby <nighthawk@unrealircd.com> Reviewed by: bde@ (an older version) Notes: svn path=/head/; revision=114005
* style.Makefile(5)David E. O'Brien2003-04-041-1/+2
| | | | Notes: svn path=/head/; revision=113091
* Reword the description of -R a bit and add a note about being carefulGiorgos Keramidas2003-01-261-2/+6
| | | | | | | | | | when -R is combined with patterns that might match ".." (like ".*"). PR: 46415 Submitted by: Gary W. Swearingen <swear@attbi.com> Notes: svn path=/head/; revision=109845
* Use basename(3).David E. O'Brien2002-12-301-3/+2
| | | | Notes: svn path=/head/; revision=108443
* Fix a spelling mistake.David Malone2002-07-171-1/+1
| | | | | | | | | PR: 40695 Submitted by: Maxim Maximov <mcsi@agava.com> MFC after: 1 week Notes: svn path=/head/; revision=100252
* The .Nm utilityPhilippe Charnier2002-07-141-4/+5
| | | | Notes: svn path=/head/; revision=99968
* Kill __P(), use ANSI C function declarations, remove local prototype for main,Juli Mallett2002-06-301-21/+14
| | | | | | | and add a __FBSDID() while I'm here. Notes: svn path=/head/; revision=99141
* In the SUPPORT_DOT case, warn that seperation with a period is deprecated.Juli Mallett2002-06-271-0/+1
| | | | | | | | | | | | | | In -STABLE, this is default, in -CURRENT it is not, which leads to many a headache for a user coming to -CURRENT without remembering this fact. It is one of the POLA violations we have not avoided by preparing the users for it appopriately. Therefore, a warnx(3) is added here, explicitly to be MFC'd shortly to start the re-education process rolling. Reviewed by: General murmurs of approval in that IRC channel. MFC after: 3 days Notes: svn path=/head/; revision=98935
* Don't exit immediately if an error occurs, continue but exit non-zero.Tim J. Robbins2002-06-021-5/+9
| | | | Notes: svn path=/head/; revision=97732
* mdoc(7) police: removed an extra .Op call.Ruslan Ermilov2002-05-301-1/+1
| | | | Notes: svn path=/head/; revision=97558
* chown(8) was not describing symlinks correctly, fixed.Tom Rhodes2002-04-091-3/+6
| | | | | | | | | PR: 36447 No objections from: ru MFC after: 3 days Notes: svn path=/head/; revision=94309
* Add prototypes for main() so that these programs compile with -WerrorLuigi Rizzo2001-12-141-0/+1
| | | | | | | | | | | | | | | (which somehow now seems to be the default for compiling -current). This error popped up while doing a PicoBSD cross-compile on a 4.3-ish system, it may well be that there are other apps which have similar problems, but I did not spot them as they are not included in my picobsd config. Whether adding prototypes for main() is the correct solution or not I have no idea, a request to -current on the matter went basically unanswered. Those who have better ideas are welcome to back this out and replace it with the correct fix. Notes: svn path=/head/; revision=87893
* Clean up, WARNSify, unbreak -v option handling.Ruslan Ermilov2001-09-132-52/+52
| | | | Notes: svn path=/head/; revision=83410
* If a sentence starts inside parenthesis, it should end insideDima Dorfman2001-09-111-1/+1
| | | | | | | parenthesis. Notes: svn path=/head/; revision=83343
* mdoc(7) police: utilize the new .Ex macro.Ruslan Ermilov2001-08-152-7/+3
| | | | Notes: svn path=/head/; revision=81687
* Perform a major cleanup of the usr.sbin Makefiles.David E. O'Brien2001-07-201-1/+1
| | | | | | | | These are not perfectly in agreement with each other style-wise, but they are orders of orders of magnitude more consistent style-wise than before. Notes: svn path=/head/; revision=80029
* mdoc(7) police: removed HISTORY info from the .Os call.Ruslan Ermilov2001-07-102-2/+2
| | | | Notes: svn path=/head/; revision=79537
* Starting with 5.0-R, do not support `.' as a owner / group delimiter.David E. O'Brien2001-05-311-1/+0
| | | | Notes: svn path=/head/; revision=77540
* Fixed the bug from the previous revision.Ruslan Ermilov2001-05-311-1/+1
| | | | | | | | | | | | | | | | | | ``chown -h owner symlink'' did not set the symlink's owner if the file the symlink points to already had that owner: # ls -l alink afile -rw-r--r-- 1 nobody ru 0 May 31 14:14 afile lrwxr-xr-x 1 root ru 5 May 31 14:14 alink -> afile # ./chown -h -v nobody alink # ls -l alink afile -rw-r--r-- 1 nobody ru 0 May 31 14:14 afile lrwxr-xr-x 1 root ru 5 May 31 14:14 alink -> afile Similarly for chgrp(1) and chmod(1). Notes: svn path=/head/; revision=77522
* Follow symbolic links named as command line arguments if run without -R.Ruslan Ermilov2001-05-281-2/+3
| | | | | | | | | | | | | | | | | This is required by symlink(7), ``Commands not traversing a file tree'' subsection, third paragraph: : It is important to realize that this rule includes commands which may : optionally traverse file trees, e.g. the command ``chown file'' is : included in this rule, while the command ``chown -R file'' is not. For chown(8) and chgrp(1), this is also is compliance with the latest POSIX 1003.1-200x draft. MFC after: 1 week Notes: svn path=/head/; revision=77333
* Make it clear that -P is the default.Ruslan Ermilov2001-05-252-0/+2
| | | | | | | PR: docs/27629 Notes: svn path=/head/; revision=77160
* - Backout botched attempt to introduce MANSECT feature.Ruslan Ermilov2001-03-261-2/+1
| | | | | | | - MAN[1-9] -> MAN. Notes: svn path=/head/; revision=74816
* mdoc(7) police: use the default ``file ...'' feature of the .Ar macro.Ruslan Ermilov2001-02-131-1/+1
| | | | Notes: svn path=/head/; revision=72432
* mdoc(7) police: split punctuation characters + misc fixes.Ruslan Ermilov2001-02-011-2/+2
| | | | Notes: svn path=/head/; revision=71898
* mdoc(7) police: use the new features of the Nm macro.Ruslan Ermilov2000-11-202-3/+3
| | | | Notes: svn path=/head/; revision=68965
* Initialize vflag like the rest (not necessary, but this keeps it together)Peter Wemm2000-07-291-1/+4
| | | | | | | Optimize out chown(2) syscalls if there is no change in uid or gid. Notes: svn path=/head/; revision=64014
* Somehow I didn't get all the "-v" code commited.David E. O'Brien2000-03-083-10/+7
| | | | | | | | | | Submitted by: Arindum Mukerji <rmukerji@execpc.com> Approved by: JKH Make the manpage more style(9) complient. Notes: svn path=/head/; revision=57830
* Revert rev 1.3. chown(8)-like functionality has been added to mknod(8)David E. O'Brien2000-01-061-6/+1
| | | | | | | | and MAKEDEV(8) will be changed to not use chown(8), thus removing the depdendance on a having /usr mounted. Notes: svn path=/head/; revision=55497
* Install `chown' into /sbin rather than /usr/sbin as `chown' is needed byDavid E. O'Brien1999-12-141-1/+7
| | | | | | | | `MAKEDEV'. And one might need to `MAKEDEV' inorder to get a device node in order to mount /usr from. Notes: svn path=/head/; revision=54588
* Add "-v".David E. O'Brien1999-11-273-4/+29
| | | | Notes: svn path=/head/; revision=53780
* add .Sh DIAGNOSTICSPhilippe Charnier1999-10-171-5/+5
| | | | Notes: svn path=/head/; revision=52336
* space is not allowed between owner and :group.Philippe Charnier1999-10-081-1/+1
| | | | Notes: svn path=/head/; revision=52039
* $Id$ -> $FreeBSD$Peter Wemm1999-08-283-3/+3
| | | | Notes: svn path=/head/; revision=50479
* Add $Id$, to make it simpler for members of the translation teams toNik Clayton1999-07-121-0/+1
| | | | | | | | | | | | | | | | | | | | track. The Id line is normally at the bottom of the main comment block in the man page, separated from the rest of the manpage by an empty comment, like so; .\" $Id$ .\" If the immediately preceding comment is a @(#) format ID marker than the the $Id$ will line up underneath it with no intervening blank lines. Otherwise, an additional blank line is inserted. Approved by: bde Notes: svn path=/head/; revision=48791
* Backed out previous commit. chown(8) doesn't follow symlinks byBruce Evans1998-05-031-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | default, at least in BSD. This used to be automatic, because chown(2) didn't follow symlinks. When chown(2) was changed to follow symlinks in BSD4.4, chown(8) was changed to not follow symlinks by default. The previous commit broke this. The first victim was bsd.prog.mk, which uses a plain chown in an attempt to change the ownership of the symlinks to `dm' in /usr/games. This fails when it is done before dm is installed, or messes up the ownership of dm if dm is installed. Unfixed problems: 1. When lchown(2) was implemented, chown(8) wasn't changed to implement the historical behaviour of changing ownership of symlinks. I'm not sure if it should have been. The -HLP options give more complete control, but they unfortunately don't apply unless the -R option is specified (a problem shared with other commands, e.g., cp; I guess we're supposed to use -R even for non-recursive traversals). 2. If we implement the historical behaviour, then -h would become a no-op and should be left undocumented. 3. The man page suggests that without option -h, all symlinks (to files specified in the command line?) are followed. It's not clear what "the file" is. These bugs were introduced when -h was documented. 4. The correct interaction of -h with the other flags is not clear. Notes: svn path=/head/; revision=35632
* Don't ignore symbolic links in the absence of -h, -H or -L options.Wolfgang Helbig1998-05-021-2/+1
| | | | | | | Instead change the user ID/group ID of the file that the link points to. Notes: svn path=/head/; revision=35622
* Allow -R and -h to be combined as long as no symlink-following flagsJordan K. Hubbard1998-03-091-2/+2
| | | | | | | | are also requested. Submitted by: Andre Albsmeier <andre.albsmeier@mchp.siemens.de> Notes: svn path=/head/; revision=34399
* Chown(8) compiled with -DSUPPORT_DOT (backward compatibility) doesWolfram Schneider1997-09-211-6/+6
| | | | | | | | | | | | | first check for a `.' and then for `:' as a delimiter. Usernames with a dot will fail. # chown r.r:bin /tmp/bla chown: r:bin: illegal group name Fix: first check for a `:' and then for a `.' Notes: svn path=/head/; revision=29656
* Cosmetic in man page. Sync usage() with man page.Philippe Charnier1997-09-043-19/+25
| | | | Notes: svn path=/head/; revision=29105
* Correct error message when the superuser tries to changeSteve Price1997-08-241-13/+11
| | | | | | | | | | the group of immutable files. PR: bin/3445 Submitted by: Pius Fischer <pius@ienet.com> Notes: svn path=/head/; revision=28643
* Activate the -h flag which tells chown/chgrp to work on the symlink itselfPeter Wemm1997-03-313-38/+29
| | | | | | | | using lchown(). Most of the code was already here, the option was recognised but ignored for SYSV/POSIX.2(?) compatability. Notes: svn path=/head/; revision=24446
* compare return value from getopt against -1 rather than EOF, per the finalWarner Losh1997-03-311-1/+1
| | | | | | | posix standard on the topic. Notes: svn path=/head/; revision=24428
* Revert $FreeBSD$ to $Id$Peter Wemm1997-02-221-1/+1
| | | | Notes: svn path=/head/; revision=22997
* Sort cross references.Wolfram Schneider1997-01-201-1/+1
| | | | Notes: svn path=/head/; revision=21880
* Make the long-awaited change from $Id$ to $FreeBSD$Jordan K. Hubbard1997-01-141-1/+1
| | | | | | | | | | | This will make a number of things easier in the future, as well as (finally!) avoiding the Id-smashing problem which has plagued developers for so long. Boy, I'm glad we're not using sup anymore. This update would have been insane otherwise. Notes: svn path=/head/; revision=21673
* [HISTORY] command appeared in Version 1 AT&T UNIXWolfram Schneider1996-08-291-0/+6
| | | | | | | Obtained from: A Quarter Century of UNIX, Peter H. Salus, page 41 Notes: svn path=/head/; revision=17891