Commit Graph

2275 Commits

Author SHA1 Message Date
dsl f712e70aee expbackq() was incorrectly backing up a temporary buffer when removing \n
from the end of output of commands inside $(...) substitutions.
If the program output is n*128+1 bytes long (ending in a \n) then the code
checks buf[-1] for another \n - looking an uninitialised stack.
On a big-endian system an integer of value 10 will satisfy this (unlikely
on little endian) and can happen depending on the last code path to use
a lot of stack!
This caused the problem with newvers.sh on sparc64 after ', 2005' was
added to the date list.
Fixed PR/28852
2005-02-14 20:46:26 +00:00
christos 4dd264a6c5 allow -t ttyp0 -t p0 -t /dev/ttyp0 -t /dev/pts/0 2005-02-11 18:26:18 +00:00
simonb 3cebd9325e White space nit- don't put a space before/after increment/decrement
operators.
2005-02-11 06:21:21 +00:00
jmc 4dca8bd51e Fix from PR#29290. Properly terminate the cpio_longopts struct so an unknown
option doesn't run off the end and core dump
2005-02-10 17:48:33 +00:00
simonb dec70f4a29 KNF, use NULL instead of (type *)0. 2005-02-10 06:56:55 +00:00
perry 3fa24d7834 remove obsolete register declarations 2005-02-06 04:43:43 +00:00
matt f57592cd95 Don't write hardlinked file contents in sv4cpio mode. 2005-02-04 00:38:15 +00:00
christos cff5b51c44 Allow short command names as long as they are not ambiguous. 2005-02-03 15:15:48 +00:00
christos 796d7ce2f3 Use the length of the command for comparison not the length
of the command line argument. Allows "compression" to be used
for "compress" etc.
2005-02-03 00:03:02 +00:00
jmc 94eaa31771 Apply user supplied patterns first before applying actions for -A. This way pax
behavior WRT to patterns lines up with the example in the documentation
and how other implementations do it as well since -A is a non-standard
option/behavior. Fixes items noted in PR#23776
2005-01-23 06:19:03 +00:00
dsl 3b8851c887 Check for *ptr == 0, not ptr == NULL twice when validating -s xxxxx in tar mode.
Fixes PR bin/29040
Also actually report an error to the tty if NET2_REGEX is defined.
2005-01-21 20:23:44 +00:00
christos 2a32d39ed6 PR/28940: David Laight: /bin/sh doesn't quote the output of trap. 2005-01-11 19:38:57 +00:00
jschauma 5398861167 The '-l' option *always* prints a total, not only if output is to a
terminal.
2005-01-09 16:33:32 +00:00
augustss 6258e74613 Use the same width (9) for both the Used and Avail columns. 2004-12-31 09:54:28 +00:00
skrll c3dc5c50d9 Add the missing suspended state 'U'.
Bump date.
2004-12-29 08:48:09 +00:00
provos d830f0d651 increase the maximum length of allowable system call names 2004-12-01 03:30:07 +00:00
atatat fde0dde8b2 Make ps understand "-tpts/4" by assuming that ptyfs is mounted on
/dev/pts and that the '/' immediately preceding the digits does not
need a 'p' in front of it (ick, kludge_oldps_options()).
2004-11-29 04:44:10 +00:00
mycroft 75a40767d0 Print some future timestamps with HH:MM rather than YYYY, so that we get
something reasonable if we're using a file server whose time is slightly
ahead.
2004-11-17 17:00:00 +00:00
christos 3e870b856b print TTY instead of TT, one question mark instead of two and always the
full tty name.
2004-11-16 04:58:14 +00:00
christos 027df12dd8 Pass WARNS=3 2004-10-30 19:29:27 +00:00
dsl 238960af7e Add (unsigned char) cast to ctype function 2004-10-29 19:51:36 +00:00
dsl 7f5b5f6c04 Add (unsigned char) casts to tolower/toupper and iscntrl calls.
Fixes PR 27593
2004-10-28 20:15:36 +00:00
tron addf1a0f97 Fix broken cpio(1) option handling:
- "cpio -i -t" should list the contents of a file, not extract it.
- Don't extract a file when only option "-d" is given.
Patch supplied by Paul Ripke in PR bin/26513.
2004-10-26 16:11:49 +00:00
jmc 79308267d4 For HOSTTOOL builds, just exclude the chroot support as it's not needed and
avoids having to platform check for fchroot(). Fixes PR#27336
2004-10-22 21:00:18 +00:00
wiz 7faf3dc435 English improvement (remove "be"). 2004-10-20 23:48:01 +00:00
dsl 74db501288 Update date - before wiz complains 2004-10-17 18:53:59 +00:00
dsl 7404af49b7 Improve error reporting for invalid tar archives. 2004-10-17 18:51:29 +00:00
dsl 8317fe1276 Add an option --chroot to tar. Causes it to chroot(".") before doing
an extract.  With -h this will cause existing absolute symlinks to be treated
as relative to the current directory.
Helps sysinst handle existing symlinks in the target system.
Remove 'L' from the usage (got spilt into 'h' and 'H' many moons ago)
Add 'S' to usage, and put into correct place in options list.
2004-10-17 18:49:55 +00:00
christos 211a72de86 Add WARNS=3 2004-10-16 18:07:16 +00:00
dan e541469606 teach rcmd about getport move in rsh directory 2004-10-16 09:58:38 +00:00
christos 4fbd9df224 PR/27212: Greg A. Woods: Accept "-C <dirname>" inside filelists in addition
to "-C\n<dirname>".
But we are not making it the default output option as the patch suggests.
2004-10-10 22:05:26 +00:00
christos 1faaf9a7c2 PR/27213: Greg A. Woods: pax doesn't honour SIGPIPE when listing
But always exit, not just on SIGPIPE.
2004-10-10 22:03:08 +00:00
christos d8cc5bab94 PR/27209: Greg A. Woods: typo in comment in pax/tty_subs.c 2004-10-10 21:54:24 +00:00
christos 37fed2119d PR/27208: Greg A. Woods: pax must call options() before using syswarn()
or tty_warn()
2004-10-10 21:53:23 +00:00
enami 87aaf3d70d Fix a bug introduced by previous commit. It breaks export command
with multiple arguments if one of them are already set.  Fix PR#27155
and probably PR#27143.
2004-10-06 10:23:43 +00:00
dsl 5f9b910124 Save the length of each variable in the name table so that we can
compare the lengths and then use memcmp() in the search code.
Speeds up one of my scripts by a facter of 2.
Increase the size of the variable hash table.
Cuts down time for script to execute from 60 seconds to 10.
Move variable search into a new function to hide the implementation
from most of the code, new version is slightly smaller than old.
2004-10-02 12:16:53 +00:00
christos d12e6436f9 Don't forget to FIOCLEX the internal copies of stdout,stderr,stddiag when
we invoke a subshell. Otherwise the executed command gets invoked with
17,18,19 open.
2004-09-28 16:07:01 +00:00
wiz 5107d92cf0 Bump date for -S support. 2004-09-27 07:41:54 +00:00
christos 60cf19985c PR/19490: Julio Merino: Teach tar about --sparse, -S option.
Do it for cpio too.
2004-09-26 23:46:00 +00:00
christos 6885f6ba28 In GNU-tar mode, don't split filenames to prefix+name because GNU tar does
not honor it.
2004-09-26 22:49:05 +00:00
christos d980bf3418 Keep track of the length of the gnu long name/link hack, so that
we can append to it. Modify the code so that file_write is re-entrant,
even in the gnu long name/link hack.

