Commit Graph

9281 Commits

Author SHA1 Message Date
Marius Strobl
4c3c0e9df5 MFC: r197361
Follow POSIX (IEEE Std 1003.1, 2004 Edition) in the implementation
of the y (translate) command.

"If a backslash character is immediately followed by a backslash
character in string1 or string2, the two backslash characters shall
be counted as a single literal backslash character"

Pointed by:	Marius Strobl
Obtained from:	Mac OS X
2010-05-21 19:44:23 +00:00
Marius Strobl
d9dca217f7 MFC: r197356
Allow [ to be used as a delimiter.

Pointed by:	Marius Strobl
Obtained from:	Apple
2010-05-21 19:21:47 +00:00
Xin LI
d02025c89e MFC r207733:
Plug memory leak.
2010-05-20 00:31:09 +00:00
Martin Matuska
3829a73468 MFC r207842, r207844, r208099:
MFC r207842:
Import of liblzma, xz, xzdec, lzmainfo from vendor branch
Add support for xz and lzma to lesspipe.sh (xzless, lzless)

MFC r207844:
Add two public headers missing in r207842
Adjust CFLAGS for lzmainfo, xz, xzdec

MFC r208099:
Add versioned symbols to liblzma
Use default SHLIB_MAJOR.

Approved by:	delphij (mentor)
2010-05-18 09:59:09 +00:00
Doug Barton
fb7f7f92b8 MFC r208089:
Remove duplicate
2010-05-18 02:22:08 +00:00
Ed Schouten
8f6794dda3 MFC r207453:
Remove WNOHANG flag from wait3().

  Because script(1) now reliably terminates when the TTY is closed, it may
  be the case that the call to wait3() occurs just before the child
  process exits. This causes error codes to be ignored.

  Just change script(1) to use waitpid() instead of wait3(). This makes it
  more portable and prevents the need for a loop, since waitpid() only
  returns a specified process.

PR:           bin/146189
Tested by:    amdmi3@, older version
2010-05-14 12:34:06 +00:00
Xin LI
50669a65c7 MFC r207247,r207283,207284:
- Add a signal handler for SIGINT which removes output file when necessary.
 - While I'm there, move unlink_input() slightly down to after closing the
   output file, in uncompression path.
 - Language improvements to make the BUGS section easier to read.
2010-05-10 02:07:57 +00:00
Jilles Tjoelker
5189ddc04f MFC r207485: pathchk(1): Fix the example so it allows arbitrary pathnames.
Spaces and various other characters in pathnames are not passed through
literally by xargs in its default mode. Instead, use find . -exec ... {} +

Although the -- argument is not strictly required here, add it anyway to
avoid surprises when modifying the code to find -f -somedir ...
2010-05-09 19:32:37 +00:00
Jilles Tjoelker
32d8625838 MFC r207483: pathchk: Add the new POSIX -P option.
This option checks for empty pathnames and components starting with '-'.
Our -p option also checks for the latter, which remains the case.
2010-05-09 19:30:52 +00:00
Gavin Atkinson
d0fc28afaa Merge r205386 from head:
Fix command example, presumed leftovers of old markup.
2010-05-05 12:39:44 +00:00
Xin LI
9ea9cdd0e0 MFC r196981, r200844, r201630, r203977, r203978, r204352:
r196981 (rdivacky):

Add C/c/f/p/v switches plus a bunch of minor fixes and cleanups.

Obtained from:	NetBSD

r200844 (jh):

Don't print the archive name with -p and -q options.

PR:		bin/141280

r201630 (kientzle):

When restoring files, use the mode for the mode.

Thanks to: Jun Kuriyama for pointing this out

r203977 (gavin):

Implement the rename query, for when a file with the same name as the one
about to be extracted already exists.  The question, and interpretation
of the response is deliberately compatible with Info-Zip.

This change was originally obtained from NetBSD, but has three changes:
 - better compatibility with Info-Zip in the handling of ^D
 - Use getdelim() rather than getline()
 - bug fix: != changed to == in the "file rename" code

I suspect the latter is also a bug in NetBSD, but I can't easily confirm
this.

PR:		bin/143307
Reviewed by:	rdivacky (change to unzip.c only)
Obtained from:	NetBSD src/usr.bin/unzip/unzip.c 1.8

r203978 (gavin):

Bump .Dd for r203977

r204352 (ru):

Fixed static linkage.

==

Requested by:	Alex Kozlov <spam rm-rf kiev ua>
2010-05-04 19:18:00 +00:00
Jilles Tjoelker
5d05d542eb MFC r207153: stat: Allow -f %Sf to display the file flags symbolically.
PR:		124349
2010-05-01 14:36:04 +00:00
Andriy Gapon
45ebe396a8 MFC r206687: indent(1): don't treat bare '_t' as a type name with -ta 2010-04-22 13:16:18 +00:00
Maxim Konovalov
6cf6ace6cd MFC r205874: make sockstat -6 output more readable for long ipv6
addresses.
2010-04-21 05:39:51 +00:00
Xin LI
a6cd5bcfbf MFC r205472:
Enable mmap for minigzip(1).
2010-04-20 22:52:13 +00:00
Xin LI
a9de89ae43 MFC r206387:
Diff reduction against NetBSD and add myself to AUTHORS section of the
manual page as I wrote the unpack functionality.  No actual executable
code change verified with md5(1).
2010-04-20 22:47:24 +00:00
Edward Tomasz Napierala
1d7437b3db MFC r205853:
Add myself.
2010-04-13 06:05:15 +00:00
Warner Losh
92f7bd5aec MFC: 205992
Make -r mean exactly the same thing as -E for increased compatibility
  with GNU sed.

  MFC after:	7 days
2010-04-13 01:02:20 +00:00
Andriy Gapon
ce749f106e MFC r205989: indent(1): new option, -ta, to treat all *_t identifiers as types 2010-04-12 21:04:35 +00:00
Andriy Gapon
354b61f607 MFC r205988: indent(1): correctly handle case/label at the very start of a function 2010-04-07 22:19:46 +00:00
Andriy Gapon
32a9ef6d33 MFC r205854: calendar.freebsd: add my entry 2010-04-02 15:33:24 +00:00
Gleb Smirnoff
033a5be7fa Merge r205082, r205083 that fix 'netstat -f netgraph' functionality. 2010-04-02 11:07:55 +00:00
Xin LI
92fc47574f MFC r205702:
Remove GNU cpio after fix of CVE-2010-0624.

Note that this is actually a no-op for most users, as this GNU
cpio was broken on -HEAD and 8-STABLE since last March until
the recent fix.

FreeBSD 8.0+ uses BSD cpio by default and the code is being
actively maintained.
2010-03-29 18:24:08 +00:00
Jaakko Heinonen
f004e8133a MFC r198175:
- If lstat()/stat() fails with an error other than ENOENT, don't ignore
  the error and assume that the file doesn't exist. Touch could return
  success with -c option even if the file existed and time was not set.
- If the first utimes_f() call fails with -A option, give up and don't
  continue trying to set times to current time. [1]
- Set exit status to 1 when setting of timestamps fails for a directory
  or symbolic link even though lstat()/stat() would succeed.
- Don't print bogus error message when rw() succeeds.

PR:		bin/112213
2010-03-28 11:22:38 +00:00
Ed Schouten
4ae65fe952 MFC r205008 and 205009:
Make script(1) a little less broken.

  Close the file descriptor to the TTY. There is no reason why the parent
  process should keep track of the descriptor. This ensures that the
  application inside properly drains the TTY during exit(2).

  Reported by:  alfred
2010-03-25 08:33:56 +00:00
Konstantin Belousov
1b90b87fba MFC r204879:
Teach procstat(1) to display some information about signal disposition
and pending/blocked status for signals.

MFC r204880:
Add file forgotten in r204879.
2010-03-22 09:29:56 +00:00
Gavin Atkinson
27dfb536f2 Merge r203865 from head:
The -newerXB option was being interpreted the same as the -newerXm option
  as a check for F_TIME2_B was missing.  Fix this.

PR:		bin/138245
Submitted by:	"David E. Cross"  <crossd cs.rpi.edu>
2010-03-17 20:16:28 +00:00
Jaakko Heinonen
77d503efb1 MFC r204872: Pass the correct size to memset().
PR:		bin/128094
2010-03-15 16:39:52 +00:00
Joerg Wunsch
cf4bd5e4d9 (r205011) The "number" argument is everything but optional. 2010-03-12 05:16:24 +00:00
Gavin Atkinson
50819829d3 Merge r204053 from head:
The correct value of DEL is 0x7f, not 0xff.  This is purely a documentation
  issue - od(1) and hexdump(1) behave as expected.

PR:		docs/143869
Submitted by:	gcooper
2010-03-10 13:40:37 +00:00
Jaakko Heinonen
27a5b388f3 MFC r203551:
- Cast intptr_t, pid_t and time_t values to intmax_t and use %jd with
  printf.
- Cast the system call return value to long and use %ld in a printf in
  ktrsysret().

PR:		bin/123774
2010-02-21 13:17:35 +00:00
Rebecca Cran
b9d3fd67b9 MFC r203688:
Initialize the execfile argument to NULL instead of _PATH_DEVNULL. This allows
the -M option to be used without specifying -N.

PR:	bin/138146
Approved by:	rrs (mentor)
2010-02-18 10:46:25 +00:00
Xin LI
0985bbeaab MFC r202060:
Add a new option, -q howmany, which when used in conjuction with -w,
exits netstat after _howmany_ outputs.

Requested by:	thomasa
Reviewed by:	freebsd-net (bms, old version in early 2007)
2010-02-10 00:34:13 +00:00
Jaakko Heinonen
5e4fd6c798 MFC r200781:
Cast time_t values to intmax_t and use %jd with printf.
2010-02-08 15:55:01 +00:00
Jaakko Heinonen
46e7e3ebbc MFC r200780:
Remove non-working special case for pipe(2) from amd64-fbsd32.c and
i386-fbsd.c. Add pipe(2) to syscall table to decode it's pointer
argument properly and re-add special handling for pipe(2) return value
to print_syscall_ret().

PR:		bin/120870
2010-02-08 15:53:28 +00:00
Jaakko Heinonen
3ede63a7e3 MFC r200752:
Avoid sharing the file descriptor of the output file with traced
processes by setting the FD_CLOEXEC flag for the output file.

PR:		bin/140493
2010-02-08 15:50:51 +00:00
Jaakko Heinonen
33e6da3c3a MFC r200751:
Add fork(2), getegid(2), geteuid(2), getgid(2), getpid(2), getpgid(2),
getpgrp(2), getppid(2), getsid(2) and getuid(2) to syscall table to
decode their arguments correctly.
2010-02-08 15:48:18 +00:00
Jaakko Heinonen
37a33496e2 MFC r200632:
The input line length limit mentioned on the manual page was removed by
r176119.
2010-02-06 11:42:23 +00:00
Jaakko Heinonen
f8d5cb4579 MFC r200441:
The input line length limit mentioned on the manual page was removed by
r179374.
2010-02-06 11:39:33 +00:00
Edward Tomasz Napierala
4e86d39db2 MFC r196839:
Add NFSv4 ACL support to find(1).
2010-01-30 14:54:12 +00:00
George V. Neville-Neil
fbbbfe0ba5 MFC r196797:
Add ARP statistics to the kernel and netstat.
2010-01-28 16:48:44 +00:00
Alberto Villa
df4743bc4a - MFC r197788, r203040, r203045, r203048
Approved by:	tabthorpe (mentor)
2010-01-27 18:12:22 +00:00
Gavin Atkinson
18fab66957 Merge r200318 from head: add myself to calendar.freebsd. 2010-01-27 15:36:19 +00:00
Konstantin Belousov
b3c4be736e Merge scandir(3) interface update to stable/8.
MFC r201512:
Modernize scandir(3) and alphasort(3) interfaces according to the IEEE
Std 1003.1-2008.

MFC r201602:
Move scandir(3) and alphasort(3) into XSI namespace.

MFC r201604:
Use thunks to adapt alphasort-like interface to the comparision function
required by qsort() and qsort_r().

MFC r202556 (by ache):
Use strcoll() in opendir() and alphasort(). Remove some comments.

MFC r202572 (by ache):
Revert to using strcmp() for opendir().

MFC r202677 (by ache):
Style.

MFC r202679 (by ache):
Style: rename internal function to opendir_compar().

MFC r202691 (by ache):
For alphasort(3) add reference to strcoll(3).

MFC r202693 (by ache):
Style: reword comment.
2010-01-24 12:35:36 +00:00
Brooks Davis
52c240aaf4 MFC r201350:
The devices that supported EVFILT_NETDEV kqueue filters were removed in
  r195175.  Remove all definitions, documentation, and usage.

The change of function signature for vlan_link_state() was not merged to
maintain the ABI.
2010-01-22 19:51:34 +00:00
Edwin Groothuis
73510ebf05 MFC of 202280, 202281
- Remove -d option, whois.nic.mil doesn't exist anymore.

- Make whois capable of searching for IPv6 addresses just like it can
  do for IPv4 addresses without having to explicetly specify that the
  ARIN server should be used to get the initial information.

PR:		bin/142507, bin/128725
Submitted by:	Dan Mahoney <danm@prime.gushi.org>, "Matt D. Harris" <mdh_lists@yahoo.com>
2010-01-21 10:16:21 +00:00
Gavin Atkinson
322a943070 Merge r201429:
Fix return code in the case of successful file transfer, broken in
  tftp.c 1.13

PR:		bin/117452
Submitted by:	Spencer Minear  minear securecomputing.com
Approved by:	ed (mentor, implicit)
2010-01-17 10:58:59 +00:00
Ruslan Ermilov
f96c46c6ab Update to a 26-Nov-2009 release. 2010-01-15 14:20:01 +00:00
Ruslan Ermilov
c7fabb7176 MFC r201290: Treat an empty argument as an error, instead of
fetching the contents of the root directory.
2010-01-06 08:26:43 +00:00
Xin LI
90ad4a8e4c MFC r200793:
Plug a memory leak.

PR:		bin/141836
Submitted by:	Henning Petersen <henning.petersen at t-online.de>
2010-01-04 01:07:32 +00:00