#
331722 |
|
29-Mar-2018 |
eadler |
Revert r330897:
This was intended to be a non-functional change. It wasn't. The commit message was thus wrong. In addition it broke arm, and merged crypto related code.
Revert with prejudice.
This revert skips files touched in r316370 since that commit was since MFCed. This revert also skips files that require $FreeBSD$ property changes.
Thank you to those who helped me get out of this mess including but not limited to gonzo, kevans, rgrimes.
Requested by: gjb (re)
|
#
330897 |
|
14-Mar-2018 |
eadler |
Partial merge of the SPDX changes
These changes are incomplete but are making it difficult to determine what other changes can/should be merged.
No objections from: pfg
|
#
302408 |
|
07-Jul-2016 |
gjb |
Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle. Prune svn:mergeinfo from the new branch, as nothing has been merged here.
Additional commits post-branch will follow.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation |
#
282208 |
|
28-Apr-2015 |
smh |
Standardise chmod, chflags, chown and chgrp recursive symlink processing
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
|
#
227251 |
|
06-Nov-2011 |
ed |
Mark global functions and/or variables in chown(8) static where possible.
This allows compilers and static analyzers to do more thorough analysis.
|
#
208815 |
|
05-Jun-2010 |
trasz |
Plug resource leak.
Found with: Coverity Prevent CID: 7040
|
#
208792 |
|
03-Jun-2010 |
trasz |
Make chown(1) emit more useful error message when user/group name is invalid.
|
#
204165 |
|
21-Feb-2010 |
gavin |
Add a "-x" option to chown(8)/chgrp(1) similar to the same option in du(1), cp(1) etc, to prevent the crossing of mountpoints whilst using the commands recursively.
PR: bin/130855 Submitted by: keramida MFC after: 1 month
|
#
194494 |
|
19-Jun-2009 |
brooks |
In preparation for raising NGROUPS and NGROUPS_MAX, change base system callers of getgroups(), getgrouplist(), and setgroups() to allocate buffers dynamically. Specifically, allocate a buffer of size sysconf(_SC_NGROUPS_MAX)+1 (+2 in a few cases to allow for overflow).
This (or similar gymnastics) is required for the code to actually follow the POSIX.1-2008 specification where {NGROUPS_MAX} may differ at runtime and where getgroups may return {NGROUPS_MAX}+1 results on systems like FreeBSD which include the primary group.
In id(1), don't pointlessly add the primary group to the list of all groups, it is always the first result from getgroups(). In principle the old code was more portable, but this was only done in one of the two places where getgroups() was called to the overall effect was pointless.
Document the actual POSIX requirements in the getgroups(2) and setgroups(2) manpages. We do not yet support a dynamic NGROUPS, but we may in the future.
MFC after: 2 weeks
|
#
133248 |
|
07-Aug-2004 |
imp |
Per letter dated July 22, 1999, delete clause 3 from code directly from Berkeley.
|
#
119856 |
|
07-Sep-2003 |
charnier |
Use uid_t.
|
#
114601 |
|
03-May-2003 |
obrien |
Use __FBSDID over rcsid[]. Protect copyright[] where needed.
|
#
114005 |
|
25-Apr-2003 |
johan |
Similar to chmod(1); make -v -v mean very verbose and show the old and new uid/gid.
PR: 41341 Submitted by: Edward Brocklesby <nighthawk@unrealircd.com> Reviewed by: bde@ (an older version)
|
#
108443 |
|
30-Dec-2002 |
obrien |
Use basename(3).
|
#
100252 |
|
17-Jul-2002 |
dwmalone |
Fix a spelling mistake.
PR: 40695 Submitted by: Maxim Maximov <mcsi@agava.com> MFC after: 1 week
|
#
99141 |
|
30-Jun-2002 |
jmallett |
Kill __P(), use ANSI C function declarations, remove local prototype for main, and add a __FBSDID() while I'm here.
|
#
98935 |
|
27-Jun-2002 |
jmallett |
In the SUPPORT_DOT case, warn that seperation with a period is deprecated. In -STABLE, this is default, in -CURRENT it is not, which leads to many a headache for a user coming to -CURRENT without remembering this fact. It is one of the POLA violations we have not avoided by preparing the users for it appopriately. Therefore, a warnx(3) is added here, explicitly to be MFC'd shortly to start the re-education process rolling.
Reviewed by: General murmurs of approval in that IRC channel. MFC after: 3 days
|
#
97732 |
|
02-Jun-2002 |
tjr |
Don't exit immediately if an error occurs, continue but exit non-zero.
|
#
87893 |
|
14-Dec-2001 |
luigi |
Add prototypes for main() so that these programs compile with -Werror (which somehow now seems to be the default for compiling -current). This error popped up while doing a PicoBSD cross-compile on a 4.3-ish system, it may well be that there are other apps which have similar problems, but I did not spot them as they are not included in my picobsd config.
Whether adding prototypes for main() is the correct solution or not I have no idea, a request to -current on the matter went basically unanswered. Those who have better ideas are welcome to back this out and replace it with the correct fix.
|
#
83410 |
|
13-Sep-2001 |
ru |
Clean up, WARNSify, unbreak -v option handling.
|
#
77522 |
|
31-May-2001 |
ru |
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).
|
#
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
|
#
64014 |
|
29-Jul-2000 |
peter |
Initialize vflag like the rest (not necessary, but this keeps it together) Optimize out chown(2) syscalls if there is no change in uid or gid.
|
#
57830 |
|
08-Mar-2000 |
obrien |
Somehow I didn't get all the "-v" code commited. Submitted by: Arindum Mukerji <rmukerji@execpc.com> Approved by: JKH
Make the manpage more style(9) complient.
|
#
53780 |
|
27-Nov-1999 |
obrien |
Add "-v".
|
#
50479 |
|
27-Aug-1999 |
peter |
$Id$ -> $FreeBSD$
|
#
35632 |
|
03-May-1998 |
bde |
Backed out previous commit. chown(8) doesn't follow symlinks by default, at least in BSD. This used to be automatic, because chown(2) didn't follow symlinks. When chown(2) was changed to follow symlinks in BSD4.4, chown(8) was changed to not follow symlinks by default. The previous commit broke this. The first victim was bsd.prog.mk, which uses a plain chown in an attempt to change the ownership of the symlinks to `dm' in /usr/games. This fails when it is done before dm is installed, or messes up the ownership of dm if dm is installed.
Unfixed problems: 1. When lchown(2) was implemented, chown(8) wasn't changed to implement the historical behaviour of changing ownership of symlinks. I'm not sure if it should have been. The -HLP options give more complete control, but they unfortunately don't apply unless the -R option is specified (a problem shared with other commands, e.g., cp; I guess we're supposed to use -R even for non-recursive traversals). 2. If we implement the historical behaviour, then -h would become a no-op and should be left undocumented. 3. The man page suggests that without option -h, all symlinks (to files specified in the command line?) are followed. It's not clear what "the file" is. These bugs were introduced when -h was documented. 4. The correct interaction of -h with the other flags is not clear.
|
#
35622 |
|
02-May-1998 |
helbig |
Don't ignore symbolic links in the absence of -h, -H or -L options. Instead change the user ID/group ID of the file that the link points to.
|
#
34399 |
|
09-Mar-1998 |
jkh |
Allow -R and -h to be combined as long as no symlink-following flags are also requested. Submitted by: Andre Albsmeier <andre.albsmeier@mchp.siemens.de>
|
#
29656 |
|
21-Sep-1997 |
wosch |
Chown(8) compiled with -DSUPPORT_DOT (backward compatibility) does first check for a `.' and then for `:' as a delimiter. Usernames with a dot will fail.
# chown r.r:bin /tmp/bla chown: r:bin: illegal group name
Fix: first check for a `:' and then for a `.'
|
#
29105 |
|
04-Sep-1997 |
charnier |
Cosmetic in man page. Sync usage() with man page.
|
#
28643 |
|
24-Aug-1997 |
steve |
Correct error message when the superuser tries to change the group of immutable files.
PR: bin/3445 Submitted by: Pius Fischer <pius@ienet.com>
|
#
24446 |
|
31-Mar-1997 |
peter |
Activate the -h flag which tells chown/chgrp to work on the symlink itself using lchown(). Most of the code was already here, the option was recognised but ignored for SYSV/POSIX.2(?) compatability.
|
#
24428 |
|
31-Mar-1997 |
imp |
compare return value from getopt against -1 rather than EOF, per the final posix standard on the topic.
|
#
17597 |
|
14-Aug-1996 |
adam |
chown(8) and chgrp(1) directories once only
|
#
8857 |
|
30-May-1995 |
rgrimes |
Remove trailing whitespace.
|
#
3032 |
|
23-Sep-1994 |
dg |
groups[] is of type gid_t.
|
#
1554 |
|
26-May-1994 |
rgrimes |
This commit was generated by cvs2svn to compensate for changes in r1553, which included commits to RCS files with non-trunk default branches.
|
#
1553 |
|
26-May-1994 |
rgrimes |
BSD 4.4 Lite usr.sbin Sources
|