Commit Graph

2090 Commits

Author SHA1 Message Date
wiz 8d21cba126 Fix typo. 2004-01-11 09:41:55 +00:00
wiz a714cd574d Bump date for previous; |fmt; remove trailing white space.
New sentence, new line.
2004-01-11 09:40:36 +00:00
tls f71666350e Adjust comment to indicate what this code is actually useful for, and that
it's not really "cheap".
2004-01-11 02:17:12 +00:00
tls ac7fdd5957 UFS->FFS 2004-01-11 02:13:14 +00:00
tls e9e0ca4155 Change behaviour of -P option to conform generally to DoD 5220.22-M
standard.  This change inspired by Apple's "Secure Empty Trash" functionality
in MacOS 10.3.  However, it is important to understand that this change
does not -- and can not -- actually achieve conformance to the current
revision of the standard.  To quote the manual page:

     The -P option attempts to conform to U.S. DoD 5220-22.M, "National Indus-
     trial Security Program Operating Manual" ("NISPOM") as updated by Change
     2 and the July 23, 2003 "Clearing & Sanitization Matrix".  However,
     unlike earlier revisions of NISPOM, the 2003 matrix imposes requirements
     which make it clear that the standard does not and can not apply to the
     erasure of individual files, in particular requirements relating to spare
     sector management for an entire magnetic disk.  Because these
     requirements are not met, the -P option does not conform to the standard.

This also makes the -P option a *lot* more expensive than it used to be.
It used to overwrite with 0xff, overwrite with 0x00, overwrite with 0xff,
with an fsync after each write.  Now it overwrites with a random character,
overwrites with 0xff, overwrites with 0x00, reads to validate the 0x00
overwrite, then overwrites with random data -- calling sync() after every
operation in an attempt to force seeks that will clear the data from the
cache of disks that lie about whether data has been committed to the
platters.  Also, the file's opened with O_SYNC|O_RSYNC to cause metadata
updates on every read/write, which should cause still more seeks.

This is better than it used to be, but it's by no means adequate if you
have data you really don't want read by an adversary who can pull the
disk apart.
2004-01-11 02:04:05 +00:00
wiz 3cd33047a8 Replace hard to understand wording with a different
one from further down in the same page. Suggested by jmc@openbsd.
2004-01-10 23:43:30 +00:00
wiz 1cb1c3286e comma-separated with a "-" in between. From Jared Yanovich via jmc@openbsd. 2004-01-08 20:26:46 +00:00
christos c8fc596cbc Simplify previous; if F_CLOSEM fails, just fall back doing the old thing.
Calling stderror here is not safe, because we might have not setjmp()'ed
yet.
2004-01-06 00:20:16 +00:00
jmmv b635f565e7 Homogenize usage messages: make the 'usage' word all lowercase, as this seems
to be the most common practice in our tree.
2004-01-05 23:23:32 +00:00
christos 62a68c898b use F_CLOSEM if it is available. 2004-01-05 23:12:30 +00:00
jmmv b9173dc41c Rewrite the loop in printflg(): if passing -Z to pax with syntax errors
(like executing "pax -Z" by itself), this caused a shr of 32 bits, which is
undefined behavior (C99) if the variable is 32 bits wide, too.  Also solves
a problem where the flgch array could be indexed out of bounds.

Thanks to uwe@ and lha@ for their suggestions... I just found the bug :p
2004-01-05 17:27:46 +00:00
jschauma ad8530d1eb remove unused code left from printescaped() backput as pointed out by Jeff
Ito in PR bin/23969 and PR bin/23970.
2004-01-04 16:04:18 +00:00
jschauma 420b2ac8ff Remove unused code left over from temporary printescaped functionality.
Noted by Jeff Ito in PR bin/23967.
2004-01-04 03:34:00 +00:00
jschauma 4f80cb6337 Remove unused code left over from temporary printescaped functionality.
Noted by Jeff Ito in PR bin/23966.
2004-01-04 03:31:28 +00:00
wiz 07d5d4dfe3 Crossreference -h and -k. Use Aq instead of \*[Lt]\*[Gt]. 2003-12-26 11:19:50 +00:00
simonb ba2dda9f8e Fix bug with previous change- always initialise d.s_block. Now "ls -1sh"
works.
XXX: ls -sh now always uses 4 chars for the size column width even if it
     needs less than that.
2003-12-26 10:51:25 +00:00
simonb c4d01568e0 KNF - wrap long lines. 2003-12-26 10:47:32 +00:00
grant f4c4780250 implement -h(umanize).
from David P. Reese Jr. in PR bin/23870.
2003-12-26 06:19:19 +00:00
wiz 00c8cf496c Add some articles. 2003-12-21 11:18:25 +00:00
wiz 4eb81d63b4 Fix example added in previous. 2003-12-21 11:16:23 +00:00
jdolecek 83f8b02df2 add a note explaining empty string matching via :
this adresses bin/23810 by VaX#n8

