History log of /freebsd-9.3-release/bin/chflags/
Revision Date Author Comments
267654 20-Jun-2014 gjb

Copy stable/9 to releng/9.3 as part of the 9.3-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


225736 23-Sep-2011 kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by: re (implicit)


213573 08-Oct-2010 uqs

mdoc: drop redundant .Pp and .LP calls

They have no effect when coming in pairs, or before .Bl/.Bd


194795 23-Jun-2009 delphij

Staticify internal routines.


192687 24-May-2009 jilles

Fix chflags -h in various cases: do not use link target's flags as original.

Patch slightly changed to align more with chmod.c.

PR: bin/131999
Submitted by: bde
Approved by: ed (mentor)
MFC after: 3 weeks


176976 09-Mar-2008 rwatson

Make chflags(1) more chmod(1)-like (and more feature complete):

- Add -v to print file names as they are processed; -vv prints the flags
change as well.
- Add -f to ignore failures with the same semantics as chflags(1), neither
printing an error nor affecting the return code.
- Don't try to set the flags if they won't change.

I made minor cosmetic tweaks to the code in the patch.

MFC after: 1 week
PR: 112827
Submitted by: Ighighi <ighighi at gmail.com>


170045 28-May-2007 pjd

Fix probably copy&paste from chmod(1) - we change file flags here, not mode.


156536 10-Mar-2006 trhodes

Use .Cm for all key words, not just the ones I added. More in line with
mdoc(7) according to ru.

Requested by: ru


156338 06-Mar-2006 trhodes

Slightly better markup.

Discussed with: ru


156269 04-Mar-2006 trhodes

Instead of just hinting at available octets, list some.
Mention that the setting of securelevel may affect one's ability to alter flags.
Xref security.7.
Bump doc date.


147363 14-Jun-2005 ru

Sort sections.

Approved by: re (blanket)


146224 14-May-2005 dd

Add an interface to the lchflags(2) syscall. The new -h option is
analogous to chmod(1)'s -h. It allows setting flags on symbolic links,
which *do* exist in 5.x+ despite a claim to the contrary in the
chflags(1) man page.

Suggested by: Chris Dillon


142412 25-Feb-2005 trhodes

Fix a few markup nits in previous commit.

Noticed by: ru, who else? :)


142339 23-Feb-2005 trhodes

Add information on utilities which may or may not be aware of file flags.

PR: 55653
Submitted by: Tony Maher <tonymaher@optushome.com.au> (original version)


140901 27-Jan-2005 delphij

WARNS?=6 is already in bin/Makefile.inc, so remove this one.


140353 16-Jan-2005 ru

Add the new standard EXIT STATUS section where appropriate.
Sort standard sections in the (documented) preferred order.


139969 10-Jan-2005 imp

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


136089 03-Oct-2004 stefanf

chflags compiles with WARNS?=6.


136088 03-Oct-2004 stefanf

Garbage collect a variable whose value was never read.


135542 21-Sep-2004 keramida

Group equivalent flags together and delete the `aliases' section.

PR: docs/70856
Submitted by: Rostislav Krasny <rosti_bsd@yahoo.com>


127958 06-Apr-2004 markm

Remove clause 3 from the UCB licenses.

OK'ed by: imp, core


125972 18-Feb-2004 ceri

Only call chflags() on directories once.

Approved by: ru
MFC after: 1 week


115081 16-May-2003 ru

mdoc(7) police: Fix document date.

Approved by: re (blanket)


114423 01-May-2003 obrien

Make GCC 3.3 STFU about copyright[].


112557 24-Mar-2003 johan

Document how to clear flags with negative-logic, currently only
the nodump flag.

PR: 46912
Reported by: dave@syix.com <dave@syix.com>
MFC after: 2 weeks


111132 19-Feb-2003 obrien

We can simplify this Makefile down to a single line now.


102944 04-Sep-2002 dwmalone

ANSIify function definitions.
Add some constness to avoid some warnings.
Remove use register keyword.
Deal with missing/unneeded extern/prototypes.
Some minor type changes/casts to avoid warnings.

Reviewed by: md5


102084 19-Aug-2002 jmallett

Remove local prototypes for main().


95654 28-Apr-2002 markm

Reorder for style.


92920 22-Mar-2002 imp

remove __P


90415 08-Feb-2002 markm

Remove leaf node WARNS?=2 (that mainly I added). This should
help the GCC3 transition and CURRENT in general.


87628 10-Dec-2001 dwmalone

Style improvements recommended by Bruce as a follow up to some
of the recent WARNS commits. The idea is:

1) FreeBSD id tags should follow vendor tags.
2) Vendor tags should not be compiled (though copyrights probably should).
3) There should be no blank line between including cdefs and __FBSDIF.


87237 02-Dec-2001 markm

Slight makefile style.

Use __FBSDID().


81687 15-Aug-2001 ru

mdoc(7) police: utilize the new .Ex macro.


78624 22-Jun-2001 dd

WARNS= -> WARNS?=

Submitted by: Mike Barcroft <mike@q9media.com>


77333 28-May-2001 ru

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


77160 25-May-2001 ru

Make it clear that -P is the default.

PR: docs/27629


76890 20-May-2001 kris

Silence WARNS=2 and BDECFLAGS on alpha and i386

MFC after: 1 week


70197 19-Dec-2000 ru

Prepare for mdoc(7)NG.


68963 20-Nov-2000 ru

mdoc(7) police: use the new features of the Nm macro.


68542 10-Nov-2000 obrien

Install `chflags' in the root partition, NOT /usr where it is not available
in single user mode.


