summaryrefslogtreecommitdiffstats
path: root/usr.bin
Commit message (Collapse)AuthorAgeFilesLines
* In netstat -x, do not try to print out tcp timer status for udp sockets.silby2009-09-231-8/+10
|
* Update find(1) man page for -L/-delete interaction.jilles2009-09-201-1/+2
| | | | | | | | | It is a bit unfortunate that the example to delete broken symlinks now uses rm(1), but allowing this with -delete would require fixing fts(3) to not imply FTS_NOCHDIR if FTS_LOGICAL is given (or hacks in the -delete option). PR: bin/90687 MFC after: 2 weeks
* IEEE Std 1003.1, 2004 Edition states:dds2009-09-201-2/+1
| | | | | | | | | | | | | "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
* Follow POSIX (IEEE Std 1003.1, 2004 Edition) in the implementationdds2009-09-201-9/+12
| | | | | | | | | | | 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
* Allow [ to be used as a delimiter.dds2009-09-201-1/+1
| | | | | Pointed by: Marius Strobl Obtained from: Apple
* Add the ability to see TCP timers via netstat -x. This can be a usefulsilby2009-09-162-7/+20
| | | | | | | | | feature when you have a seemingly stuck socket and want to figure out why it has not been closed yet. No plans to MFC this, as it changes the netstat sysctl ABI. Reviewed by: andre, rwatson, Eric Van Gyzen
* Add C/c/f/p/v switches plus a bunch of minor fixes and cleanups.rdivacky2009-09-082-42/+265
| | | | | | Obtained from: NetBSD Approved by: des (maintainer) Approved by: ed (mentor, implicit)
* Constify format string pointer, otherwise this would trigger warning whendelphij2009-09-081-1/+1
| | | | higher warning level is enabled.
* Make sure to use up-to-date libarchive header files from source tree whenpjd2009-09-071-1/+1
| | | | | | | compiling tar and not the ones from /usr/include/. Reviewed by: kientzle Approved by: kientzle
* Add NFSv4 ACL support to find(1).trasz2009-09-041-25/+35
| | | | Reviewed by: rwatson
* Remove single occurance of HAS_CTYPE ifdef, ctype functionsache2009-09-041-1/+1
| | | | used here for a long time and needs their header in anycase.
* Add ARP statistics to the kernel and netstat.gnn2009-09-033-0/+47
| | | | | | | | | | | | | | | | | | New counters now exist for: requests sent replies sent requests received replies received packets received total packets dropped due to no ARP entry entrys timed out Duplicate IPs seen The new statistics are seen in the netstat command when it is given the -s command line switch. MFC after: 2 weeks In collaboration with: bz
* Fix the problem that the entry broke into two lines with multi-byteume2009-08-303-12/+24
| | | | | | AM/PM format. Reported by: takawata
* Don't try to mmap the contents of empty files. This behaviour was harmlesscperciva2009-08-261-0/+4
| | | | | | | | | | | prior to r195693, since historical behaviour of mmap(2) was to silently ignore length-zero mmap requests; but mmap now returns EINVAL, which caused look(1) to emit an error message and fail. Among other things, this makes `freebsd-update fetch` on a newly installed 8.0-BETA3 system print bogus warning messages. MFC after: 3 days
* fstat: fix fsid comparison when executed on systems with 64-bit longavg2009-08-202-2/+2
| | | | | | | | | | | | | | | | | | | | | This affects only fstat on zfs and devfs, only on 64-bit systems and only when fsid is greater than 2^31 - 1. When fstat examines a file via stat(2) it takes uint32_t st_dev and assigns to (signed) (64-bit) long fsid, this results in a positive value. When fstat examines opened files it takes int32_t f_fsid.val[0] and assigns to (signed) (64-bit) long fsid, this results in a negative value. So, while initially st_dev and f_fsid.val[0] have the same bit values they get promoted to different 64-bit values because of the signed-vs-unsigned difference. A fix is to use "more natural" positive numbers by introducing intermediate unsigned cast for f_fsid.val[0]. Reviewed by: jhb, lulf Approved by: re (kib) MFC after: 1 week (to stable/7)
* Add my birthdayfluffy2009-08-151-0/+1
| | | | Approved by: re (rwatson) miwi (mentor)
* Update procstat(1) for the fact that devfs paths are no longer unsupported.rwatson2009-08-121-4/+2
| | | | Approved by: re (kib)
* Correct a stack underflow in gzip:delphij2009-07-311-1/+5
| | | | | | | | | | | | | | - Limit suffix to be no more than 30 bytes long. This matches GNU behavior. - Correct usage of memcpy(). Note that this commit only corrects the stack underflow issue, we still need some other fixes to cover other edges. [1] Reported by: Ron Jude <ronj wytheville org> Discussed with: Matthew Green (original NetBSD gzip author), Eygene Ryabinkin <rea-fbsd codelabs ru> [1] Approved by: re (kib)
* Update less to v436. This is considered as a bugfix release from vendor.delphij2009-07-291-4/+5
| | | | | | | | | | Major changes from v429: * Don't pass "-" to non-pipe LESSOPEN unless it starts with "-". * Allow a fraction as the argument to the -# (--shift) option. * Fix highlight bug when underlined/overstruck text matches at end of line. * Fix non-regex searches with ctrl-R. Approved by: re (kensmith, kib)
* Introduce a new sysctl process mib, kern.proc.groups which adds thebrooks2009-07-241-2/+40
| | | | | | | | | | | | ability to retrieve the group list of each process. Modify procstat's -s option to query this mib when the kinfo_proc reports that the field has been truncated. If the mib does not exist, fall back to the truncated list. Reviewed by: rwatson Approved by: re (kib) MFC after: 2 weeks
* Add a new type of VM object: OBJT_SG. An OBJT_SG object is very similar tojhb2009-07-241-0/+3
| | | | | | | | | | | a device pager (OBJT_DEVICE) object in that it uses fictitious pages to provide aliases to other memory addresses. The primary difference is that it uses an sglist(9) to determine the physical addresses for a given offset into the object instead of invoking the d_mmap() method in a device driver. Reviewed by: alc Approved by: re (kensmith) MFC after: 2 weeks
* Move the check to ensure the locate database has the minimum required sizejhb2009-07-242-3/+2
| | | | | | | | | | when using mmap() before invoking mmap(). This avoids a confusing error message when locate is invoked against a zero-size database after the recent change to make mmap() fail requests to map 0 bytes. Submitted by: Jaakko Heinonen jh of saunalahti dot fi Approved by: re (kensmith) MFC after: 1 week
* - Add my birthdayyzlin2009-07-211-0/+1
| | | | | | - Add myself to ports committers and to lwhsu's mentee list Approved by: re (kib), lwhsu (mentor)
* Remove no longer needed #include after removing the legacybz2009-07-181-1/+0
| | | | | | | vimage API in r195741. Reviewed by: rwatson Approved by: re (kib)
* Make mklocale work again, now that fwrite()'s return codes are different.ed2009-07-141-2/+2
| | | | | Submitted by: Navdeep Parhar <nparhar gmail com> Approved by: re (kib)
* Add manual page links to advertise procstat(1) a little better.trasz2009-07-093-3/+6
| | | | Approved by: re (kib)
* Fix some uninitialise variables.brian2009-07-081-4/+4
| | | | | | | PR: 136383 Submitted by: Ulrich Spoerlein - uqs at spoerlein dot net Approved by: re (kib) MFC after: 3 weeks
* This addresses some issues with my earlier -R fix thatkientzle2009-07-062-66/+74
| | | | | | | | | | | | | | were pointed out by Brooks Davis and Alexey Dokuchaev: * It now tries to lookup arguments as names first, then tries to parse them as numbers. In particular, this makes the behavior consistent with POSIX conventions when usernames consist entirely of digits. * It now uses strtoul() for the numeric parsing. Finally, I've included an update to the test harness to exercise the new numeric cases for -R. Approved by: re (kib)
* This fixes bsdcpio's -R option to accept numerickientzle2009-07-032-20/+50
| | | | | | | | | | | | | | | user or group Ids as well as user or group names. In particular, this fixes freesbie2, which uses -R 0:0 to copy a bunch of files so that the result will be owned by root. Also fixes a related bug that mixed-up the uid and gid specified by -R when in passthrough mode. Thanks to Dominique Goncalves for reporting this regression. Approved by: re (kib)
* Support shadow.byname and shadow.byuid maps, protecting them bybrian2009-06-253-0/+3
| | | | | | | | | | insisting on privileged port access. Include /var/yp/Makefile.local if it exists and suggest using it to override /var/yp/Makefile behaviour. Approved by: re (kib) MFC after: 3 weeks
* Sync with NetBSD:delphij2009-06-243-10/+10
| | | | | | | | | | - gzip -n does not store timestamp; [1] - Reduce diff against NetBSD by moving some casts in our local versions. PR: bin/134955 Obtained from: NetBSD MFC after: 1 month
* Change the ABI of some of the structures used by the SYSV IPC API:jhb2009-06-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - The uid/cuid members of struct ipc_perm are now uid_t instead of unsigned short. - The gid/cgid members of struct ipc_perm are now gid_t instead of unsigned short. - The mode member of struct ipc_perm is now mode_t instead of unsigned short (this is merely a style bug). - The rather dubious padding fields for ABI compat with SV/I386 have been removed from struct msqid_ds and struct semid_ds. - The shm_segsz member of struct shmid_ds is now a size_t instead of an int. This removes the need for the shm_bsegsz member in struct shmid_kernel and should allow for complete support of SYSV SHM regions >= 2GB. - The shm_nattch member of struct shmid_ds is now an int instead of a short. - The shm_internal member of struct shmid_ds is now gone. The internal VM object pointer for SHM regions has been moved into struct shmid_kernel. - The existing __semctl(), msgctl(), and shmctl() system call entries are now marked COMPAT7 and new versions of those system calls which support the new ABI are now present. - The new system calls are assigned to the FBSD-1.1 version in libc. The FBSD-1.0 symbols in libc now refer to the old COMPAT7 system calls. - A simplistic framework for tagging system calls with compatibility symbol versions has been added to libc. Version tags are added to system calls by adding an appropriate __sym_compat() entry to src/lib/libc/incldue/compat.h. [1] PR: kern/16195 kern/113218 bin/129855 Reviewed by: arch@, rwatson Discussed with: kan, kib [1]
* Don't use sys/nfs/rpcv2.h - it is part of the old kernel RPC implementationdfr2009-06-243-20/+18
| | | | and will be removed.
* Add libjail, a (somewhat) simpler interface to the jail_set and jail_getjamie2009-06-242-13/+6
| | | | | | system calls and the security.jail.param sysctls. Approved by: bz (mentor)
* %.s expects an int as the length specifier, so cast properly.delphij2009-06-231-1/+2
|
* Use strlcpy() instead of manually setting the last byte of the array to \0.delphij2009-06-231-8/+4
|
* Use strlcpy() instead of explicitly set \0 on the tail of the array.delphij2009-06-231-2/+1
|
* Use C99 initialization when necessary; apply static to internal rountines.delphij2009-06-231-5/+5
| | | | This makes nfsstat WARNS=3 clean.
* K&R -> ANSIdelphij2009-06-231-3/+1
|
* Use getprogname() instead of referencing __progname.delphij2009-06-231-3/+2
|
* Usermode portion of the support for swap allocation accounting:kib2009-06-231-13/+23
| | | | | | | | | | | - update for getrlimit(2) manpage; - support for setting RLIMIT_SWAP in login class; - addition to the limits(1) and sh and csh limit-setting builtins; - tuning(7) documentation on the sysctls controlling overcommit. In collaboration with: pho Reviewed by: alc Approved by: re (kensmith)
* Add support for uncompressing pack(1)'ed files. Pack(1) is a program founddelphij2009-06-212-1/+359
| | | | | | | | | | | | in some commercial Unix systems, which utilizes Huffman minimum redundancy code tree to compress files. This implementation supports the "new" pack format only, just like GNU gzip did. Thanks for oliver@'s archive set which I can test against, and Mingyan Guo for providing helpful review of my code. PR: bin/109567 MFC after: 1 month
* Restore the check against running as root that I accidentally removed inbrooks2009-06-201-0/+9
| | | | r194493.
* Implement the -z (zero counters) option for the various bpf counters.csjp2009-06-192-1/+9
| | | | | | | | Add necessary changes to the kernel for this (basically introduce a bpf_zero_counters() function). As well, update the man page. MFC after: 1 month Discussed with: rwatson
* Two fixes for SMALL case when compiling with WARNS=6:delphij2009-06-191-1/+4
| | | | | | | - Reduce scope where return value can be referenced. - Add a dummy access to timestamp to silence warning. Submitted by: Mingyan Guo <guomingyan gmail com>
* In preparation for raising NGROUPS and NGROUPS_MAX, change basebrooks2009-06-193-13/+34
| | | | | | | | | | | | | | | | | | | | | | system callers of getgroups(), getgrouplist(), and setgroups() to allocate buffers dynamically. Specifically, allocate a buffer of size sysconf(_SC_NGROUPS_MAX)+1 (+2 in a few cases to allow for overflow). This (or similar gymnastics) is required for the code to actually follow the POSIX.1-2008 specification where {NGROUPS_MAX} may differ at runtime and where getgroups may return {NGROUPS_MAX}+1 results on systems like FreeBSD which include the primary group. In id(1), don't pointlessly add the primary group to the list of all groups, it is always the first result from getgroups(). In principle the old code was more portable, but this was only done in one of the two places where getgroups() was called to the overall effect was pointless. Document the actual POSIX requirements in the getgroups(2) and setgroups(2) manpages. We do not yet support a dynamic NGROUPS, but we may in the future. MFC after: 2 weeks
* When checking if we can write to a file, use access() instead of abrooks2009-06-191-28/+2
| | | | | | | manual permission check based on stat output. Also, get rid of the executability check since it is not used. MFC after: 2 weeks
* Since the width is always 2, it is enough to put just oneume2009-06-181-2/+2
| | | | | | trailing space is enough. MFC after: 1 week
* Fix column width of weekday names for multibyte locales.ume2009-06-171-9/+18
| | | | | | Noticed by: nyan Discussed with: matusita, takawata MFC after: 1 week
* Add revoke(1).ed2009-06-154-0/+123
| | | | | | | | While hacking on TTY code, I often miss a small utility to revoke my own (pseudo-)terminals. This small utility is just a small wrapper around the revoke(2) call, so you can destroy your very own login sessions. Approved by: re
OpenPOWER on IntegriCloud