aboutsummaryrefslogtreecommitdiff
path: root/bin/chmod
Commit message (Collapse)AuthorAgeFilesLines
* General further adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-201-0/+2
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 3-Clause license. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. Special thanks to Wind River for providing access to "The Duke of Highlander" tool: an older (2014) run over FreeBSD tree was useful as a starting point. Notes: svn path=/head/; revision=326025
* DIRDEPS_BUILD: Update dependencies.Bryan Drewery2017-10-311-1/+0
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325188
* DIRDEPS_BUILD: Connect new directories.Bryan Drewery2017-10-311-0/+11
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325187
* Add supporting changes for `Add limited sandbox capability to "make check"`Enji Cooper2017-08-141-0/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Non-tests/... changes: - Add HAS_TESTS= to Makefiles with libraries and programs to enable iteration and propagate the appropriate environment down to *.test.mk. tests/... changes: - Add appropriate support Makefile.inc's to set HAS_TESTS in a minimal manner, since tests/... is a special subdirectory tree compared to the others. MFC after: 2 months MFC with: r322511 Reviewed by: arch (silence), testing (silence) Differential Revision: D12014 Notes: svn path=/head/; revision=322515
| * MFhead@r321960Enji Cooper2017-08-021-0/+17
| |\ | | | | | | | | | Notes: svn path=/projects/make-check-sandbox/; revision=321961
| * | Add HAS_TESTS to all Makefiles that use the SUBDIR.${MK_TESTS}+= tests idiomEnji Cooper2017-08-021-0/+1
| | | | | | | | | | | | Notes: svn path=/projects/make-check-sandbox/; revision=321911
* | | Don't check result of chflags in f_flag_cleanup()Enji Cooper2017-08-051-1/+1
| |/ |/| | | | | | | | | | | | | | | | | | | | | This will prevent false positives from occurring if the test is run on ZFS since ZFS doesn't support fflags throbbing like UFS. PR: 221189 MFC after: 4 days MFC with: r321949 Notes: svn path=/head/; revision=322101
* | Always use first parameter passed to get_filesystem(..) instead of discarding itEnji Cooper2017-08-021-1/+3
| | | | | | | | | | | | | | | | | | | | | | and using `.` instead. MFC after: 1 week MFC with: r321949 PR: 221189 [1], 221188 [2] Notes: svn path=/head/; revision=321950
* | Add expected failures for ZFSEnji Cooper2017-08-021-0/+15
|/ | | | | | | | | | | | | | | - :f_flag fails on ZFS because UF_IMMUTABLE isn't supported [1]. - :v_flag fails on ZFS because the mode for foo is [always] updated unnecessarily. get_filesystem(..) (supporting function that was added to the test script) is based on equivalent logic in usr.bin/extattr/tests/extattr_test.sh . MFC after: 1 week PR: 221189 [1], 221188 [2] Notes: svn path=/head/; revision=321949
* Add some basic tests for chmod(1)Enji Cooper2017-06-073-0/+169
| | | | | | | | MFC after: 1 month Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=319642
* Renumber copyright clause 4Warner Losh2017-02-282-2/+2
| | | | | | | | | | | | Renumber cluase 4 to 3, per what everybody else did when BSD granted them permission to remove clause 3. My insistance on keeping the same numbering for legal reasons is too pedantic, so give up on that point. Submitted by: Jan Schaumann <jschauma@stevens.edu> Pull Request: https://github.com/freebsd/freebsd/pull/96 Notes: svn path=/head/; revision=314436
* chmod: Add SIGINFO handlerConrad Meyer2017-01-082-3/+26
| | | | | | | | | PR: 191884 Submitted by: Dan McGregor <dan.mcgregor at usask.ca> Reviewed by: mjg@ (earlier version) Notes: svn path=/head/; revision=311668
* "POSIX doesn't specify -h." - r1.27 from NetBSDSevan Janiyan2016-10-021-6/+5
| | | | | | | | | | | | | http://man.openbsd.org/?query=chmod&apropos=0&sec=0&arch=default&manpath=POSIX-2013 PR: 212337 Approved by: bcr (mentor) Obtained from: NetBSD MFC after: 5 days Differential Revision: https://reviews.freebsd.org/D8118 Notes: svn path=/head/; revision=306582
* Explicitly add unmarked bin/ binaries to the runtime package.Glen Barber2016-02-091-0/+1
| | | | | | | | | | | Note: tcsh(1) has a MK_TCSH=no test, so this should be a separate package, which requires pre-install/post-install scripts, to be added later. Sponsored by: The FreeBSD Foundation Notes: svn path=/projects/release-pkg/; revision=295439
* Add META_MODE support.Simon J. Gerraty2015-06-131-0/+18
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp Notes: svn path=/head/; revision=284345
| * dirdeps.mk now sets DEP_RELDIRSimon J. Gerraty2015-06-081-2/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=284172
| * Merge sync of headSimon J. Gerraty2015-05-272-51/+53
| |\ | | | | | | | | | Notes: svn path=/projects/bmake/; revision=283595
| * | Updated dependenciesSimon J. Gerraty2014-05-161-1/+0
| | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=266219
| * | Updated dependenciesSimon J. Gerraty2014-05-101-0/+2
| | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=265802
| * | Updated dependenciesSimon J. Gerraty2013-03-111-0/+1
| | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=248169
| * | Updated dependenciesSimon J. Gerraty2013-02-161-2/+0
| | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=246868
| * | Sync FreeBSD's bmake branch with Juniper's internal bmake branch.Marcel Moolenaar2012-08-221-0/+19
| | | | | | | | | | | | | | | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net> Notes: svn path=/projects/bmake/; revision=239572
* | | Change directory permissions in pre-order.Sergey Kandaurov2015-06-041-2/+4
| |/ |/| | | | | | | | | | | | | | | | | | | In this order, it won't try to recurse into a directory for which it doesn't have permission, before changing that permission. This follows an existing behavior in other BSDs, linux, OS X. Obtained from: NetBSD Notes: svn path=/head/; revision=283997
* | Standardise chmod, chflags, chown and chgrp recursive symlink processingSteven Hartland2015-04-292-51/+53
|/ | | | | | | | | | | | | | chmod, chflags, chgrp, chmod and chown now affect symlinks in -R mode as defined in symlink(7); previously symlinks were silently ignored. Differential Revision: https://reviews.freebsd.org/D2316 Reviewed by: jilles MFC after: 1 month Relnotes: yes Sponsored by: Multiplay Notes: svn path=/head/; revision=282208
* Update sticky(7) cross references.Sergey Kandaurov2011-05-131-3/+3
| | | | | | | | PR: docs/124468 X-MFC with: r218998 Notes: svn path=/head/; revision=221845
* - Don't include both <sys/types.h> and <sys/param.h>Edward Tomasz Napierala2009-09-021-9/+6
| | | | | | | | | | | | | | | | | - Keep variables sorted - Fix logic error with -f and -v options - don't print the usual -v output if there was an error, whether or not we were passed -f - Don't call free(3) just before exit(2) - Whitespace fixes Submitted by: bde Notes: svn path=/head/; revision=196753
* Make the code more readable and fix chmod(1) on symlinks withEdward Tomasz Napierala2009-08-311-13/+15
| | | | | | | NFSv4 enabled. Notes: svn path=/head/; revision=196711
* With NFSv4 ACLs, it is possible that applying a mode to an ACL whichEdward Tomasz Napierala2009-07-011-2/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | is identical to the mode computed from that ACL will modify the ACL. For example, mode computed from the following ACL is 0600: user:kamila:rwx--------C--:------:allow owner@:--x-----------:------:deny owner@:rw-p---A-W-Co-:------:allow group@:rwxp----------:------:deny group@:--------------:------:allow everyone@:rwxp---A-W-Co-:------:deny everyone@:------a-R-c--s:------:allow However, applying that mode (chmod 0600) changes the ACL into this: user:kamila:rwx-----------:------:deny user:kamila:rwx--------C--:------:allow owner@:--x-----------:------:deny owner@:rw-p---A-W-Co-:------:allow group@:rwxp----------:------:deny group@:--------------:------:allow everyone@:rwxp---A-W-Co-:------:deny everyone@:------a-R-c--s:------:allow In chmod(1) utility, there is an optimisation, which makes it not call chmod(2) if the mode of the file is the same as the new mode. Disable that optimisation for files which may have NFSv4 ACLs. Reviewed by: rwatson Approved by: re (kib) Notes: svn path=/head/; revision=195243
* Staticify internal routines.Xin LI2009-06-231-2/+2
| | | | Notes: svn path=/head/; revision=194795
* Make the Monty Python quote more google friendly instead ofTom Rhodes2009-01-261-3/+2
| | | | | | | | | hacking it apart. Discussed with: Christoph Mallon <christoph.mallon@gmx.de> Notes: svn path=/head/; revision=187734
* Note the implication of setting the 'w' permission on directories,Tom Rhodes2009-01-231-2/+7
| | | | | | | | | | | while here, expand the 'naughty bits' comment in BUGS. PR: 84265 and 84268 Reviewed by: keramida Obtained from: hints from ceri, keramida Notes: svn path=/head/; revision=187627
* - Mention umask(2) when first referring to it.Ruslan Ermilov2006-12-221-2/+6
| | | | | | | | | - Add missing markup. Submitted by: Eugene Grosbein <eugen@grosbein.pp.ru> Notes: svn path=/head/; revision=165463
* Expand contractions.Ruslan Ermilov2005-02-131-1/+1
| | | | Notes: svn path=/head/; revision=141851
* Add the new standard EXIT STATUS section where appropriate.Ruslan Ermilov2005-01-161-5/+5
| | | | | | | Sort standard sections in the (documented) preferred order. Notes: svn path=/head/; revision=140353
* /*- or .\"- or #- to begin license clauses.Warner Losh2005-01-102-1/+2
| | | | Notes: svn path=/head/; revision=139969
* Remove clause 3 from the UCB licenses.Mark Murray2004-04-062-8/+0
| | | | | | | OK'ed by: imp, core Notes: svn path=/head/; revision=127958
* Print unambiguous paths with -R -v.Ruslan Ermilov2003-12-161-1/+1
| | | | Notes: svn path=/head/; revision=123565
* Remove the code for parsing octal modes, since setmode(3) alreadyAnton Berezin2003-10-311-22/+5
| | | | | | | | | | handles them. Reviewed by: audit MFC after: 2 weeks Notes: svn path=/head/; revision=121794
* Quiet warnings about copyright[].David E. O'Brien2003-05-011-2/+2
| | | | Notes: svn path=/head/; revision=114433
* Remove now unnecessary main() prototype.Maxime Henrion2003-01-291-1/+0
| | | | Notes: svn path=/head/; revision=110057
* mdoc(7) police: In DESCRIPTION, list the options in pure alphabeticalRuslan Ermilov2002-11-251-14/+17
| | | | | | | | | | | order, as required by style(9). Document the effect of the -f option on exit status. Fixed some spacing. Submitted by: bde Approved by: re Notes: svn path=/head/; revision=107230
* Cross-reference setfacl(1).Tim J. Robbins2002-11-041-0/+1
| | | | Notes: svn path=/head/; revision=106399
* Return the ``u''Tom Rhodes2002-10-011-1/+1
| | | | Notes: svn path=/head/; revision=104318
* s/behaviour/behavior/ in the chmod(1) manualTom Rhodes2002-09-281-1/+1
| | | | Notes: svn path=/head/; revision=104119
* mdoc(7) police: kill hard sentence breaks and one double space.Ruslan Ermilov2002-08-091-5/+9
| | | | Notes: svn path=/head/; revision=101569
* Allow "-v -v" to mean very verbose.David E. O'Brien2002-08-042-4/+23
| | | | | | | | | Reviewed by: freebsd-standards PR: 40709 Submitted by: Edward Brocklesby <nighthawk@unrealircd.com>, johan Notes: svn path=/head/; revision=101297
* Revert previous delta, which is not required with rev 1.5 ofSheldon Hearn2002-07-151-1/+0
| | | | | | | src/contrib/gcc/c-format.c . Notes: svn path=/head/; revision=100069
* Don't duplicate the description of the sticky bit that is alreadyGiorgos Keramidas2002-07-121-7/+4
| | | | | | | | | | part of chmod(2) and sticky(8), but refer to those manpages instead. PR: docs/35605 Submitted by: Gary W. Swearingen <swear@blarg.net> Notes: svn path=/head/; revision=99847
* Set WFORMAT=0, because our compiler currently complains about NULLSheldon Hearn2002-07-111-0/+1
| | | | | | | | | | | | | | | | | | | | | arg 2 to err() and friends, and warnings are promoted to errors. This allows the following revisions to be reverted: rev 1.39 src/bin/cp/cp.c rev 1.26 src/bin/chmod/chmod.c rev 1.40 src/bin/rm/rm.c The following revisions can already be reverted, because they were already covered by WFORMAT=0: rev 1.8 src/bin/ls/lomac.c rev 1.63 src/bin/ls/ls.c rev 1.8 src/bin/ps/lomac.c rev 1.34 src/bin/rcp/rcp.c Notes: svn path=/head/; revision=99767
* err() is documented as allowing NULL for the format string but GCC isn'tMatthew Dillon2002-07-101-1/+1
| | | | | | | happy about it any more so change the useage so buildworld works again. Notes: svn path=/head/; revision=99743