Commit Graph

1832 Commits

Author SHA1 Message Date
Ruslan Ermilov
fe08efe680 mdoc(7): Use the new feature of the .In macro. 2003-09-08 19:57:22 +00:00
Ruslan Ermilov
7b0ac2826b Don't escape names in MLINKS: this won't work with bsd.man.mk,v 1.53. 2003-09-07 12:52:17 +00:00
Jens Schweikhardt
4fe15b85a6 Fix testing of arith_assign() value for $((a=15)).
Submitted by:	Enache Adrian <enache@rdslink.ro>
2003-09-07 10:14:56 +00:00
Tim J. Robbins
94508dc9c8 #include <string.h> for prototypes for strcpy() and strlen().
Submitted by:	Stefan Farfeleder
2003-09-06 16:33:55 +00:00
Jens Schweikhardt
de7112e1ba Style cleanup, mostly
Requested by:	bde
2003-09-04 18:28:42 +00:00
Jens Schweikhardt
bc411549ba Implement missing shell arithmetic operators in $(()) expansion
and variable recognition.

PR:		standards/52972
Submitted by:	Wartan Hachaturow <wart@tepkom.ru>
Reviewed by:	tjr (improved on original patch)
Tested by:	buildworld on CURRENT.
MFC after:	6 weeks
2003-08-30 12:31:44 +00:00
Gordon Tetlow
442afd046f Stage 4 of dynamically linked root support. Add a big knob,
WITH_DYNAMICROOT, which will toggle the generation of dynamically-linked
binaries for installation in /bin and /sbin. It is currently off,
meaning that /bin and /sbin are still statically linked by default.

