summaryrefslogtreecommitdiff
path: root/bin/chmod
AgeCommit message (Collapse)Author
2018-09-16Use uid_from_user(3) and gid_from_group(3) in utilities thatTodd C. Miller
do repeated lookups. OK tb@
2018-08-25markup flag arguments; ok jmc@ schwarze@anton
2018-08-05use .Fl macro for command line optionsIngo Schwarze
2017-06-07X is not restricted to just the + operator;Jason McIntyre
diff from klemens nanni confirmed by otto
2017-05-28chown: Remove SUPPORT_DOT ifdef - it's on by default for 22 yearsAdam Wolk
The old syntax was deprecated 25 years ago when the utility was first standardised in IEEE Std 1003.2-1992 ("POSIX.2"). There was no POSIX version of chown with the dot separator. Let's stop pretending that it will ever go away. OK jung@, deraadt@, jmc@
2017-02-17In chmod's symbolic mode without -h and -R flags, a missing FTS_COMFOLLOWTheo Buehler
flag to fts_open led to the following behavior: the symlink's permissions were read, changed according to the command line, and transferred to the target file. chflags had a similar problem while chmod was unaffected. Regression introduced in r1.33. Reported by Christopher Wellons, thanks! ok guenther
2016-10-19Delete useless setlocale(3) in src/bin/.Ingo Schwarze
Minor cleanup while here: return from main, static void __dead usage, etc. Based on a patch from Jan Stary <hans at stare dot cz>. Feedback and OK tb@, OK millert@.
2016-09-11Symlinks to binaries should belong to root:bin.Martin Natano
tweaks and ok guenther
2015-12-31Document the -h option for chmod and chflags, rewording the chgrp(1) andPhilip Guenther
chown(8) manpages to be consistent and clearer about it as well.
2015-10-09Change all tame callers to namechange to pledge(2).Theo de Raadt
2015-10-03oops! cannot tame the chmod case, because the kernel drops theTheo de Raadt
setuid/setgid bits.
2015-10-03the chmod & chflags codepaths can use tame "stdio rpath fattr". theTheo de Raadt
chown codepath obviously cannot use tame -- once tame is activated the kernel prohibits changing uid/gid on a fd/file. ok guenther
2015-10-03KNFTheo de Raadt
2015-09-14Avoid .Ns right after .Pf, it's pointless.Ingo Schwarze
In some cases, do additional cleanup in the immediate vicinity.
2015-06-25Put fts_close() where missing.Masao Uebayashi
Not bugs in short-lived commands that call exit() -> _exit() immediately, but for idempotency. Originally found in ls(1) by Valgrind. Changes for other commands are from deraadt@. Reviewed by me, tested in snapshots. OK deraadt@
2015-03-13remove the first comma from constructs like ", and," and ", or,": you can useJason McIntyre
"and" and "or" to join sentence clauses, and you can use commas, but both hinders reading;
2014-12-13Correct the handling of symbolic links by chmod/chgrp/chown/chflags,Philip Guenther
making them more resistant to TOCTOU race conditions too. ok tobias@
2014-12-13Properly validate ranges:Tobias Stoeckmann
- avoid out of boundary access on very short program names - fix compiler warning when converting values between 0 and INT_MAX ok deraadt, millert
2014-10-06In case of invalid syntax like "chmod -Pr -w tf" (trailing mode letterIngo Schwarze
in a group of option letters), do not silently ignore the syntax error and do something undefined, but instead error out properly. Found because miod@ said "read the code" (not to me, though). ok doug@
2014-05-21Use errc/warnc to simplify code.Philip Guenther
ok jca@ krw@
2014-03-16lint is dead (long live the lint!), so stop using it as a cpp conditionalPhilip Guenther
(namespace pollution!) or talking about its opinion on code. ok krw@
2014-01-28consistency fixes, to match the other ch* utils;Jason McIntyre
ok millert sobrado
2014-01-25sticky bit is marked xsi;Jason McIntyre
2014-01-23add a note to STANDARDS about non-root use of chown;Jason McIntyre
text from/ok millert
2014-01-21paste in the fs.posix.setuid blurb from chown(1), as it'sJason McIntyre
relevant here too; ok millert
2014-01-21document that specifying ":group" (without an owner) is an extension;Jason McIntyre
ok millert sobrado
2014-01-21- remove brackets in -H description: the information is quite relevantJason McIntyre
- note that not following sym links is default for -R - improve the description of -R, providing a mnemonic and a simpler description of what it does. also make the text for all these pages identical, as far as is possible ok millert schwarze
2012-12-04remove some unnecessary sys/param.h inclusionsTheo de Raadt
2011-07-13ellipsis is not an optional argument; replace ".Ar file ..." -> ".Ar";Igor Sobrado
simplify the symbolic modes format. ok (and fine-tuned by) jmc@, millert@
2011-03-09zap from usage() as well; reminded by jmc@Okan Demirmen
2011-03-09remove non-standard flagOkan Demirmen
ok jasper@, otto@
2010-09-03add an EXIT STATUS section for /bin;Jason McIntyre
2010-01-12sync comment with reality, -f won't be documented.Jasper Lievisse Adriaanse
as discussed with jmc@, otto@ and millert@ ok otto@ millert@
2009-10-28rcsid[] and sccsid[] and copyright[] are essentially unmaintained (andTheo de Raadt
unmaintainable). these days, people use source. these id's do not provide any benefit, and do hurt the small install media (the 33,000 line diff is essentially mechanical) ok with the idea millert, ok dms
2009-08-20- arch is superuser-onlyMartynas Venckus
- opaque is gone with/ok tedu@, millert@
2009-08-14sort list of flags.Igor Sobrado
2009-02-08bump the posix reference in STANDARDS to IEEE Std 1003.1-2008, with a fewJason McIntyre
updates to follow;
2009-01-21fix the synopsis for chown(8)Igor Sobrado
2009-01-04replace hardcoded exit values with .Ex macros;Igor Sobrado
ok jmc@
2007-05-31convert to new .Dd format;Jason McIntyre
2007-05-29- consistent STANDARDS blurbJason McIntyre
- note which options are extensions to POSIX discussed w/ deraadt otto millert
2007-02-25shuffle the text somewhat to make the page read better;Jason McIntyre
use .Ex;
2007-02-25document the "opaque", "arch", and "nodump" flags more fully;Jason McIntyre
closes documentation/5384 from Andrew Hamilton-Wright help from henning, otto, and weingart
2006-04-25various small lint cleanups; ok ottoTheo de Raadt
2006-01-26`t' and `X' are now included in posix spec;Jason McIntyre
bump the revision for the latest posix spec; problem reported by jonathan glaschke; ok millert
2006-01-25some warning reductionTed Unangst
2006-01-25an old diff from tech to convert to using strtonum and some other miscTed Unangst
cleanup. from ray at cyth net
2005-11-29kill unused var found by lint. ok deraadt@Otto Moerbeek
2005-10-15sync usage();Jason McIntyre
2005-10-15clean up SYNOPSIS;Jason McIntyre
sort options list;