Commit Graph

4365 Commits

Author SHA1 Message Date
Ruslan Ermilov
4bf12cb91e Fold groups(1) and whoami(1) into id(1). 2001-09-14 14:04:08 +00:00
Ruslan Ermilov
631a876574 Simplify f_Xtime(). 2001-09-14 13:42:26 +00:00
Ruslan Ermilov
adff4fca3d Bloat find(1) even more, and introduce the concept
of time units to be used with -[acm]time primaries.

Based on patch from Nils M Holm <nmh@t3x.org>.

PR:		bin/29165, bin/30309
2001-09-14 12:47:13 +00:00
Ruslan Ermilov
7b24b50458 Now that we have it, replace `afterinstall' target with SCRIPTS. 2001-09-13 14:26:31 +00:00
Ruslan Ermilov
fa8baa7a9e Fixed the BINGRP handling mess.
EXEGRP and EXEMODE are used to install DOS (EXE format) binaries.
doscmd(1) can optionally be installed as ``setgid kmem''.
Hence the assignment operator for EXEGRP.

PR:		bin/30538
2001-09-13 07:20:51 +00:00
Ruslan Ermilov
cda2a9b2f0 Set BINOWN=root explicitly for setuid root binaries.
This is not "useless", as one may have non-default
setting for BINOWN in make.conf, and we still want
these to be installed setuid root in this case.
2001-09-13 06:48:18 +00:00
Mark Murray
69ebfe3495 Reinstate complete (and now correctly functioning) WARNS=2. 2001-09-12 19:15:02 +00:00
Ruslan Ermilov
9de6241784 Fixed some of style bugs. 2001-09-12 10:04:42 +00:00
Julian Elischer
b40ce4165d KSE Milestone 2
Note ALL MODULES MUST BE RECOMPILED
make the kernel aware that there are smaller units of scheduling than the
process. (but only allow one thread per process at this time).
This is functionally equivalent to teh previousl -current except
that there is a thread associated with each process.

Sorry john! (your next MFC will be a doosie!)

Reviewed by: peter@freebsd.org, dillon@freebsd.org

X-MFC after:    ha ha ha ha
2001-09-12 08:38:13 +00:00
Greg Lehey
f1422f2ebc Correct the entry for Sudetenland. It also has nothing to do with the south.
Corrected by:	joerg
Pointy hat to:	grog
2001-09-12 07:22:38 +00:00
Greg Lehey
49113adb7a Correct the invasion of Südetenland. Any involvement of ducks was insignificant. 2001-09-12 00:13:02 +00:00
Ruslan Ermilov
d44ddba96c Implement the ``-f address_family'' filter for -i.
Prodded by:	Igor Podlesny <poige@morning.ru>
2001-09-11 17:14:33 +00:00
Ruslan Ermilov
1cb467b1b3 Update usage() to match reality. 2001-09-11 15:21:36 +00:00
Ruslan Ermilov
6658f7a13b mdoc(7) police: Fixed the .Ex calls in manpages that describe more
than one utility.

PR:		docs/30437
Submitted by:	SUZUKI Koichi <koich@cac.co.jp>
2001-09-11 12:27:15 +00:00
Mike Barcroft
1c93d61fcc Add a cast to silence a warning (error because of WARNS=2) on Alpha.
Discussed with:	des
2001-09-10 17:23:57 +00:00
Ruslan Ermilov
1cdc4a5318 Do not overrun entry array when printing output tables.
Cleanup storage allocation for entries.

Obtained from:	NetBSD
2001-09-10 15:09:12 +00:00
Ruslan Ermilov
db8b9c344e Fixed SIGFPE (divide by zero) if column's width exceeds display width (-w).
Obtained from:	OpenBSD
2001-09-10 11:56:07 +00:00
Ruslan Ermilov
c4c981072b Fixed the -z option handling:
-Wuninitialized if used without -t.

PR:		bin/30467

Null pointer dereference if used with -t.

Maximum column width computation was wrong.
2001-09-10 11:43:40 +00:00
Dima Dorfman
728d043e5b - Move the prototype of ttymsg() into ttymsg.h. syslogd and talkd
also use this, and they shouldn't have to have their own prototypes.

- Silence warnings about constness and signedness in ttymsg().  This
  includes changing the return value to a `const char *', and changing
  the types of `left' and `wret' (both byte counts) to ssize_t.

Reviewed by:	bde
2001-09-09 14:23:31 +00:00
Brian Somers
8b0bff44c7 Iron out an identity crisis. I'm Irish, not English. 2001-09-09 08:33:40 +00:00
Matthew Dillon
ea079e4650 Make sure that all non-root-owned binaries in standard system
paths are chflaged 'schg' to prevent exploit vectors when run
by cron, by a root user, or by a user other then the one owning the
binary.  This applies to most of the uucp binaries, cu, tip, and
man (man was already installed properly).