If something goes wrong (which I hope doesn't), this is what /rescue is
all about. Please do not try to use WITH_DYNAMICROOT and NO_RESCUE to
save space or some other equally silly reason. If you do and end up
having problems, you have been warned.
2003-08-17 08:37:47 +00:00
Hartmut Brandt
de244df7c9 Implement the nwchan keyword that has been in the man page, but was
not implemented. This is just handy if you want to ddb the address
some process is waiting on.
2003-08-13 07:35:07 +00:00
Jens Schweikhardt
a3c75939e8 Note in STANDARDS that -gno are not (yet?) POSIX conformant.
Spotted by:	harti
MFC after:	3 days
2003-08-08 17:04:17 +00:00
Robert Watson
ea03990629 Add additional documentation to setfacl(1) regarding the behavior of
tools such as chmod(1) and ls(1) when it comes to acting on objects
that have POSIX.1e extended ACLs.  Specifically, discuss the
substitution of the mask entry for the group entry in the mode
representation of the ACL.  Differently worded from the submission,
and could probably use further refinement.

PR:		55319
Submitted by:	Grzegorz Czaplinski <G.Czaplinski@prioris.mini.pw.edu.pl>
2003-08-07 14:52:17 +00:00
Robert Watson
95e367261e -v no longer a valid argument to setfacl(1) -- remove from usage().
PR:		55318
Submitted by:	Grzegorz Czaplinski <G.Czaplinski@prioris.mini.pw.edu.pl>
2003-08-07 14:43:43 +00:00
Christian Brueffer
a54b88d830 Clarify that the 'state' information consists of characters, not
only letters (e.g. IWs+)

PR:		55221
Submitted by:	Rich Morin <rdm@cfcl.com>
MFC after:	3 days
2003-08-05 10:31:28 +00:00
Andrey A. Chernov
508f10f7c1 Remove collate_range_cmp() stabilization, it conflicts with ranges 2003-08-03 04:28:10 +00:00
Mark Murray
ebb9f0efa8 Don't check for the existance of src/crypto/ for building items that
may contain crypto. The days of ITAR paranoia are over, and the simple
macro tests that remain are sufficient.
2003-07-24 18:30:25 +00:00
Ruslan Ermilov
8fe29a4f17 This code isn't WARNS=6 clean in the standard (crypto) case
due to bugs in OpenSSL headers.  I was testing in the wrong
environmement: standalone build without crypto/ sources.
2003-07-20 12:26:24 +00:00
Ruslan Ermilov
ff572a5e73 Make this code WARNS=6 clean again (after GCC 3.1.1 import).
Submitted by:	Marius Strobl <marius@alchemy.franken.de>
2003-07-20 10:24:09 +00:00
Robert Watson
4615eb20c3 When reporting an error internalizing an ACL string, print out the
ACL that generated the error, rather than the function, which is
more user-friendly.

Obtained from:	TrustedBSD Project
Product of:	France
2003-07-18 16:00:26 +00:00
Alexander Kabaev
08cbb1d115 Temporarily turn off -Werror for these components. 2003-07-11 05:24:32 +00:00
Christian Brueffer
d18ff742dc -l prints all permissions, not just owner and group
PR:		54294
Submitted by:	Per Hedeland <per@hedeland.org>
MFC after:	3 days
2003-07-10 20:53:56 +00:00
Gregory Neil Shapiro
dce6e6518b Remove MAINTAINER= lines from individual Makefiles in favor of the
MAINTAINER file (which already had entries for sendmail).
2003-07-07 03:54:04 +00:00
Diomidis Spinellis
2ba1b30bf5 Changes following CScout analysis:
- Removed dead declarations
- Made objects that should have been declared as static, static.

The changes use STATIC instead of static, following the existing
convention in the rest of the code.

Approved by:	schweikh (mentor)
MFC after:	2 weeks
2003-07-05 15:18:44 +00:00
Alexander Kabaev
be0d01f895 Rename a local variable in order to avoid collision with standard 'log'
function.
2003-06-30 17:05:40 +00:00
John-Mark Gurney
529a7167bd pass -1 to setfile in cp.c
Submitted by:	Jun Kuriyama
2003-06-30 06:16:06 +00:00
Gordon Tetlow
6d1b4a4730 Tweak a couple of utilities so they compile cleanly for /rescue. Mostly
path fixes.

Submitted by:	Tim Kientzle <kientzle@acm.org>
2003-06-29 18:46:18 +00:00
Ruslan Ermilov
ce17762f4a Unbreak NOCRYPT buildworld.
Reviewed by:	markm
2003-06-29 10:03:35 +00:00
John-Mark Gurney
a6b05ab6ea support saving both user/group and permissions on symlinks (from PR)
also fix a slight bogon that assumed an fd of 0 was not valid.  Changed
it to be -1.

PR:		bin/25017
Submitted by:	Martin Kammerhofer
2003-06-22 07:02:17 +00:00
Mark Murray
eac4bdcca4 Get this area compiling with the highest WARNS= that it works with.
Obsolete WFORMAT= junk also removed where possible.

OK'ed by:	obrien
Tested on:	sparc64, alpha, i386
2003-06-13 07:04:02 +00:00
Scott Long
48b8c0de5a Add the -H option to ps(1) to display all kernel visible threads in each
process.  The default behavior of showing only the process is retained as
the default.
2003-06-12 16:53:55 +00:00
Philippe Charnier
c6e6912512 add section name to .Xr 2003-06-08 09:48:39 +00:00
Mark Murray
8027fe397a Fix for the NO_OPENSSL case.
Reported by:	Marius Strobl <marius@alchemy.franken.de>
2003-06-08 08:24:07 +00:00
Ruslan Ermilov
7d2191c827 Clarify what -p option does.
Prodded by:	marcel

While here, spell the "set-{user,group}-ID bit" correctly.
2003-06-07 06:35:36 +00:00
Jun Kuriyama
3a624f5e23 Use
cat ${.ALLSRC} > ${.TARGET}
rather than
	ln -sf ${.ALLSRC} ${.TARGET}
not to depends on absolute-path of symbolic links.

Commented by:  marcel, obrien, bde
2003-06-06 13:46:55 +00:00
John Hay
ae75fcbdb0 Make ed compile in the NOCRYPT case.
Reviewed by:	markm
2003-06-03 17:03:48 +00:00
Bruce Evans
1da10b118b Catch up with revs 1.49-1.50 of df.c: don't mention -t in the BUGS section
since it has been fixed.
2003-06-03 12:00:35 +00:00
Bruce Evans
0e7d023f34 Fixed exit code in previous commit. "var++" to set a flag to nonzero
is a style bug at best.  When the variable isn't a flag, it potentially
overflows after a large number of settings.  Here the number of settings
is limited by ARG_MAX, but the variable is the exit code so it became
bogus after the second setting and effectively overflowed to 0 after
approx. 128 settings.

Fixed some style bugs involving comments in and near previous commit.

Clarification of previous commit message: df -t didn't give undefined
behaviour, and the behaviour used to conform perfectly with the man
page, since the buggy behaviour is documented in the BUGS section.  -t
just worked when no files or file systems were specified, and was just
ignored if a file or file system was specified.
2003-06-03 11:54:42 +00:00
Jordan K. Hubbard
c22acefba5 From the df man page:
-t Only print out statistics for filesystems of the specified types.

Make the behavior of df(1) conform to its man page (behavior is otherwise
undefined).

Submitted by:	Rob Braun <bbraun@apple.com>
Obtained from:	Apple
2003-06-02 22:33:12 +00:00
Mark Murray
eb338d3666 Modernise. Use libcrypto for DES instead of libcipher. 2003-06-02 19:06:28 +00:00
Bill Fenner
99907703d9 Instead of eating trailing newlines after inserting them into the
output buffer, don't insert them at all.  This prevents a buffer
*underrun* when the substitution consists completely of newlines
(e.g. `echo`) and the byte before the source buffer to which p
points is a '\n', in which case more characters would be removed
from the output buffer than were inserted.

This fixes certain port builds on sparc64.

Approved by:	re (scottl)
Reviewed by:	des, tjr
2003-05-31 06:27:57 +00:00
Ruslan Ermilov
c75a6a726b Erase whitspace at EOL.
Approved by:	re (blanket)
2003-05-22 13:10:32 +00:00
Dag-Erling Smørgrav
7691f66abf Retire the useless NOSECURE knob.
Approved by:	re (scottl)
2003-05-19 15:52:01 +00:00
Ruslan Ermilov
d74e011ff0 mdoc(7) police: A better version of the same.
Approved by:	re (blanket)
2003-05-16 21:19:32 +00:00
Ruslan Ermilov
b289f982ea mdoc(7) police: Fix document date.
Approved by:	re (blanket)
2003-05-16 21:18:01 +00:00
Jens Schweikhardt
005fd5b64b Note that -n and \c are implementation-defined as per TC1 to POSIX 2001.
Approved by:	re@ (bmah)
MFC after:	3 days
2003-05-08 17:47:28 +00:00
Tom Rhodes
bf88fa9352 df(1) and ls(1) print units in 'four or fewer' not 'three or less'.
PR:		35523
Submitted by:	Tomas Svensson <tsn@gbdev.net>
2003-05-06 21:54:46 +00:00
David E. O'Brien
8d5c19ffbc Centralize _PATH_* definitions.
Submitted by:	Tim Kientzle <kientzle@acm.org> (embellished by me)
2003-05-05 22:49:23 +00:00
Mark Murray
6f0a94a9f1 Fix long constant usage for i386.
Tested by:	Joe Marcus Clarke <marcus@marcuscom.com>
2003-05-03 20:52:48 +00:00
Giorgos Keramidas
b093b41206 Fix a broken reference to locale(5) and point to re_format(7) too for an
explanation of `collating elements'.
2003-05-03 20:26:11 +00:00
Mark Murray
40feca3a99 Fix a bazillion warnings. This makes almost the whole of src/bin/*
WARNS=6, std=c99 clean.

Tested on:	i386, alpha
2003-05-03 16:39:34 +00:00
Mark Murray
f694b8adb6 WARNS cleaning for the Alpha. On alpha, size_t is a long, and it
solicits a warning when used for the '*' in printf("%*d"). Cast
to u_int for universal use.
2003-05-03 16:02:52 +00:00
Mark Murray
b7dbd3e95e Fix a shedload of warnings, some memory leaks and clean up WARNS
and lint. This is now WARNS=9, std=c99 clean on i386.
2003-05-03 10:21:26 +00:00
Mark Murray
97daf7ec12 Fix format warning. This is WARNS=9, std=c99 clean on i386. 2003-05-03 10:16:51 +00:00
Mark Murray
fcfa4c9589 Fix warnings. This is now WARNS=9, std=c99 clean in i386.
Use return(0) for main() instead of exit(0). Makes it a
wee bit smaller.
2003-05-03 10:14:26 +00:00
David E. O'Brien
be8930b3ec Make this WARNS=1 as that is all we can do with GCC 3.3 -- too many
sized/unsigned comparisons.
2003-05-02 06:39:13 +00:00
David E. O'Brien
4fe0d77843 Make count a size_t as that is what is compared against and how it is used. 2003-05-02 06:36:52 +00:00
David E. O'Brien
1f156e8160 The is_name and is_in_name macros are FUBAR'ed.
Due to the use of signed vs. unsigned chars on our various platforms, one gets
"warning: comparison is always true due to limited range of data type"
from GCC 3.3.
2003-05-02 06:24:51 +00:00
David E. O'Brien
3e7045591d fmt.c has a comparison between signed and unsigned that is unclear how
to properly fix.
2003-05-02 01:05:05 +00:00
David E. O'Brien
8705f13eab Quiet warnings about copyright[]. 2003-05-02 00:04:21 +00:00
David E. O'Brien
cee22cbd29 Fix signed/unsigned mix comparisons involving sizeof. 2003-05-02 00:03:10 +00:00
David E. O'Brien
09a80d4867 Quiet warnings about copyright[]. 2003-05-01 16:58:57 +00:00
David E. O'Brien
dbd64020dd Make GCC 3.3 STFU about copyright[]. 2003-05-01 14:45:27 +00:00
Tim J. Robbins
005197bb40 Add the -j and -y options to the synopsis. 2003-05-01 02:37:46 +00:00
Jens Schweikhardt
fbc8f8a2dc Fix references to non-existing or obsoleted man pages.
PR:	docs/51480 (only a small part)
Submitted by:	Diomidis D. Spinellis <dds@aueb.gr>
2003-04-30 19:18:50 +00:00
David E. O'Brien
0d22cdf040 We have to hide copyright[] for gcc33. :-( 2003-04-30 17:40:28 +00:00
Robert Watson
317f1d53c8 When mac_from_text() fails with -Z, print "-" rather than "" so that
scripts parsing ls(1) output can still count columns.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2003-04-26 02:31:26 +00:00
Philippe Charnier
2d5506c942 Revert the zombie part of previous commit 2003-04-15 18:49:20 +00:00
Philippe Charnier
b85add5f31 Correct style bugs. Don't skip zombies in cputime(), according to Bruce,
zombie CPU times are valid. Adjust array size in strftime(3).

Submitted by:	Bruce
2003-04-14 19:51:36 +00:00
Bruce Evans
82fdc5e61b Include <signal.h> instead of depending on namespace pollution in
<sys/param.h>.  Include <sys/types.h> instead of of <sys/param.h>
so that further such dependencies don't develop.
2003-04-13 08:47:30 +00:00
Bruce Evans
4901f51b4e Fixed some style bugs in rev.1.44. 2003-04-13 08:27:35 +00:00
Tim J. Robbins
e2c9ac698c Display residency and sleep times (re and sl fields) larger than 127 as 127.
This is what the manual page says ps should do, and what OpenBSD and NetBSD do.
Based on a patch from Ken Stailey.

PR:		27433, 46232
2003-04-12 10:39:56 +00:00
Tim J. Robbins
88d5eb7147 Refer to 1003.1-2001 in the Standards section now that TC1 allows the
traditional BSD behaviour (-n option) and FreeBSD extensions (\c).
2003-04-12 03:49:28 +00:00
Tim J. Robbins
1c35bd9b2b Document the -L and -P options as being mutually exclusive. 2003-04-12 03:22:54 +00:00
Tim J. Robbins
e9fa8fddd6 Document the -L and -P options to the cd and pwd commands as being
mutually exclusive. The fact that the most recent one specified on the
command line is the one that takes effect is an implementation detail and
users should not rely on this.
2003-04-12 03:20:28 +00:00
Matthew N. Dodd
947193d93f Use the correct data type and qualifier for signal flag. 2003-04-07 12:09:17 +00:00
Matthew N. Dodd
00d321a2b3 Add a SIGINFO handler. 2003-04-07 11:00:56 +00:00
Johan Karlsson
ab46875a2a 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
2003-03-24 20:15:58 +00:00
Philippe Charnier
45ebb0c103 The .Nm utility 2003-03-24 16:09:07 +00:00
Tim J. Robbins
5821bf03d8 Flush the output buffers before forking a child process to avoid
the child process writing data that the parent should have written.

PR:		50051
MFC after:	2 weeks
2003-03-17 11:28:56 +00:00
Ruslan Ermilov
bfd86a6070 ssize_t is not required to be the same width as size_t by the
specs, so cast to intmax_t where appropriate.

Pointed out by:	bde
2003-03-15 13:34:48 +00:00
Ruslan Ermilov
024ae00499 Fixed (soon might be fatal) -Wformat warnings. 2003-03-15 07:56:59 +00:00
Marcel Moolenaar
4832865490 Add an -o filename option to have the output written to a file.
This option is present on most uuidgen(1) implementations even
though normal file redirection can be used to achieve the same.

Submitted by: Hiten Pandya <hiten@unixdaemons.com>
2003-03-15 02:27:10 +00:00
Mark Murray
7503d74f54 WARNS=4 fixes. This would be WARNS=9 if we were -std=99 instead of
-ansi, due to 'long long'.

Reviewed by:	green (slightly earlier version)
2003-02-27 18:04:54 +00:00
Marcel Moolenaar
caecb2f4c0 Third attempt at removing machdep.h and using ALIGN from <sys/param.h>.
The initial stack_block is staticly allocated and will be aligned
according to the alignment requirements of pointers, which does not
necessarily match the alignment enforced by ALIGN. To solve this a
more involved change is required: remove the static initial stack
and deal with an initial condition of not having a stack at all. This
change is therefore more risky than the previous ones, but unavoidable
(other than not using the platform default alignment).

Discussed with: tjr
Approved and reviewed by: tjr
Tested on: alpha, i386, ia64 and sparc64
2003-02-24 08:07:05 +00:00
Ruslan Ermilov
522ccf3f35 mdoc(7) police: markup laundry. 2003-02-23 01:47:49 +00:00
Ruslan Ermilov
8b6eff89b0 Grammar. 2003-02-23 01:43:45 +00:00
David E. O'Brien
fe79b917d4 We can simplify this Makefile down to a single line now. 2003-02-19 16:56:30 +00:00
David E. O'Brien
e0d2c36186 Add an example to help one manually set the date on one machine taking the out
put from another.
2003-02-18 23:12:55 +00:00
David E. O'Brien
f534f8f72b chflags(1) repo copied, usr.bin->bin.
We've been installing chflags(1) into /bin since 2000-11-10, so this
shouldn't cause any problems.
2003-02-18 19:51:59 +00:00
Tim J. Robbins
b228ca4dea Revert ALIGN change for the second and last time. I can't figure out
why this is breaking sparc64.
2003-02-18 02:08:20 +00:00
Tim J. Robbins
decb00f677 Second attempt at removing machdep.h and using ALIGN from <sys/param.h>.
The problem with the previous attempt, as noticed by Marcel, was that
stacknxt was being aligned to a pointer boundary instead of an
ALIGNBYTES + 1 boundary, which broke sparc64.
2003-02-17 03:51:44 +00:00
Tim J. Robbins
da5f5439a4 Temporarily back out machdep.h/ALIGN changes. It seems that on sparc64,
using the alignment from sys/param.h (16) instead of the alignment
from machdep.h (8) tickled a nasty bug in the memory allocator that I
haven't been able to track down yet.
2003-02-16 03:28:11 +00:00
Tim J. Robbins
457ae4f0d4 Use the ALIGN macro from <sys/param.h> instead of defining our own
incorrect version in machdep.h. Delete machdep.h.
2003-02-14 23:53:19 +00:00
Maxim Sobolev
6f15bc16ed Fix slight disorder that broke sorting. Put in bold warning about the
fact that in this case order matters.

Submitted by:	Peter Edwards <pmedwards@eircom.net>
2003-02-05 19:22:39 +00:00
Philippe Charnier
53a24b9359 Add FBSDID. 2003-02-05 13:23:46 +00:00
Philippe Charnier
eaed5652bf Display elapsed time (-o etime) using [[dd-]hh:]mm:ss, which according to
Solaris man page is the POSIX way.

Reviewed by:	jmallett
2003-02-05 13:18:17 +00:00
Philippe Charnier
e869e50704 Enclose sccsid according to style(9).
udp/timed -> timed/udp
2003-02-05 12:56:40 +00:00
Tom Rhodes
b63094f6ec Remove another unused doc Makefile. 2003-02-04 20:46:23 +00:00
Tom Rhodes
02b911053d Cross ref chflags(1).
Suggested by:	Craig Carey <research@ijs.co.nz) on -doc.
2003-02-04 20:38:51 +00:00
Tony Finch
1413f7de53 Improve the layout of the description of the various parameter expansion
modifiers. The paragraph that explains the difference between ${foo:-bar}
and ${foo-bar} etc. was not very visible.
2003-02-03 23:03:05 +00:00
Maxime Henrion
572417c7e4 Remove now unnecessary main() prototype. 2003-01-29 21:46:12 +00:00
Tim J. Robbins
c57bc2b10e Ensure that the TTY file descriptor is greater than or equal to 10 so that
it doesn't interfere with the user's redirections.

PR:		47136
MFC after:	1 week
2003-01-27 07:41:12 +00:00
Poul-Henning Kamp
cd967e322a Don't call DIOCWLABEL on disks, it is not implemented, and calling it
like this negated any practical value of the feature.
2003-01-26 11:13:40 +00:00
Tim J. Robbins
6da31df83b Make this compile with DEBUG defined now that WARNS=0 has been removed
from the Makefile:
- Print pointers with %p instead of %x.
- Include missing headers to get prototypes.

Noticed by:	benno
2003-01-21 10:06:04 +00:00
Chris Costello
d2e59e8d5d Reference maclabel(7).
Sponsored by:	DARPA, Network Associates Laboratories
2003-01-20 21:25:00 +00:00
David E. O'Brien
d8ac087563 kenv(1) has been repo copied from usr.bin to bin.
Sometimes we need kenv(1) in /etc/rc.diskless*.
2003-01-20 17:56:25 +00:00
Juli Mallett
78b1878a16 Per-variable\ entry headers, to allow the 'ps -otime -otime=FOO' or similar
case to do the right thing and affect exactly one column.  This is consistent
with GNU ps(1) in BSD mode, and POLA.
2003-01-19 00:31:16 +00:00
Juli Mallett
fde411d5a1 When inserting a non-user-specified (e.g. not via -o or -O) format, don't dupe
one that is already there.  This is consistent with GNU ps(1)'s BSD mode, and
POLA.

Reported by:	Andy Farkas <andyf@speednet.com.au>
Tested by:	Andy Farkas <andyf@speednet.com.au>
2003-01-19 00:22:34 +00:00
Juli Mallett
775bba9fd8 Refer to the process label as proclabel, as there is a function called label,
and that's what these locals were called before.
2003-01-18 03:31:30 +00:00
Johan Karlsson
de216a83c2 realpath(3) should use PATH_MAX instead of MAXPATHLEN according to POSIX.
This also reverts the PATH_MAX -> MAXPATHLEN part of
rev 1.3 of src/bin/realpath/realpath.c

Requested by:	imp
Reviewed by:	imp, bde
2003-01-15 21:22:55 +00:00
David E. O'Brien
2e79837f7b Make the "tarcp" example more direct. 2003-01-10 17:37:23 +00:00
Tim J. Robbins
9c92e72c7f Do not strip CTL* escapes from redirection filenames in exptilde(),
expari(), expbackq() and evalvar(). Similar to revision 1.39.
Patch from Tor Egge.

PR:		45349
MFC after:	2 weeks
2003-01-08 10:50:08 +00:00
Jens Schweikhardt
9d5abbddbf Correct typos, mostly s/ a / an / where appropriate. Some whitespace cleanup,
especially in troff files.
2003-01-01 18:49:04 +00:00
Jens Schweikhardt
d64ada501a Fix typos, mostly s/ an / a / where appropriate and a few s/an/and/
Add FreeBSD Id tag where missing.
2002-12-30 21:18:15 +00:00
Mike Barcroft
dc474219b6 Back out rev 1.44; getbsize(3)'s original interface has been restored.
Approved by:	markm
2002-12-30 18:10:37 +00:00
Robert Watson
8051fddedc Add "-h" arguments to getfacl and setfacl, which behave in a manner
similar to "-h" on chown, chmod, etc, causing the operation to occur
on a final symlink in the provided path, rather than its target.

Obtained from:	TrustedBSD Project
2002-12-30 15:36:29 +00:00
Tim J. Robbins
2c25061f18 Add the "wordexp" shell built-in command which will be used to implement
the POSIX wordexp() function.
2002-12-26 14:28:54 +00:00
Ruslan Ermilov
facc67676f mdoc(7) police: Deal with self-xrefs. 2002-12-24 13:41:48 +00:00
Ruslan Ermilov
463cfa804d Fixed the abuses of .Ql visible on stderr in troff mode.
PR:		docs/37176
2002-12-23 16:04:51 +00:00
Ruslan Ermilov
f5d1157fd1 mdoc(7) police: markup nit. 2002-12-23 15:21:38 +00:00
David Malone
f656dbec97 Use '\033' rather than '\e' as the latter is a gccism.
PR:             46015
Submitted by:   Jeroen Ruigrok van der Werven <asmodai@wxs.nl>
MFC after:      1 week
2002-12-22 21:35:14 +00:00
Tim J. Robbins
3fceb9fd5b pathconf() and acl_get_file() follow links so they cannot be used to
determine whether a symlink has an ACL. Instead, assume that symbolic
links don't have ACLs and don't bother checking. Avoids spurious
ENOENT warnings when listing directories containing broken symlinks
on filesystems with ACLs enabled.

Pointed out by:	rwatson, bde
2002-12-19 01:13:23 +00:00
Robert Watson
3c3f5f9cab Improve handling of symlink targets when listing MAC labels: don't
do the wrong thing when the symlink doesn't have a target, by
considering !f_label in the construction of ch_options.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-12-18 21:05:15 +00:00
Johan Karlsson
894fd2da78 Remove undocumented behavior (return current work dir if no path
is given as argument) that is not present in 4-Stable.
It was introduced when realpath(1) was split out of pwd(1).
The removed behavior is provided by pwd(1).

Reviewed by:	mike
2002-12-18 11:50:28 +00:00
Johan Karlsson
9a26e46eb4 - use MAXPATHLEN per realpath(3)
- use the problematic part of the path, instead of the argument,
  when reporting an error.

Reviewed by:	mike
2002-12-18 10:20:40 +00:00
Tom Rhodes
304199ce19 The code uses trapsasync, however the manual page uses asynctraps. Fix the
manual page to reflect the code.

PR:		45820
Submitted by:	Marco Molteni <molter@tin.it>
Discussed with:	tjr
2002-12-17 20:27:48 +00:00
Tony Finch
162ae3ae7f Document trap EXIT and trap SIGNAME. 2002-12-17 17:31:44 +00:00
Tim J. Robbins
2e3684f843 When job control is disabled, never show the job id when reporting the
status of a background process that has terminated because of a signal.
2002-12-14 01:08:04 +00:00
Ruslan Ermilov
db8993ce9e Capitalize ASCII code names.
Approved by:	re
2002-12-05 08:50:00 +00:00
Ruslan Ermilov
e27480d64d mdoc(7) police:
Revert to using the .Tn POSIX and .Tn ANSI instead of \*[Px] and \*[Ai]
strings; using these strings is unsafe in troff mode, as they include a
change in a font size.

Approved by:	re
2002-11-26 17:55:41 +00:00
Ruslan Ermilov
2267d53b43 mdoc(7) police: In DESCRIPTION, list the options in pure alphabetical
order, as required by style(9).  Document the effect of the -f option
on exit status.  Fixed some spacing.

Submitted by:	bde
Approved by:	re
2002-11-25 14:18:42 +00:00
Ruslan Ermilov
1734e39a1a mdoc(7) police: markup fixes.
Approved by:	re
2002-11-25 13:52:57 +00:00
Ruslan Ermilov
98d13c7e51 mdoc(7) police: markup fixes.
Approved by:	re
2002-11-25 13:20:30 +00:00
Nate Lawson
e9a4552b14 Minimal take on previous commit -- remove getopt and printf. Static size
is reduced by 40k, dynamic by a few bytes.
Functional changes:
* "sleep -- arg" now returns usage() instead of ignoring the --
* "sleep -1" now returns immediately instead of returning usage()

Reviewed by:	jmallett
2002-11-14 01:14:35 +00:00
Nate Lawson
e021938408 Back out previous commit since there is controversy about changing so much
in sleep including duping strtol(3).  Code changes also increased
dynamic size of sleep(1).
2002-11-14 00:20:58 +00:00
Nate Lawson
174005b7f0 Remove getopt and strtol dependencies, reducing size of static exe.
Preserve older desired behavior, accept [+-]*[0-9]*\.[0-9]*
Remove a few unnecessary casts.

%ls -l /bin/sleep
-r-xr-xr-x  1 root  wheel  61332 Oct 28 05:16 /bin/sleep
%ls -l /usr/obj/usr/src/bin/sleep/sleep
-rwxr-xr-x  1 root  wheel  19124 Nov 13 12:12 /usr/obj/usr/src/bin/sleep/sleep

Submitted by:	Tim Kientzle <kientzle@acm.org>
2002-11-13 20:12:26 +00:00
Nate Lawson
ef3e71dac3 Put echo on a diet, removing unnecessary use of stdio and getopt.
Before...
-r-xr-xr-x  1 root  wheel  58636 Oct 28 05:16 /bin/echo
After...
-rwxr-xr-x  1 root  wheel  12824 Nov 12 17:39 /usr/obj/usr/src/bin/echo/echo

Submitted by:	Tim Kientzle <kientzle@acm.org>
2002-11-13 01:39:02 +00:00
Tim J. Robbins
e09fdabddf Use warn() instead of perror() or fprintf() where appropriate. 2002-11-06 01:18:12 +00:00
Tim J. Robbins
745d94fc5f Cross-reference setfacl(1). 2002-11-04 06:46:53 +00:00
Tim J. Robbins
4e65ab954d - Consistent use of warn() vs. perror().
- Gracefully handle the case where standard input is missing
  a newline at EOF.
- Exit with status 1 instead of -1 (really 255) on error.
- Add a Diagnostics section to the manual page documenting
  exit status.

Approved by:	rwatson
2002-11-03 23:22:34 +00:00
Tim J. Robbins
dd9aaeb0f7 Print a `+' character after the standard UNIX permission fields in long
listings if the file has an extended ACL (more than the required 3 entries).
This is what Solaris and IRIX do, and what the withdrawn POSIX.2c standard
required.

Reviewed by:	rwatson (an earlier version of the patch)
2002-11-03 07:29:08 +00:00
Thomas Moestl
297cf923e7 The hw.availpages sysctl has an unsigned long value now, fix the retrieval
to match that.
2002-11-01 23:26:20 +00:00
Marcel Moolenaar
9b2f268fb5 o Remove $Id$ from copyright; there's $FreeBSD$,
o  Remove static function uuid_print(); use uuid_to_string(3) in
   combination with printf(3) to achieve the same,
o  Remove unneeded includes,
o  Add a reference to uuid(3) to the manpage.
2002-11-01 06:20:14 +00:00
Tim J. Robbins
01e5f16641 Do not print a header line if it would be empty; required by 1003.1-2001. 2002-10-31 13:41:37 +00:00
Tim J. Robbins
0cda444bef Delete worthless comments. 2002-10-30 06:34:52 +00:00
Garrett Wollman
c9885518de Create a small library function, check_utility_compat(3), to determine
whether a named utility should behave in FreeBSD 4.x-compatible mode
or in a standard mode (default standard).  The configuration is done
malloc(3)-style, with either an environment variable or a symlink.

Update expr(1) to use this new interface.
2002-10-28 00:15:43 +00:00
Garrett Wollman
688dfe4533 Do not include <sys/syslimits.h> directly; it is not intended for general
consumption.
2002-10-27 17:44:33 +00:00
Robert Watson
4df6daba42 Attempt improved use of fts results: use the correct path to the
object to retrieve label information on, rather than directly
consuming the fts-provided paths (none of which are quite right).
This is based on the similar readlink() code, and may contain
the same bugs.

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-10-24 01:01:53 +00:00
Robert Watson
4d33b62edc Teach "ls -Z" to use the policy-agnostic MAC label interfaces rather
than the LOMAC-specific interfaces for listing MAC labels.  This permits
ls to view MAC labels in a manner similar to getfmac, when ls is used
with the -l argument.  Next generation LOMAC will use the MAC Framework
so should "just" work with this and other policies.  Not the prettiest
code in the world, but then, neither is ls(1).

Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-10-24 00:07:30 +00:00
Robert Watson
2af538eb48 Use the MAC interface to list process MAC labels rather than using
the LOMAC-specific interface (which is being deprecated).  The
revised LOMAC using the MAC framework will export levels listable
using this mechanism.

Approved by:	re
Obtained from:	TrustedBSD Project
Sponsored by:	DARPA, Network Associates Laboratories
2002-10-24 00:00:57 +00:00
Mark Murray
0b66b1e8eb Fix for changed getbsize arg type. 2002-10-23 22:09:05 +00:00
Mark Murray
9d32ecfcdf Be consistent about declaring a function "static", and consistent
about the type of argv.
2002-10-23 10:23:38 +00:00