Commit Graph

78 Commits

Author SHA1 Message Date
Glen Barber
43faedc133 First pass to fix the 'tests' packages.
Sponsored by:	The FreeBSD Foundation
2016-02-02 22:26:49 +00:00
Simon J. Gerraty
ccfb965433 Add META_MODE support.
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
2015-06-13 19:20:56 +00:00
Simon J. Gerraty
44d314f704 dirdeps.mk now sets DEP_RELDIR 2015-06-08 23:35:17 +00:00
Simon J. Gerraty
98e0ffaefb Merge sync of head 2015-05-27 01:19:58 +00:00
Steven Hartland
ad34cace15 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
2015-04-29 00:49:00 +00:00
Simon J. Gerraty
ee7b0571c2 Merge head from 7/28 2014-08-19 06:50:54 +00:00
Eitan Adler
72c7dfe3aa chown: Fix chown test number 2014-07-17 06:57:26 +00:00
Eitan Adler
4bfdbb0b56 chown: add a test
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.
2014-06-30 05:33:52 +00:00
Simon J. Gerraty
fae50821ae Updated dependencies 2014-05-16 14:09:51 +00:00
Simon J. Gerraty
76b28ad6ab Updated dependencies 2014-05-10 05:16:28 +00:00
Simon J. Gerraty
7cf3a1c6b2 Updated dependencies 2013-03-11 17:21:52 +00:00
Simon J. Gerraty
f5f7c05209 Updated dependencies 2013-02-16 01:23:54 +00:00
Marcel Moolenaar
7750ad47a9 Sync FreeBSD's bmake branch with Juniper's internal bmake branch.
Requested by: Simon Gerraty <sjg@juniper.net>
2012-08-22 19:25:57 +00:00
Ed Schouten
d35fcc6826 Mark global functions and/or variables in chown(8) static where possible.
This allows compilers and static analyzers to do more thorough analysis.
2011-11-06 19:01:41 +00:00
Edward Tomasz Napierala
3e6ce93ee1 Plug resource leak.
Found with:	Coverity Prevent
CID:		7040
2010-06-05 08:11:11 +00:00
Edward Tomasz Napierala
ab3bbb3b18 Make chown(1) emit more useful error message when user/group name is invalid. 2010-06-03 20:46:23 +00:00
Gavin Atkinson
1901b12462 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
2010-02-21 10:14:06 +00:00
Ed Schouten
71ccf09269 The last big commit: let usr.sbin/ use WARNS=6 by default. 2010-01-02 11:07:44 +00:00
Brooks Davis
54404cfb13 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
2009-06-19 15:58:24 +00:00
Tom Rhodes
6abf213ba4 Fix punctuation.
PR:		132834
Submitted by:	"Alan R. S. Bueno" <alan.bsd@gmail.com>
2009-04-01 08:33:54 +00:00
Ruslan Ermilov
0227791b40 Expand *n't contractions. 2005-02-13 22:25:33 +00:00
Ruslan Ermilov
59a3c79da6 Sort sections. 2005-01-18 20:02:45 +00:00
Ruslan Ermilov
a866e17077 Added the EXIT STATUS section where appropriate. 2005-01-17 07:44:44 +00:00
Warner Losh
23717fc46a Per letter dated July 22, 1999, delete clause 3 from code directly
from Berkeley.
2004-08-07 04:19:37 +00:00
Philippe Charnier
0c806fab67 Use uid_t. 2003-09-07 16:43:53 +00:00
Ruslan Ermilov
db1e3a4f98 Erase whitespace at EOL.
Approved by:	re (blanket)
2003-05-22 11:56:41 +00:00
David E. O'Brien
b728350ee6 Use __FBSDID over rcsid[]. Protect copyright[] where needed. 2003-05-03 21:06:42 +00:00
Johan Karlsson
ae29e30076 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)
2003-04-25 08:57:55 +00:00
David E. O'Brien
052238b16c style.Makefile(5) 2003-04-04 17:49:21 +00:00
Giorgos Keramidas
0f2e01e04d Reword the description of -R a bit and add a note about being careful
when -R is combined with patterns that might match ".." (like ".*").

PR:		46415
Submitted by:	Gary W. Swearingen <swear@attbi.com>
2003-01-26 02:40:23 +00:00
David E. O'Brien
987d3799f3 Use basename(3). 2002-12-30 10:16:56 +00:00
David Malone
999feccf15 Fix a spelling mistake.
PR:		40695
Submitted by:	Maxim Maximov <mcsi@agava.com>
MFC after:	1 week
2002-07-17 16:22:24 +00:00
Philippe Charnier
490d5836b5 The .Nm utility 2002-07-14 14:47:15 +00:00
Juli Mallett
7aed2b41a4 Kill __P(), use ANSI C function declarations, remove local prototype for main,
and add a __FBSDID() while I'm here.
2002-06-30 15:30:14 +00:00
Juli Mallett
ec6c14f6eb 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
2002-06-27 21:23:16 +00:00
Tim J. Robbins
dcafd7c96a Don't exit immediately if an error occurs, continue but exit non-zero. 2002-06-02 09:32:39 +00:00
Ruslan Ermilov
a37bec1d74 mdoc(7) police: removed an extra .Op call. 2002-05-30 07:48:01 +00:00
Tom Rhodes
4ace33924b chown(8) was not describing symlinks correctly, fixed.
PR:	36447
No objections from: ru
MFC after:	3 days
2002-04-09 20:24:23 +00:00
Luigi Rizzo
69393d0646 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.
2001-12-14 16:22:41 +00:00
Ruslan Ermilov
8f9dacc2e6 Clean up, WARNSify, unbreak -v option handling. 2001-09-13 14:55:59 +00:00
Dima Dorfman
5fa09bc197 If a sentence starts inside parenthesis, it should end inside
parenthesis.
2001-09-11 13:07:03 +00:00
Ruslan Ermilov
d628d776c4 mdoc(7) police: utilize the new .Ex macro. 2001-08-15 09:09:47 +00:00
David E. O'Brien
90e655ea4e Perform a major cleanup of the usr.sbin Makefiles.
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.
2001-07-20 06:20:32 +00:00
Ruslan Ermilov
a4c37c816b mdoc(7) police: removed HISTORY info from the .Os call. 2001-07-10 15:12:08 +00:00
David E. O'Brien
b368031d99 Starting with 5.0-R, do not support `.' as a owner / group delimiter. 2001-05-31 19:30:19 +00:00
Ruslan Ermilov
01b4e93eff 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).
2001-05-31 11:47:20 +00:00
Ruslan Ermilov
8e46d9c279 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
2001-05-28 12:58:10 +00:00
Ruslan Ermilov
95a09b0557 Make it clear that -P is the default.
PR:		docs/27629
2001-05-25 07:32:58 +00:00
Ruslan Ermilov
345e52e742 - Backout botched attempt to introduce MANSECT feature.
- MAN[1-9] -> MAN.
2001-03-26 14:42:20 +00:00
Ruslan Ermilov
47dec78170 mdoc(7) police: use the default ``file ...'' feature of the .Ar macro. 2001-02-13 09:56:35 +00:00