MFC will occur when approved.
2001-09-09 04:54:10 +00:00
Mike Barcroft
0caf2ae89d Remove a bogus cast and lockdown users(1) with WARNS?=2
Submitted by:	David Hill <david@phobia.ms>
Reviewed by:	-audit
MFC after:	1 week
2001-09-09 00:40:04 +00:00
Greg Lehey
7e0fb01917 Add Dennis Ritchie. 2001-09-09 00:36:20 +00:00
Dag-Erling Smørgrav
e9dc4f3b74 If the local file does not exist, or is a regular file, and we're not trying
to resume a transfer, download the requested document into a temporary file
which we later rename.  This avoids leaving half-completed files around in
case of a crash (it'll still leave a half-completed file, but with a  hope-
fully non-conflicting name), and should reduce the need for human inter-
vention on ports-building machines.

The temporary file name for "foo/bar" is constructed by invoking mkstemps()
with the pattern "foo/.fetch.XXXXXX.bar"

Requested by:	obrien
2001-09-08 15:17:15 +00:00
Mark Murray
73bd08dda4 Back out (with prejudice) the last WARNS=2 fix. I cannot understand
its failure mode, and will revisit it later.
2001-09-07 16:20:38 +00:00
Ruslan Ermilov
e2beaf705c Yay!
Make this manpage readable and match the reality.
2001-09-07 15:18:45 +00:00
Ruslan Ermilov
76840ccb9d If -s -s is specified, don't show zero multicast routing statistics. 2001-09-07 12:59:30 +00:00
Ruslan Ermilov
70057abf2d Deprecate the -l option in favour of more natural -W.
The compatibility glue is still provided.

(This change is not yet reflected in the manpage, nor
in usage().  This will be fixed at a later time today,
with the general manpage cleanup commit.)
2001-09-07 12:00:50 +00:00
Ruslan Ermilov
fb5d0fbdd7 Don't print stray socket addresses (-A) with the listen queue display (-L).
Also, print socket's protocol with the -L.
2001-09-07 11:06:28 +00:00
Ruslan Ermilov
ca122bf7d8 The default for -p was ``kern.notice'' in the -h case.
Make it ``user.notice'', as per manpage.

(The syslog(3) function defaults to LOG_USER facility
if none is specified, but we don't use syslog() in the
-h case.)

PR:		docs/30374
Noticed by:	SUGIMURA Takashi <sugimura@jp.FreeBSD.org>
2001-09-06 12:48:44 +00:00
Kenneth D. Merry
8f29de8be3 Convert systat(1) to use the new devstat interface.
Submitted by:	"Sergey A. Osokin" <osa@freebsd.org.ru>
2001-09-06 04:06:12 +00:00
Dima Dorfman
f328d583a2 Use CFLAGS, not COPTS, in the Makefile. bsd.prog.mk conveniently adds
COPTS towards the end of final CFLAGS so that it can be used to
override Makefile and other defaults.  Using it in Makefiles risks
having options set using it clobbered when somebody uses it on the
command line.

Approved by:	bde
2001-09-05 20:10:59 +00:00
Ruslan Ermilov
2cfec5ade4 Make ``wall -g'' really DTRT.
Reviewed by:	imp, markm
2001-09-05 15:31:07 +00:00
Mike Barcroft
1106c5f173 Remove a trailing space at the end of a line.
Forgotten by:	mike
Submitted by:	ru
2001-09-04 17:49:07 +00:00
Mike Barcroft
3b91552d11 o Remove examples from throughout the manual.
o Create an EXAMPLES section.
o In some places change "ru" to "RU" to be consistent.

Reviewed by:	ru
2001-09-04 17:30:39 +00:00
Mark Murray
4239cf1c01 WARNS=2 fixes.
The remaining problem of converting highly incompatible pointer types
is done by "laundering" the value through a union.

This solves the problem (in my own mind) of how a "const char *" _ever_
actually gets a value in a WARNS=2 world.
2001-09-04 17:10:57 +00:00
Ruslan Ermilov
9dd887f1a6 SECURITY.
Fixed macros for temporarily relinquishing and restoring setuid/setgid
privileges so that they never change the real user and group IDs of
the calling process.

The setre[ug]id() calls are still used in the REDUCE_PERM macro (with
the r[ug]id arguments of -1) so that the call changes the saved user
and group IDs of the process to that specified.

Also, the panic() and perr() functions had insufficient privileges to
delete the problematic file under /var/at.
2001-09-04 16:15:51 +00:00
Ruslan Ermilov
7fd5ee41e3 The implementation of -flags was broken and did not match the (poorly)
documented behavior.  Only a certain set of file flags were recognized,
and "no" flags did not match files that have corresponding flags bits
turned off.

