Commit Graph

6219 Commits

Author SHA1 Message Date
Mark Murray
1dd991a05b If lint(1) is not "lint", don't try to lint the xlint compat-libs. A
third-party lint is probably being used.
2003-06-15 13:03:37 +00:00
Philippe Charnier
d005495293 err() on allocation failure. WARNS=9 compliant
use #if 0, #ifndef lint, #endif /* not lint */, #endif ordering
when a message is provided, use errx() instead of err().
2003-06-15 09:28:17 +00:00
Robert Watson
aee1b42ab6 Now that the kernel access control for quotactl(2) appears to work
properly, clean up quota(1).  quota(1) has the ability to query
quotas either directly from the kernel, or if that fails, by reading
the quota.user or quota.group files specified for the file system
in /etc/fstab.  The setuid bit existed solely (apparently) to let
non-operator users query their quotas and consumption when quotas
weren't enabled for the file system.

o Remove the setuid bit from quota(1).

o Remove the logic used by quota(1) when running setuid to prevent
  users from querying the quotas of other users or groups.  Note
  that this papered over previously broken kernel access control;
  if you queried directly using the system call, you could access
  some of the data "restricted" by quota(1).

In the new world order, the ability to inspect the (live) quotas of
other uids and gids via the kernel is controlled by the privilege
requirement sysctl.  The ability to query via the file is controlled
by the file permissions on the quota database backing files
(root:operator, group readable by default).
2003-06-15 06:54:36 +00:00
Robert Watson
41b0d1a064 Now that the kernel access control for quotactl(2) appears to work
properly, clean up quota(1).  quota(1) has the ability to query
quotas either directly from the kernel, or if that fails, by reading
the quota.user or quota.group files specified for the file system
in /etc/fstab.  The setuid bit existed solely (apparently) to let
non-operator users query their quotas and consumption when quotas
weren't enabled for the file system.

o Remove the setuid bit from quota(1).

o Remove the logic used by quota(1) when running setuid to prevent
  users from querying the quotas of other users or groups.  Note
  that this papered over previously broken kernel access control.
2003-06-15 06:46:24 +00:00
David E. O'Brien
457946d9bd Remove MAINTAINER lines. 2003-06-14 19:32:52 +00:00
Tom Rhodes
33ffdd8115 Don't truncate the output file before making sure that we can
read at least 1 byte from the input file without problems.  This
fixes a bug in uncompress(1) that causes the accidental removal
of files that happen to have the same name as the output file,
even when the uncompression fails and is aborted, i.e.:

$ echo hello world > hello
$ touch hello.Z
$ ls -l hello*
-rw-rw-r--  1 giorgos  giorgos  12 Jun 14 13:33 hello
-rw-rw-r--  1 giorgos  giorgos   0 Jun 14 13:33 hello.Z
$ ./uncompress -f hello
uncompress: hello.Z: Inappropriate file type or format
$ ls -l hello*
-rw-rw-r--  1 giorgos  giorgos  0 Jun 14 13:33 hello.Z
$

PR:		46787
Submitted by:	keramida
2003-06-14 13:41:31 +00:00
Mark Murray
ef646f18aa Fix all WARNS. Checked with "make WARNS=9". Remove unused file. 2003-06-14 13:00:21 +00:00
Maxime Henrion
0792992c73 - Use _PATH_TTY and _PATH_DEVNULL macros.
- Don't fail if we can't open /dev/null since this can happen if
  xargs is jail'ed or chroot'ed.

These fixes were submitted by Todd Miller from the OpenBSD project.
There was one problem in those fixes that broke -o, which is corrected
here and should be committed to the OpenBSD repo by Todd soon.

MFC in:	3 days
2003-06-13 17:05:41 +00:00
Juli Mallett
004bd28e40 Use waitpid, instead of wait3, which is more portable.
Submitted by:	"Todd C. Miller" <Todd.Miller@courtesan.com>
Obtained from:	OpenBSD
Reviewed by:	tjr
2003-06-13 07:37:45 +00:00
Juli Mallett
815e414e17 Remove redundant return; from void function.
Submitted by:	"Todd C. Miller" <Todd.Miller@courtesan.com>
Obtained from:	OpenBSD
2003-06-13 07:25:15 +00:00
Mike Barcroft
e86c7447c2 Drop maintainership of whois(1). If someone needs a review they can
find me in the whois.c revision history.
2003-06-12 02:46:47 +00:00
Erwin Lansing
0ff30930ff add my birthday 2003-06-11 09:04:53 +00:00
Tom Rhodes
fa676bbfc8 Revert 1.52. This should have been added to fetch.3.
Discussed with:	des, ru
2003-06-10 20:34:50 +00:00
Mark Murray
96b5910f32 Revert part of the last commit. This fixes tail for pipes.
Submitted by:	joerg
2003-06-10 16:49:14 +00:00
Andrey A. Chernov
4aeece6a14 Add (unsigned char) cast to ctype macros 2003-06-10 02:18:00 +00:00
Andrey A. Chernov
ddcab7eeac Use setlocale & nl_langinfo to parse locale name 2003-06-10 02:15:00 +00:00
Andrey A. Chernov
1d35769ff1 Remove deprecated locale names 2003-06-10 01:54:10 +00:00
Philippe Charnier
49b3830c8e Introduce options definition the standard way. command -> utility. 2003-06-09 19:37:45 +00:00
Philippe Charnier
23b03a1274 Introduce options definition the standard way. Do not uppercase first
letter in FILES section.
2003-06-09 19:35:56 +00:00
Philippe Charnier
f88e6136c3 Introduce options definition the standard way. 2003-06-09 19:32:02 +00:00
Philippe Charnier
3adb4d32aa Revert previous commit, from Bruce:
This is a style bug.  err() is declared is non-returning so that every
  use of it doesn't need to be encrufted with NOTREACHED.  It's too bad
  that only gcc understands the declaration.

