9340 Commits

Author SHA1 Message Date
delphij
aa0fc00285 MFC r208888,208889,209017:
- make sure that initialize isb with fstat() on
   input file before using it. (bin/147275)
 - Fix grammar for st_nlink.
 - Style changes.

PR:		bin/147275
Approved by:	re (kensmith)
2010-06-12 05:22:55 +00:00
uqs
c9b5a702b3 MFC r208592: mail(1) misses addresses when replying to all
There's a parsing error for fields where addresses are not separated by
space. This is often produced by MS Outlook.

PR:		bin/131861
Submitted by:	Pete French <petefrench at ticketswitch.com>
Tested by:	Pete French
Reviewed by:	mikeh
Approved by:	re (kib)
2010-06-11 11:24:23 +00:00
jkim
aec9396976 MFC: r208320
Add a new build option, MAN_UTILS.  This option lets you control building
utilities and related support files for manual pages, which were previously
controlled by MAN.  For POLA, the default depends on MAN, i.e., WITHOUT_MAN
implies WITHOUT_MAN_UTILS and WITH_MAN implies WITH_MAN_UTILS.
Note this patch implicitly fixes a documentation bug of src.conf(5), which
says WITHOUT_MAN may be used to not build manual pages while it was also
disabling some utilities for manual pages.

Approved by:	re (kib)
2010-05-25 20:16:36 +00:00
marius
4b6158fcf1 MFC: r197362
IEEE Std 1003.1, 2004 Edition states:

"The escape sequence '\n' shall match a <newline> embedded in
the pattern space."

It is unclear whether this also applies to a \n embedded in a
character class.  Disable the existing handling of \n in a character
class following Mac OS X, GNU sed version 4.1.5 with --posix, and
SunOS 5.10 /usr/bin/sed.

Pointed by:	Marius Strobl
Obtained from:	Mac OS X
2010-05-21 19:45:54 +00:00
marius
9cf8d0fd74 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
e55ff4c612 MFC: r197356
Allow [ to be used as a delimiter.

Pointed by:	Marius Strobl
Obtained from:	Apple
2010-05-21 19:21:47 +00:00
delphij
0de883b841 MFC r207733:
Plug memory leak.
2010-05-20 00:31:09 +00:00
mm
be8f6d151d 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
dougb
737d9e99f4 MFC r208089:
Remove duplicate
2010-05-18 02:22:08 +00:00
ed
cbd656ffa4 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
delphij
7d27cb89f2 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
3d54666648 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
84dd6e2dc3 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
bd79e97059 Merge r205386 from head:
Fix command example, presumed leftovers of old markup.
2010-05-05 12:39:44 +00:00
delphij
a83c63008c 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
8f3ade4bcf MFC r207153: stat: Allow -f %Sf to display the file flags symbolically.
PR:		124349
2010-05-01 14:36:04 +00:00
avg
fbdaed42d0 MFC r206687: indent(1): don't treat bare '_t' as a type name with -ta 2010-04-22 13:16:18 +00:00
maxim
c8fd907eca MFC r205874: make sockstat -6 output more readable for long ipv6
addresses.
2010-04-21 05:39:51 +00:00
delphij
6f29dab875 MFC r205472:
Enable mmap for minigzip(1).
2010-04-20 22:52:13 +00:00
delphij
3c3719239a 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
trasz
443081b977 MFC r205853:
Add myself.
2010-04-13 06:05:15 +00:00
imp
b81ac36cf0 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
avg
70acb69439 MFC r205989: indent(1): new option, -ta, to treat all *_t identifiers as types 2010-04-12 21:04:35 +00:00
avg
ab79199755 MFC r205988: indent(1): correctly handle case/label at the very start of a function 2010-04-07 22:19:46 +00:00
avg
c99a0c09e8 MFC r205854: calendar.freebsd: add my entry 2010-04-02 15:33:24 +00:00
glebius
dc583d98a5 Merge r205082, r205083 that fix 'netstat -f netgraph' functionality. 2010-04-02 11:07:55 +00:00
delphij
70d4783088 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
jh
982aa80857 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
7797744837 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
kib
2cb34af975 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
03b9b6f6a6 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
jh
39b00eecc9 MFC r204872: Pass the correct size to memset().
PR:		bin/128094
2010-03-15 16:39:52 +00:00
joerg
720adc707c (r205011) The "number" argument is everything but optional. 2010-03-12 05:16:24 +00:00
gavin
ae7f3f8faf 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
jh
66c2405d1f 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
brucec
6f4a006266 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
delphij
56c6dfba43 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
jh
0527f7321b MFC r200781:
Cast time_t values to intmax_t and use %jd with printf.
2010-02-08 15:55:01 +00:00
jh
6cbfef4ad3 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
jh
000376f24e 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
jh
47a3486c10 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
jh
8d357f4e11 MFC r200632:
The input line length limit mentioned on the manual page was removed by
r176119.
2010-02-06 11:42:23 +00:00
jh
e07334a19c MFC r200441:
The input line length limit mentioned on the manual page was removed by
r179374.
2010-02-06 11:39:33 +00:00
trasz
e13d463206 MFC r196839:
Add NFSv4 ACL support to find(1).
2010-01-30 14:54:12 +00:00
gnn
889d37774b MFC r196797:
Add ARP statistics to the kernel and netstat.
2010-01-28 16:48:44 +00:00
avilla
6193a10a41 - MFC r197788, r203040, r203045, r203048
Approved by:	tabthorpe (mentor)
2010-01-27 18:12:22 +00:00
gavin
4201da924f Merge r200318 from head: add myself to calendar.freebsd. 2010-01-27 15:36:19 +00:00
kib
9fefaa1da5 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
d13809bdba 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
83546818a8 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