Commit Graph

479 Commits

Author SHA1 Message Date
dyson
7df966457d Add an option to building PS, so that the upages are explicitly paged in only
for users who are root, or in group wheel.  This is useful on large timesharing
systems where a PS command can cause the system to grind to a halt.  The
ability to get the information isn't diminished for those who really need the
additional detail (administrators.)  Normal users won't see any difference unless
the processes are swapped out.  The "really get it mode" is invoked by the
use of an additional flag in the command string "-f".  New/old behavior is
selectable with a compile option.

PR:		5196
Submitted by:	Matt Dillon <dillon@best.net>
1997-12-05 07:33:40 +00:00
julian
857944f486 Reviewed by: hackers@freebsd.org in general
Obtained from: Whistle Communications tree

Add an option to the way UFS works dependent on the SUID bit of directories
This changes makes things a whole lot simpler on systems running as
fileservers for PCs and MACS. to enable the new code you must
1/ enable option SUIDDIR on the kernel.
2/ mount the filesystem with option suiddir.
hopefully this makes it difficult enough for people to
do this accidentally.
see the new chmod(2) man page for detailed info.
1997-11-13 00:28:51 +00:00
jdp
12fb41efaf Document the exit status for a command that was terminated by a
signal.
1997-11-12 04:32:50 +00:00
joerg
297798c1ce Sort "sparse" into alphabetical order, since dd's `conv' options need
to be sorted.  This temporarily broke the "osync" option.
1997-11-11 20:35:29 +00:00
bde
a7f8a3e8cf Fixed some type and value mismatches. setsignal() returned a bogusly
cast value that was always ignored.  Rev.1.9 of trap.c made this
more bogus by returning a semantically different value after calling
siginterrupt().  Avoid these problems by not returning a value.
1997-11-10 11:32:24 +00:00
ache
ae5a7dcd2a 1) Fix longstanding bug:
trap 'echo xxx' 1 2 3 15
	read x
is not interrupted by ^C (due to restartable read syscall) and must be
interrupted per POSIX
Worse case:
	read -t 5 x
hangs forever after ^C pressed (supposed to timeout after 5 secs)
Fixed by adding siginterrupt(signo, 1) after catch handler installed

2) Do not reinstall sighandler immediately after it is called,
BSD do it for us
1997-11-05 23:33:58 +00:00
helbig
d1daf1db6b Synchronize usage() and man page.
Pointed out by bde.
1997-10-26 10:33:02 +00:00
joerg
d5c4ec3e13 Style police: keep a variable list in alphabetical order, and add
pointless paren's to return statements.

Nitpicked by:	bde :)
1997-10-13 09:36:05 +00:00
joerg
1b24b4825c Make df(1) exit with non-success status if something went wrong.
PR:		bin/4415
1997-10-12 13:55:43 +00:00
joerg
5c77337149 Teach dd(1) about an option to write sparse files. Can be useful for
things like diskless clients' swap files etc.

Submitted by:	pascal@zuo.dec.com (Pascal Pederiva) (ages ago, with many
						  stylistic changes by me)
1997-10-11 20:09:05 +00:00
eivind
75a047687a Un-clobber mktemp->mkstemp patch. 1997-10-09 11:05:16 +00:00
eivind
6d44abe78c Add <sys/errno.h> 1997-10-09 10:50:54 +00:00
eivind
ee25b29d4c make signal handlers errno safe
Obtained from:	OpenBSD (file rev 1.11) - Theo de Raadt <deraadt@openbsd.org>
1997-10-08 14:47:56 +00:00
eivind
4744f1f336 mktemp -> mkstemp
Obtained from: OpenBSD (file rev 1.4 by Theo de Raadt <deraadt@openbsd.org>)
1997-10-08 13:46:39 +00:00
eivind
fb49e457d9 make signal handlers errno safe
Obtained from:	OpenBSD (file rev 1.5) Theo de Raadt <deraadt@openbsd.org>
1997-10-08 12:59:14 +00:00
eivind
344e8d0e61 Slightly improved fix compared to my insiration
don't munge argv strings -- copy them first. avoids 'w' showing:
    deraadt  p8 zeus.theos.com    8:26AM     3 dd if of bs