Fix and extend the -flags functionality as follows:

: -flags [-|+]<flags>,<notflags>
:    The flags are specified using symbolic names (see chflags(1)).
:    Those with the "no" prefix (except "nodump") are said to be
:    <notflags>.  Flags in <flags> are checked to be set, and flags in
:    <notflags> are checked to be not set.  Note that this is different
:    from -perm, which only allows the user to specify mode bits that
:    are set.
:
:    If flags are preceded by a dash (``-''), this primary evaluates
:    to true if at least all of the bits in <flags> and none of the bits
:    in <notflags> are set in the file's flags bits.  If flags are pre-
:    ceded by a plus (``+''), this primary evaluates to true if any of
:    the bits in <flags> is set in the file's flags bits, or any of the
:    bits in <notflags> is not set in the file's flags bits.  Otherwise,
:    this primary evaluates to true if the bits in <flags> exactly match
:    the file's flags bits, and none of the <flags> bits match those of
:    <notflags>.

MFC after:	2 weeks
2001-09-04 16:09:01 +00:00
Ruslan Ermilov
63462b0c3a mdoc(7) police: tighten label width. 2001-09-04 10:24:52 +00:00
Robert Drehmel
c146250ee2 Use the correct blocksize when invoked with both -h and -k
options.

PR:		30275
Reviewed by:	jake
2001-09-04 09:43:31 +00:00
Andrey A. Chernov
005ee369ed File positions are off_t nowdays, not long, so:
fseek -> fseeko
    ftell -> ftello
    fseek(x, 0L, 0) -> rewind(x)

    NOTE: that fseek/ftell not works for >long offsets per POSIX:

    [EOVERFLOW] For fseek( ), the resulting file offset would be a value which
    cannot be represented correctly in an object of type long.

    [EOVERFLOW] For ftell ( ), the current file offset cannot be represented
    correctly in an object of type long.
2001-09-03 04:30:46 +00:00
Andrey A. Chernov
af8c32621d File positions are off_t nowdays, not long, so:
fseek -> fseeko
    ftell -> ftello

    NOTE: fseek/ftell not works for >long offsets per POSIX:

    [EOVERFLOW] For fseek( ), the resulting file offset would be a value which
    cannot be represented correctly in an object of type long.

    [EOVERFLOW] For ftell ( ), the current file offset cannot be represented
    correctly in an object of type long.
2001-09-02 14:40:51 +00:00
Andrey A. Chernov
8cdc766763 strtol -> strtoll (for off_t file size) 2001-09-01 23:36:40 +00:00
Andrey A. Chernov
bb8d56ce53 File positions are off_t nowdays, not long, so:
long -> off_t
  fseek -> fseeko

  NOTE: that fseek not works for >long offsets files per POSIX:

  [EOVERFLOW] For fseek( ), the resulting file offset would be a value which
  cannot be represented correctly in an object of type long.
2001-09-01 23:01:29 +00:00
Andrey A. Chernov
7a27e6571b File positions are off_t nowdays, not long, so:
strtol -> strtoll
  fseek -> fseeko

  NOTE: that fseek not works for >long offsets files per POSIX:

  [EOVERFLOW] For fseek( ), the resulting file offset would be a value which
  cannot be represented correctly in an object of type long.
2001-09-01 22:42:47 +00:00
Andrey A. Chernov
bd9dc97512 File positions are off_t nowdays, not long, so:
long -> off_t
strtol -> strtoll
fseek -> fseeko

NOTE: that fseek not works for >long offsets files per POSIX:

[EOVERFLOW] For fseek( ), the resulting file offset would be a value which
cannot be represented correctly in an object of type long.
2001-09-01 22:22:45 +00:00
Kris Kennaway
ffacb1a399 Remove some unsafe function calls from the signal handlers.
Obtained from:	OpenBSD
Reviewed by:	audit
MFC after:	2 weeks
2001-09-01 07:35:25 +00:00
Mark Peek
f57996437a Exit gracefully when a SIGHUP is received. This prevents ee from going into
an infinite spin loop when the terminal window is forcibly blown away.

PR:		29553
Reported by:	Sung N. Cho <sucho2@vt.edu>
MFC after:	1 day
2001-08-31 21:50:06 +00:00
Ruslan Ermilov
3b7e5ccc6a SECURITY: Drop `setgid kmem' bit as early as possible. 2001-08-31 16:26:37 +00:00
Ruslan Ermilov
208691fcd8 Sort predicates.
PR:		docs/30237
2001-08-31 15:48:00 +00:00