Commit Graph

1625 Commits

Author SHA1 Message Date
mike
da08117fe4 Back out rev 1.44; getbsize(3)'s original interface has been restored.
Approved by:	markm
2002-12-30 18:10:37 +00:00
rwatson
41ffbf0586 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
tjr
2513cac775 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
ru
bbb36710e2 mdoc(7) police: Deal with self-xrefs. 2002-12-24 13:41:48 +00:00
ru
24514a3504 Fixed the abuses of .Ql visible on stderr in troff mode.
PR:		docs/37176
2002-12-23 16:04:51 +00:00
ru
db201086d3 mdoc(7) police: markup nit. 2002-12-23 15:21:38 +00:00
dwmalone
08902a22a4 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
tjr
dce4d1c218 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
rwatson
3af1e9d7e7 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
409c1d24f2 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
d9bca90879 - 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
trhodes
01bdfab305 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
fanf
d214f0ddda Document trap EXIT and trap SIGNAME. 2002-12-17 17:31:44 +00:00
tjr
2946ab9211 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
ru
049d95bf04 Capitalize ASCII code names.
Approved by:	re
2002-12-05 08:50:00 +00:00
ru
d53cbf1f18 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
ru
da15033a3c 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
ru
895615ec1a mdoc(7) police: markup fixes.
Approved by:	re
2002-11-25 13:52:57 +00:00
ru
b98f24b129 mdoc(7) police: markup fixes.
Approved by:	re
2002-11-25 13:20:30 +00:00
njl
0bfb9954bc 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
njl
f78e8ceb69 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
njl
0d17bd7c69 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
njl
d53a206b33 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
tjr
8ffb52aed3 Use warn() instead of perror() or fprintf() where appropriate. 2002-11-06 01:18:12 +00:00
tjr
1709efb78d Cross-reference setfacl(1). 2002-11-04 06:46:53 +00:00
tjr
5392e16207 - 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
tjr
4a5c983dc4 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
tmm
5bea1e906c 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
a7c31833b8 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
tjr
24ba94ebfe Do not print a header line if it would be empty; required by 1003.1-2001. 2002-10-31 13:41:37 +00:00
tjr
524218b3cc Delete worthless comments. 2002-10-30 06:34:52 +00:00
wollman
6da8a280d0 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
wollman
fd47be1489 Do not include <sys/syslimits.h> directly; it is not intended for general
consumption.
2002-10-27 17:44:33 +00:00
rwatson
724abc49f5 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
rwatson
5169086ecc 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
rwatson
b4fe9a0411 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
markm
adf89ed082 Fix for changed getbsize arg type. 2002-10-23 22:09:05 +00:00
markm
bb23ca0fbc Be consistent about declaring a function "static", and consistent
about the type of argv.
2002-10-23 10:23:38 +00:00
markm
d81e414bae Constify, staticify, rationalise types and fix other related warnings. 2002-10-23 10:20:01 +00:00
markm
62fd5f2afa Constify to squash some warnings. 2002-10-23 10:15:44 +00:00
markm
9c053cb185 Staticify for lint. 2002-10-18 14:48:48 +00:00
markm
1f4106ec8a Constify and staticify for lint. 2002-10-18 14:45:00 +00:00
tjr
356386a583 Print non-printing characters in directory names, as well as file names,
as `?' or `\ooo', depending on whether the -b or -B flags were used.

PR:		43995
MFC after:	1 month
2002-10-18 10:59:45 +00:00
tjr
bc2494f222 Avoid accidentally making "-h" a synonym for "fc".
Obtained from:	NetBSD
2002-10-18 10:33:32 +00:00
dd
f532cfe523 Output "human-readable" values with a non-0 precision where
appropriate.  Before this, a 2.9 GB file was misleadingly reported as
"2G".  This mostly brings unit_adjust() in line with what is in du(1).

Reviewed by:	jmallett
Approved by:	nik
2002-10-18 04:06:59 +00:00
markm
ec19b8de09 Dekerberise. The corresponding userland stuff has been dekerberised
for ages, and no-one seems to have noticed. Viva PAM!
2002-10-16 16:10:46 +00:00
tjr
4e9fa78312 Do not strip CTL* escapes from redirection filenames in argstr(); they
are later stripped with rmescapes() in expandarg(). If the filename has
already been unescaped, doing it again in rmescapes() can walk off the
end of the string, leading to memory corruption and eventually SIGSEGV.

Noticed by:	kris
2002-10-08 11:22:49 +00:00
tjr
27acec5797 Clean up use of <stdarg.h> macros: always call va_end after va_start,
reset with a call to va_start before each use of the va_list.

Obtained from:	NetBSD
2002-10-06 11:14:21 +00:00
tjr
8abcb1658d Ensure all va_starts have a matching va_end.
Obtained from:	NetBSD
2002-10-06 09:23:58 +00:00
charnier
7834fd366e While removing a memory leak, rev 1.32 introduced a
free-memory-and-reuse-it-after. Correct both problems and
make rcp -r work again under /etc/malloc.conf -> AJ.
2002-10-06 09:09:27 +00:00