| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
| |
Add a test for the chown utility. This sets up chown(8) to be capable of being
tested. As such, only add one test for now as an example.
|
|
|
|
| |
This allows compilers and static analyzers to do more thorough analysis.
|
|
|
|
|
| |
Found with: Coverity Prevent
CID: 7040
|
| |
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
PR: 132834
Submitted by: "Alan R. S. Bueno" <alan.bsd@gmail.com>
|
| |
|
| |
|
| |
|
|
|
|
| |
from Berkeley.
|
| |
|
|
|
|
| |
Approved by: re (blanket)
|
| |
|
|
|
|
|
|
|
|
| |
the old and new uid/gid.
PR: 41341
Submitted by: Edward Brocklesby <nighthawk@unrealircd.com>
Reviewed by: bde@ (an older version)
|
| |
|
|
|
|
|
|
|
| |
when -R is combined with patterns that might match ".." (like ".*").
PR: 46415
Submitted by: Gary W. Swearingen <swear@attbi.com>
|
| |
|
|
|
|
|
|
| |
PR: 40695
Submitted by: Maxim Maximov <mcsi@agava.com>
MFC after: 1 week
|
| |
|
|
|
|
| |
and add a __FBSDID() while I'm here.
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
|
|
|
|
|
| |
PR: 36447
No objections from: ru
MFC after: 3 days
|
|
|
|
|
|
|
|
|
|
|
|
| |
(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.
|
| |
|
|
|
|
| |
parenthesis.
|
| |
|
|
|
|
|
| |
These are not perfectly in agreement with each other style-wise, but they
are orders of orders of magnitude more consistent style-wise than before.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
``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).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
PR: docs/27629
|
|
|
|
| |
- MAN[1-9] -> MAN.
|
| |
|
| |
|
| |
|
|
|
|
| |
Optimize out chown(2) syscalls if there is no change in uid or gid.
|
|
|
|
|
|
|
| |
Submitted by: Arindum Mukerji <rmukerji@execpc.com>
Approved by: JKH
Make the manpage more style(9) complient.
|
|
|
|
|
| |
and MAKEDEV(8) will be changed to not use chown(8), thus removing the
depdendance on a having /usr mounted.
|
|
|
|
|
| |
`MAKEDEV'. And one might need to `MAKEDEV' inorder to get a device node
in order to mount /usr from.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
track.
The Id line is normally at the bottom of the main comment block in the
man page, separated from the rest of the manpage by an empty comment,
like so;
.\" $Id$
.\"
If the immediately preceding comment is a @(#) format ID marker than the
the $Id$ will line up underneath it with no intervening blank lines.
Otherwise, an additional blank line is inserted.
Approved by: bde
|