History log of /freebsd/bin/chmod/chmod.c (Results 26 – 50 of 102)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# f0246686 02-Sep-2009 Edward Tomasz Napierala <trasz@FreeBSD.org>

- Don't include both <sys/types.h> and <sys/param.h>

- 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

- Don't include both <sys/types.h> and <sys/param.h>

- 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

show more ...


# c5cb1e51 31-Aug-2009 Edward Tomasz Napierala <trasz@FreeBSD.org>

Make the code more readable and fix chmod(1) on symlinks with
NFSv4 enabled.


# 09c817ba 03-Jul-2009 Oleksandr Tymoshenko <gonzo@FreeBSD.org>

- MFC


# deda5987 01-Jul-2009 Edward Tomasz Napierala <trasz@FreeBSD.org>

With NFSv4 ACLs, it is possible that applying a mode to an ACL which
is identical to the mode computed from that ACL will modify the ACL.
For example, mode computed from the following ACL is 0600:

With NFSv4 ACLs, it is possible that applying a mode to an ACL which
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)

show more ...


# 431586a8 24-Jun-2009 Xin LI <delphij@FreeBSD.org>

Staticify internal routines.


Revision tags: release/7.2.0_cvs, release/7.2.0, release/7.1.0_cvs, release/7.1.0, release/6.4.0_cvs, release/6.4.0, release/7.0.0_cvs, release/7.0.0, release/6.3.0_cvs, release/6.3.0, release/6.2.0_cvs, release/6.2.0, release/5.5.0_cvs, release/5.5.0, release/6.1.0_cvs, release/6.1.0, release/6.0.0_cvs, release/6.0.0, release/5.4.0_cvs, release/5.4.0, release/4.11.0_cvs, release/4.11.0
# 9ddb49cb 10-Jan-2005 Warner Losh <imp@FreeBSD.org>

/*- or .\"- or #- to begin license clauses.


Revision tags: release/5.3.0_cvs, release/5.3.0, release/4.10.0_cvs, release/4.10.0
# 6195fb41 06-Apr-2004 Mark Murray <markm@FreeBSD.org>

Remove clause 3 from the UCB licenses.

OK'ed by: imp, core


Revision tags: release/5.2.1_cvs, release/5.2.1, release/5.2.0_cvs, release/5.2.0
# 887cb17f 16-Dec-2003 Ruslan Ermilov <ru@FreeBSD.org>

Print unambiguous paths with -R -v.


# ad6a34de 31-Oct-2003 Anton Berezin <tobez@FreeBSD.org>

Remove the code for parsing octal modes, since setmode(3) already
handles them.

Reviewed by: audit
MFC after: 2 weeks


Revision tags: release/4.9.0_cvs, release/4.9.0, release/5.1.0_cvs, release/5.1.0
# 09a80d48 01-May-2003 David E. O'Brien <obrien@FreeBSD.org>

Quiet warnings about copyright[].


Revision tags: release/4.8.0_cvs, release/4.8.0
# 572417c7 29-Jan-2003 Maxime Henrion <mux@FreeBSD.org>

Remove now unnecessary main() prototype.


Revision tags: release/5.0.0_cvs, release/5.0.0, release/4.7.0_cvs, release/4.6.2_cvs, release/4.6.2
# 30d90946 04-Aug-2002 David E. O'Brien <obrien@FreeBSD.org>

Allow "-v -v" to mean very verbose.

Reviewed by: freebsd-standards
PR: 40709
Submitted by: Edward Brocklesby <nighthawk@unrealircd.com>, johan


Revision tags: release/4.6.1
# 3951e2ab 10-Jul-2002 Matthew Dillon <dillon@FreeBSD.org>

err() is documented as allowing NULL for the format string but GCC isn't
happy about it any more so change the useage so buildworld works again.


Revision tags: release/4.6.0_cvs
# 5eb43ac2 30-Jun-2002 David E. O'Brien <obrien@FreeBSD.org>

Consistently use __FBSDID


# 71bea4f7 22-Feb-2002 Mark Murray <markm@FreeBSD.org>

Fix warnings inspired by lint, a commercial lint and WARNS=4


Revision tags: release/4.5.0_cvs, release/4.4.0_cvs
# 5dce647c 02-Feb-2002 Warner Losh <imp@FreeBSD.org>

Modernization effort for bin/c*:

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 (

Modernization effort for bin/c*:

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)

show more ...


# 01b4e93e 31-May-2001 Ruslan Ermilov <ru@FreeBSD.org>

Fixed the bug from the previous revision.

``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 nobo

Fixed the bug from the previous revision.

``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).

show more ...


# abb1dad1 28-May-2001 Ruslan Ermilov <ru@FreeBSD.org>

Change noop option -h to do the real work. Now mode of symbolic link
is changed if -h option is given.

Requested by: bde
Obtained from: NetBSD (code part)


# 8e46d9c2 28-May-2001 Ruslan Ermilov <ru@FreeBSD.org>

Follow symbolic links named as command line arguments if run without -R.

This is required by symlink(7), ``Commands not traversing a file tree''
subsection, third paragraph:

: It is important to re

Follow symbolic links named as command line arguments if run without -R.

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

show more ...


# 925d09e9 20-May-2001 Kris Kennaway <kris@FreeBSD.org>

Make this compile with WARNS=2


Revision tags: release/4.3.0_cvs, release/4.3.0, release/4.2.0, release/4.1.1_cvs
# 1510e9e7 30-Jul-2000 Peter Wemm <peter@FreeBSD.org>

Optimize out no-op chmod() syscalls.


Revision tags: release/4.1.0
# daad7b8c 10-Jul-2000 Kris Kennaway <kris@FreeBSD.org>

Don't call warn() with no format string. This is potentially exploitable, although it
would be difficult both technically and in practise.


Revision tags: release/3.5.0_cvs, release/4.0.0_cvs, release/3.4.0_cvs
# a082153a 28-Nov-1999 David E. O'Brien <obrien@FreeBSD.org>

Default to not -v.
Fix usage() style bug spotted by BDE.


# 5bb83b98 27-Nov-1999 David E. O'Brien <obrien@FreeBSD.org>

Add "-v".


Revision tags: release/3.3.0_cvs
# 2a456239 28-Aug-1999 Peter Wemm <peter@FreeBSD.org>

$Id$ -> $FreeBSD$


12345