summaryrefslogtreecommitdiffstats
path: root/bin/chmod/chmod.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix warnings inspired by lint, a commercial lint and WARNS=4markm2002-02-221-9/+8
|
* Modernization effort for bin/c*:imp2002-02-021-7/+5
| | | | | | | | | | | | o __P has been reoved o Old-style K&R declarations have been converted to new C89 style o register has been removed o prototype for main() has been removed (gcc3 makes it an error) o int main(int argc, char *argv[]) is the preferred main definition. o Attempt to not break style(9) conformance for declarations more than they already are. Approved by: arch@, new style(9)
* Fixed the bug from the previous revision.ru2001-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).
* Change noop option -h to do the real work. Now mode of symbolic linkru2001-05-281-7/+17
| | | | | | | is changed if -h option is given. Requested by: bde Obtained from: NetBSD (code part)
* Follow symbolic links named as command line arguments if run without -R.ru2001-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
* Make this compile with WARNS=2kris2001-05-201-0/+1
|
* Optimize out no-op chmod() syscalls.peter2000-07-291-2/+5
|
* Don't call warn() with no format string. This is potentially exploitable, ↵kris2000-07-101-1/+1
| | | | | | although it would be difficult both technically and in practise.
* Default to not -v.obrien1999-11-281-2/+2
| | | | Fix usage() style bug spotted by BDE.
* Add "-v".obrien1999-11-271-2/+9
|
* $Id$ -> $FreeBSD$peter1999-08-271-1/+1
|
* Document -f flag:chris1999-08-081-3/+3
| | | | | -f Do not display a diagnostic message if chmod could not modify the mode for file.
* Free memory obtained from setmode.imp1998-12-161-1/+2
| | | | Obtained from: OpenBSD
* Restore original Lite-2 sccsid. Restore include of sys/types.h.charnier1998-05-131-2/+3
|
* Correct use of .Nm and other cosmetics. Add rcsid. Remove unused #inc.charnier1998-05-061-3/+4
|
* compare return value from getopt against -1 rather than EOF, per the finalimp1997-03-281-2/+2
| | | | posix standard on the topic.
* Revert $FreeBSD$ to $Id$peter1997-02-221-1/+1
|
* Make the long-awaited change from $Id$ to $FreeBSD$jkh1997-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.
* Cleanup man page and -Wall cleaning.steve1996-12-141-3/+3
|
* chmod(2) directories once only (was twice)adam1996-08-101-6/+5
|
* You will find enclosed some changes to make gcc -Wall more happy injoerg1995-03-191-1/+3
| | | | | | | | | /usr/src/bin. Note that some patches are still needed in that directory. I (Joerg) finished most of Philippe's cleanup. /bin/sh will still need *allot* of work, however. Submitted by: charnier@lirmm.fr (Philippe Charnier)
* Include <limits.h> to get the definition of INT_MAX - don't depend onbde1995-02-031-1/+2
| | | | namespace pollution in <time.h>.
* Added $Id$dg1994-09-241-0/+2
|
* BSD 4.4 Lite bin Sourcesrgrimes1994-05-261-0/+201
OpenPOWER on IntegriCloud