The old code assumed that the buffer already contained the necessary
blocks to satisfy the read file request that contained the long
filename. This is not always the case, specially when we are dealing
with pipes which do shorter reads, thus having more probability
that a long file name will fall across a buffer boundary.

To reproduce, create a tar archive with a lot of gnu-long-names
(pkgsrc/devel/libsigc++2 is a good example), do a tar -tf to get
a list of filenames, compress it and do a tar -tzf to get another
list of the filenames. Notice that the two lists differ.
2004-09-22 15:03:18 +00:00
christos d6bc453dfc update the comment that documents the fields initialized in the array below. 2004-09-22 14:52:00 +00:00
christos 448fdb0c85 fd can be -1 or -2 for the gnu long name/link hack. So check for >= 0
instead of -1 if we need to flush.
2004-09-22 14:51:12 +00:00
hubertf 2fa09966de Change copyright to 2-clause BSD-copyright.
Changed with explicit permission of Thorsten Lockert (tholo sigmasoft com)
2004-09-15 19:45:17 +00:00
jdolecek 0e3af04f6a use native syscallnames[] array for 'aout' and 'aoutm68k' "emulations" - it's
only used for syscall name <-> number translations, and the native array
is guaranteed to be superset of the former 'aout' and 'aoutm68k' arrays

this re-adds 'aoutm68k' support, and replaces change made in 1.14

g/c #include's which are no longer needed (including aout_syscalls.c), and
also add some comments for the emulations[] array
2004-09-12 11:05:43 +00:00
jdolecek c2ce3ec2d5 constify 2004-09-12 09:25:59 +00:00
he 72ed8803cf Remove references to aoutm68k_syscalls.c, following that file's removal. 2004-09-10 18:30:20 +00:00
wiz 89fb08a9ec Bump date for removal of Kerberos option descriptions.
Remove dots at end of SEE ALSO.
2004-09-05 08:48:32 +00:00
manu bd3e12fe2f Kerberos support is broken in rcommands, thus making -K -k and -x options
unavailable. Remove theses options from the man pages (it won't be very
hard to bring them back if we fix kerberos one day)
2004-09-05 08:38:23 +00:00
wiz 86831d25f5 Bump date for laddr. 2004-08-23 17:36:19 +00:00