Asked by:	bde@
2003-06-09 19:21:35 +00:00
Juli Mallett
8ec0090099 Add sysctlbyname(3) support, and use that for uname -i, in preparation for
replacing the committed static OID version with a string-based OID_AUTO
version.
2003-06-09 10:23:43 +00:00
Juli Mallett
c4119c76f8 Make kernel identification (`ident' in the config(8) driver) available to
userland, and the kernel.  In the kernel by way of the 'ident[]' variable
akin to all the other stuff generated by newvers.sh.  In userland it is
available to sysctl consumers via KERN_IDENT or 'kern.ident'.  It is exported
by uname(1) by the -i flag.

Reviewed by:	hackers@
2003-06-09 09:38:20 +00:00
Will Andrews
dee3731d08 REST IN PEACE
Alan Eldridge
Born December 15, 1961 in Iowa
Died June 6, 2003 in Denver, Colorado

Thank you for your contributions, you
will be greatly missed.

http://freebsd.kde.org/memoriam/alane.php

(This change suggested by ru@ - thanks).
2003-06-08 21:31:10 +00:00
Ruslan Ermilov
7021331528 The sorting is by month/day/year/login. 2003-06-08 16:37:40 +00:00
Ruslan Ermilov
004699a02b Submitted by: hmp 2003-06-08 15:01:44 +00:00
Philippe Charnier
122ccb43be command -> utility. Add section number to .Xr 2003-06-08 14:38:02 +00:00
Philippe Charnier
31e7e8efc8 The .Nm utility 2003-06-08 14:36:22 +00:00
Philippe Charnier
ecccc002bc command -> utility 2003-06-08 14:35:11 +00:00
Philippe Charnier
6a1be1f51b Add section number to .Xr 2003-06-08 13:58:08 +00:00
Philippe Charnier
196604d77e typo 2003-06-08 13:51:40 +00:00
Philippe Charnier
bfd62d7094 The .Nm utility 2003-06-08 13:47:20 +00:00
Philippe Charnier
33f9fef537 The .Xr utility 2003-06-08 13:45:37 +00:00
Philippe Charnier
a8e0f0e094 The .Xr files 2003-06-08 13:43:56 +00:00
Philippe Charnier
5288a06a91 Add NOTREACHED after err() inside of a switch statement. 2003-06-08 13:39:32 +00:00
David E. O'Brien
d104f0300a Consistently use __inline for pure c89 compilers.
Submitted by:	Tim Kientzle <kientzle@acm.org>
2003-06-07 18:12:30 +00:00
Maxime Henrion
ae94787d6d Finish the implementation of the -p switch so that it
actually works.  I have no idea why this wasn't finished
and happened to try to use it.
2003-06-07 14:36:49 +00:00
Sergey A. Osokin
c842a5ca87 Add my birthday.
Approved by:	fjoe (mentor)
2003-06-06 15:08:32 +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
Marcel Moolenaar
1eb3be492d Use cat(1) instead of cp(1) so as not to break -DNOCLEAN builds
when the file permissions of source files don't allow writing.
2003-06-06 05:38:09 +00:00
Tony Finch
c2b9b6eba8 Do not dribble zero bytes into the output, by replacing an obfuscated if
whose true and false clauses were equivalent with a check that we are
not about to stumble off the end of the line.

Reported by:	peter
Pointy hat to:	fanf
2003-06-05 12:10:19 +00:00
Tony Finch
2f17b7e279 Fix substitution when the regex matches the zero-length string.
There are two bugs: in the s///g case, the substitution didn't occur
at the end of the line; in the s///N case, the code didn't count
forwards along the line properly. See the sg, s3, s4, and s5 tests
in src/tools/regression/usr.bin/sed/.

Reviewed by:	tjr
2003-06-04 15:31:55 +00:00
Tony Finch
2611a92c3a MAINTAINER line moved to MAINTAINERS file. 2003-06-04 10:01:10 +00:00
Andrey A. Chernov
3146eb4004 Change fatal to warnx() for unknown encoding 2003-06-03 16:58:31 +00:00
Peter Wemm
ec4beb5d8b Two enhancements for kdump.
1) add a "-p pid", which is rather useful for selecting a single pid in
a combined trace file (eg: with ktrace -i).
2) display binary genio data in a more precise format.
2003-06-03 01:44:43 +00:00
Andrey A. Chernov
92b49d4efa Hardcore supported encodings list 2003-06-02 19:54:29 +00:00
Ruslan Ermilov
f937c268cf Assorted mdoc(7) fixes. 2003-06-02 11:19:24 +00:00
Tim J. Robbins
ebe5d44d5a Give the -o option before any filename operands when invoking the sort
utility. 1003.1-2001 does not allow sort to accept the -o option after
the operands (Base Definitions, 12.2 Utility Syntax Guidelines,
Guideline 9).
2003-06-01 22:37:38 +00:00
Tim J. Robbins
14f566d3ca Split the env(1) manpage off from printenv(1); there is not much point
in keeping them together. Mention that printenv is obsolescent.
2003-06-01 06:29:47 +00:00
Tim J. Robbins
aa8e31e68c Close files after opening them to avoiding leaking descriptors and memory. 2003-06-01 06:15:30 +00:00