61749 17-Jun-2000 joe

Switch over to using the new fflagstostr and strtofflags library calls.


59009 04-Apr-2000 bde

Fixed prototype for setflags(). setflags() returns int, not u_long,
and "extern" in function prototypes is a style bug. The type mismatch
broke chflags(1) on i386's with 64-bit longs and may have broken it on
alphas.


58987 03-Apr-2000 jdp

Document that the flags can be specified as an octal number.


57003 05-Feb-2000 joe

Revert part of the last commit, remove {g|s}etflags from the libc
interface, and statically link them to the programs using them.
These functions, upon reflection and discussion, are too generically
named for a library interface with such specific functionality.
Also the api that they use, whilst ok for private use, isn't good
enough for a libc function.

Additionally there were complications with the build/install-world
process. It depends heavily upon xinstall, which got broken by
the change in api, and caused bootstrap problems and general mayhem.

There is work in progress to address future problems that may be
caused by changes in install-chain tools, and better names for
{g|s}etflags can be derived when some future program requires them.
For now the code has been left in src/lib/libc/gen (it started off
in src/bin/ls).

It's important to provide library functions for manipulating file
flag strings if we ever want this interface to be adopted outside
of the source tree, but now isn't necessarily the right moment
with 4.0-release just around the corner.

Approved: jkh


56692 27-Jan-2000 joe

Historically file flags (schg, uschg, etc) have been converted from
string to u_long and back using two functions, flags_to_string and
string_to_flags, which co-existed with 'ls'. As time has progressed
more and more other tools have used these private functions to
manipulate the file flags.

Recently I moved these functions from /usr/src/bin/ls to libutil,
but after some discussion with bde it's been decided that they
really ought to go in libc.

There are two already existing libc functions for manipulating file
modes: setmode and getmode. In keeping with these flags_to_string
has been renamed getflags and string_to_flags to setflags.

The manual page could probably be improved upon ;)


55302 01-Jan-2000 joe

Added missing DPADD's. Removed unrequired SRCS's.

Obtained from: bde


55270 30-Dec-1999 joe

Moved flags_to_string and string_to_flags into libutil. It's used in
many places nowadays.


53507 21-Nov-1999 charnier

Correct use of .Nm. Add DIAGNOSTICS section. Add rcsid


50613 30-Aug-1999 bde

Yet another previously forgotten merge from Lite2. (Describe
`opaque', fix reversed description of `nodump', and don't use
`nodump' as an example of adding a `no' prefix since the double
negative would be confusing (it's still confusing -- the implicitly
documented `nonodump' flag doesn't exist).)


50477 28-Aug-1999 peter

$Id$ -> $FreeBSD$


41568 06-Dec-1998 archie

Tweaks to allow compiling -Wall (mostly adding "const" to char rcsid[]).


27040 29-Jun-1997 pst

NOSHARED takes a yes/YES no/NO value, not "true, false, hey mon!".
NOPIC is used to not generate a shared library, not NOSHARED.
Make NOSHARED advisory where appropriate.
Remove bogus NOSHARED (kbdio).


26883 24-Jun-1997 charnier

Document the use of `ls -lo' to see flags.
Obtained from: OpenBSD.


26360 02-Jun-1997 julian

Submitted by: Whistle Communications (archie Cobbs)

These changes add the ability to specify that a UFS file/directory
cannot be unlinked. This is basically a scaled back version
of the IMMUTABLE flag. The reason is to allow an administrator
to create a directory hierarchy that a group of users
can arbitrarily add/delete files from, but that the hierarchy
itself is safe from removal by them.
If the NOUNLINK definition is set to 0
then this results in no change to what happens normally.
(and results in identical binary (in the kernel)).
It can be proven that if this bit is never set by the admin,
no new behaviour is introduced..
Several "good idea" comments from reviewers plus one grumble
about creeping featurism.

This code is in production in 2.2 based systems


24360 29-Mar-1997 imp

compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.


22921 19-Feb-1997 mpp

Use the .Bx macro in the HISTORY section.


22908 19-Feb-1997 obrien

Add history section. Follows chflags(2).


9673 24-Jul-1995 rgrimes

Set NOSHARED=true, having this binary static makes it much easier to
fix /usr/lib/*.so problems.

Submitted by: davidg


8874 30-May-1995 rgrimes

Remove trailing whitespace.


5249 27-Dec-1994 bde

Document the arch flag. It has always worked in 2.0.

Document aliases for the flags.

The formatting of the section describing the flags is poor.


1590 27-May-1994 rgrimes

BSD 4.4 Lite Usr.bin Sources