bump date and update copyright
2003-12-21 10:02:46 +00:00
jdolecek 9927abce5e add a note to Short-Circuit operators section about the somewhat
nonintuitive evaluation in case there is both || and && specified
pointed out in bin/23814 by VaX#n8
2003-12-21 08:40:29 +00:00
jdolecek 30651d6b04 minor optimization in evalvar()
change sent in bin/23813 by VaX#n8
2003-12-21 08:32:39 +00:00
heas 8e58476bbd correct 2 typos 2003-12-18 15:52:31 +00:00
christos 08f1ceee65 PR/23786: Robert Nestor: wait command returns the wrong status code. This
seems to be an off-by-one error, since njobs is decremented before we use
it. I hope this does not break the vfork case!
2003-12-18 00:56:05 +00:00
christos 9a77f16705 Handle breaksw inside while loop (from tcsh)
Really: test commits on new cvs binary.
2003-12-17 17:32:16 +00:00
mjl 550c4966cd Correct typo in page header for tpgid. 2003-12-16 14:26:46 +00:00
perry 375e81b270 Some file systems, like FAT, have no inodes in the ffs sense and don't
run out of inodes. df -i was saying, however, that such file systems
had 100% of their inodes in use, which would do things like trigger
alarms in scripts looking for file systems that have run out.

Instead, say 0% are in use, which although not strictly true is at
least less wrong, fixes scripts and is less worrying in nightly reports.
2003-12-07 22:42:36 +00:00
perry 9d454b9e0a mention that -h also overrides BLOCKSIZE, and sort around there 2003-12-07 16:18:25 +00:00
wiz 6fc98bf82d Add -C to usage. 2003-11-28 23:32:25 +00:00
wiz 7978aff203 Bump date for previous (hi niels!).
Sort options.
2003-11-28 23:32:02 +00:00
provos 61d0495091 support for cradle mode by marius at monkey.org; cradle mode allows the
systrace UI to be attached and re-attached, it also multiplexes across
systrace process so that one UI can function as central notification
2003-11-28 21:53:32 +00:00
dsl 7983f217c9 Generate command line when SMALL is defined and make buffer full sized.
All the code has been present for a while, and the memory cost is (about)
180 bytes per process.
Fixes PR bin/23545
2003-11-27 21:16:14 +00:00
simonb 493b309b03 Put a few headers back so this compiles again.
Compile problems noticed by Dan Carosone.
2003-11-25 03:40:18 +00:00
matt 2d72f72583 Don't emit any warnings when tar is trying to figure out if the file is
really tar format.  valid CPIO files should not trigger a warning from tar.c
2003-11-24 23:48:47 +00:00
jschauma 2c872ddbbc Also remove headers that are no longer needed. Also pointed out by Mike
Small.
2003-11-24 22:47:02 +00:00
jschauma d772e9e433 Remove unused variable stdout_ok, which was left over from my changes
in September.  Pointed out by Mike Small in a private email.
2003-11-24 22:38:46 +00:00
provos 2244ab26a9 allow underscores in usernames 2003-11-18 05:28:05 +00:00
lukem e606e2dcb2 Improve how various "simple" host tools are built and invoked. 2003-11-16 14:14:18 +00:00
dsainty 39973c5237 Optimise previous change, using fcntl(F_DUPFD) to locate a free descriptor
for us, rather than iterating until satisfied.

Suggested by David Laight.
2003-11-15 14:55:32 +00:00
dsainty 0b16f71074 Avoid corrupting the dd(1) IO streams. This would happen by accidentally
outputting to the files being manipulated by opening a file in the standard IO
descriptor space.  In particular, an output file unlucky enough to be sitting
on descriptor 2 (stderr) is certain to be corrupted.

Addresses PR bin/8521, and passes the recently committed regression test
"bin/dd".
2003-11-15 12:44:54 +00:00
dsl 296844fe72 Posix requires that 'pwd -P' reset the shells saved cwd value - so a
subsequent 'pwd -L' will report the same value.
Update man page to be a closer match to reality.
2003-11-14 20:00:28 +00:00
dsl c0cf1d6b30 This seems to need stdlib.h to get a prototype for abort(). 2003-11-14 10:46:13 +00:00
dsl edecd89511 Add '\n' to "fork failed" trace messages. 2003-11-14 10:27:10 +00:00
wiz 61ea2c0760 file system, not filesystem; e.g. is an abbreviation; use FAT instead of msdos
when describing the file system.
2003-10-30 14:58:23 +00:00
dsl db9b05af0d Make /bin/pwd almost conform to IEEE 1003.1
- Make 'pwd -L' fall back to 'pwd -P' if PWD is incorrect.
- Ignore PWD if it contains "/./" or "/../".
- Garbage collect some redundant code.
It is still non-conformant because posix mandates that the default
be 'pwd -L' (aka ksh), not 'pwd -P' (historic practise everywhere else).
Changing the default will break too much...
2003-10-30 13:52:23 +00:00
dsl df5bd11fb9 Validate the arguments to 'pwd'. Treat -L and -P as per pwd(1).
Note that 'pwd -L' and 'pwd -P' almost always report the same answer as
the shell detects when 'cd' follows a symlink and discards its cached 'pwd'
2003-10-30 09:40:26 +00:00
wiz 6a22b79c1a passwd(5), not passwd(4). From Igor Sobrado in PR 23278. 2003-10-27 08:23:40 +00:00
wiz 4580c6ac21 Do not xref alias(1) since that points to csh(1).
Noted by Igor Sobrado in PR 23278, fixed following a suggestion by Greg A. Woods.
2003-10-27 08:22:21 +00:00
lukem 7568eb663a skip a leading `-' on the arg0 name when calling el_init() 2003-10-27 06:19:29 +00:00