Obtained from:	OpenBSD (file rev 1.3) by Theo de Raadt <deraadt@openbsd.org>
1997-10-08 12:10:33 +00:00
eivind
26df0a19cb save errno in sigchld handler
Obtained from:	Theo deRaadt <theo@openbsd.org> (OpenBSD rev 1.6)
1997-10-07 16:43:16 +00:00
eivind
744cd933d8 vsprintf -> vnsprintf paranoia.
Obtained from:	Todd Miller <millert@openbsd.org> (OpenBSD rev 1.3)
1997-10-07 16:33:22 +00:00
eivind
8410f47438 Don't honor $HOME if >= MAXPATHLEN
Obtained from:	Todd Miller <millert@openbsd.org> (OpenBSD csh.c rev 1.3 and 1.4)
1997-10-07 16:27:48 +00:00
jkh
068b44c29a Changes to support full make parallelism (-j<n>) in the world
target.
Reviewed by:	<many different folks>
Submitted by:	Nickolay N. Dudorov" <nnd@nnd.itfs.nsk.su>
1997-10-05 09:40:24 +00:00
wosch
86d58e0a84 mv(1) is too silent if used with the option -i. It should
print which input mv(1) expect (y/n) and print a warning if the
file was not overwritten.
1997-10-04 13:02:06 +00:00
wosch
e53e79b37b cp(1) is too silent if used with the option -i. It should
print which input cp(1) expect (y/n) and print a warning if the
file was not overwritten.
1997-10-03 18:11:14 +00:00
wosch
904738b58e Change example from US to international standard date notation. 1997-10-03 18:09:17 +00:00
danny
cbff58d6bc Back out suppress '\n' mod. 1997-10-03 12:54:30 +00:00
danny
8ce13b34be Add the '-s' flag to the usage string. 1997-10-01 05:44:35 +00:00
danny
4c92f69a4e Add the ability to supress the '\n' at the end of the date printed. 1997-10-01 05:24:08 +00:00
joerg
5880f26f4a Fix the broken `date HHMM.SS' handling.
PR:		bin/4661
Submitted by:	blank@sliphost37.uni-trier.de (Sascha Blank)
1997-09-30 20:06:15 +00:00
msmith
a8fc4c3cfd Add the '-t timeout' option to the 'read' builtin. This allows the
'read' command to return an error if the user fails to supply any
input withink a given time period.  The behaviour of this option is
similar to that of the like-named option in ksh93.

Reviewed by:	joerg
1997-09-29 15:15:16 +00:00
wosch
02693e70ee Endless loop.
$ touch from to
$ echo -n loop | mv -i from to
overwrite to?
^C
1997-09-28 10:41:40 +00:00
markm
6158da1e2c Change to use the new KTH Kerberos.
Also make -Wall a bit quieter.
1997-09-28 08:32:59 +00:00
charnier
23d24985c5 environmental -> environment. 1997-09-18 06:55:21 +00:00
sef
3f4ecb9abf Fix sorting of directories when doing '-d'.
PR:		bin/4558
Submitted by:	Keith Bostic
1997-09-18 06:42:27 +00:00
wosch
54d8c50f0f PR: docs/4449
The -c flag is not documented in the sh(1) manapge.

Submitted by: adrian@virginia.edu
1997-09-13 17:40:00 +00:00
wosch
07b6e5147d spelling corrections.
PR: docs/4450
Submitted by: josh@quick.net
1997-09-13 16:01:53 +00:00
jkh
a51f9b61c5 This command doesn't need to be setuid root, it's only asking
for potential trouble.
Reviewed by:	security officers.
Noted by:	OpenBSD
1997-09-12 15:00:06 +00:00
jmg
660dbd5861 fix misspelling
Submitted-by: Josh Gilliam

Closes PR:4427
1997-08-30 11:09:26 +00:00
jmg
052becb1b0 fix misspelling
Submitted-by: Josh Gilliam

Closes PR:4425
1997-08-30 11:06:35 +00:00
sos
ea66721f74 Dont have an internal function named "warn" it clashes with libc..
Needed for ELF.
1997-08-29 16:12:30 +00:00
bde
0eb66ca5d4 Restored clobbered parts of rev.1.15 (build intermediate object files
for tools).
1997-08-25 19:50:01 +00:00
steve
50095e5063 Correct confusing error message when called as 'stty -sane'.
PR:		bin/3573
1997-08-24 00:26:12 +00:00
jlemon
e29b9f2a95 Disallow empty arguments (eg: '') as process ids.
PR:		2631
Submitted by:	Arne Henrik Juul <arnej@imf.unit.no>
1997-08-21 21:34:43 +00:00
jlemon
b5bff2d390 Document correct option in manual page.
PR:		3769
Submitted by:	johnp@lodgenet.com
1997-08-19 21:52:07 +00:00
jlemon
d97633dae5 Pad the input buffer whenever sync is used, not just if the noerror flag
is also set.
Change osync to not to tack on an empty block if the input buffer is null,
    or an even multiple of the blocksize.
Also change osync to pad the output with nulls/spaces depending whether
   this is a block-oriented conversion or not (same as sync).

PR:		3818
1997-08-19 19:46:18 +00:00
brian
9146b289a0 Hint at how to use TZ.
Submitted by:	grog@lemis.com
1997-08-18 20:27:17 +00:00
steve
22b163c85c Make all status values an integral type and use
pid_t when referring to process IDs.
1997-08-18 02:53:20 +00:00
steve
89684c8d1d Use -I${.CURDIR}/../../sys so that the path is relative
to the source code directory.

Submitted by:	bde
1997-08-13 17:35:00 +00:00
ache
9cbbd6ae9a Describe signals behaviour now 1997-08-12 21:20:12 +00:00
steve
532601c3fa Oops, add #include's (forgotten in last commit) to make this
compile again.
1997-08-11 02:41:02 +00:00
steve
020120ed08 Use -I../../sys instead of -I/sys. 1997-08-11 02:36:09 +00:00
steve
7b560b7a4e Remove #ifdef NEWVM code and remove extra "key.name = p" line. 1997-08-11 02:35:16 +00:00