summaryrefslogtreecommitdiffstats
path: root/usr.bin
Commit message (Collapse)AuthorAgeFilesLines
* Fix bugs in the elapsed time calculation in ctlstat_standard()ken2013-04-111-7/+3
| | | | | | | | | | | | | | | | | | pointed out by bde: - Casting to long double isn't needed. - The division isn't needed, multiplication can be used. "When 1 nanosecond is in a floating point literal, the whole expression is automatically promoted correctly." - non-KNF indentation (1 tab) for the newly split line - different non-KNF indentation (5 spaces) for the previously split line - exessive parentheses around the division operation - bogus blank line which splits up the etime initialization - general verboseness from the above. Submitted by: bde MFC after: 3 days
* Minor spelling and grammar fixes.joel2013-04-111-1/+1
|
* Remove contractions.joel2013-04-111-8/+8
|
* fuser(1) requires a filename.eadler2013-04-111-1/+1
| | | | | | Reviewed by: lstewart Approved by: bcr (mentor) MFC after: 3 days
* Use kvm_counter_u64_fetch() to fix obtaining ipstat and tcpstat fromglebius2013-04-103-29/+69
| | | | | | kernel core files. Sponsored by: Nginx, Inc.
* Fix a time calculation error in ctlstat_standard().ken2013-04-101-2/+3
| | | | | | | | | | | ctlstat.c: When converting a timeval to a floating point number in ctlstat_standard(), cast the nanoseconds calculation to a long double, so we don't lose precision. Without the cast, we wind up with a time in whole seconds only. Sponsored by: Spectra Logic MFC after: 3 days
* Merge from projects/counters: TCP/IP stats.glebius2013-04-081-124/+130
| | | | | | | | | Convert 'struct ipstat' and 'struct tcpstat' to counter(9). This speeds up IP forwarding at extreme packet rates, and makes accounting more precise. Sponsored by: Nginx, Inc.
* Correct the path.jh2013-04-061-2/+2
| | | | | PR: 176256 Submitted by: jhs
* Add myself as a ports committer and my mentor relationship.wg2013-04-041-0/+1
| | | | | | While in the repository, add myself to calendar.freebsd. Approved by: jpaetzel (mentor)
* Update to bmake-20130330sjg2013-04-023-6/+7
|
* Make it possible to build CTL as a module.trasz2013-04-021-1/+2
| | | | | Reviewed by: ken Sponsored by: FreeBSD Foundation
* Update to upstream version 2.7fanf2013-03-284-216/+416
| | | | | | | | | | | The most notable new feature is support for processing multiple files in one invocation. There is also support for more make-friendly exit statuses. The most notable bug fix is #line directives now include the input file name. Obtained from: http://dotat.at/prog/unifdef
* Make `systat -vmstat` to use suffixes to display big floating point numbersmav2013-03-231-0/+8
| | | | | | that are not fitting into the specified field width, same as done for ints. In particular that allows to properly display disk tps above 100k, that are reachable with modern SSDs.
* MFV r248590,248594:mm2013-03-225-6/+49
| | | | | | | | | | | Update libarchive to 3.1.2 Some of new features: - support for lrzip and grzip compression - support for writing tar v7 format - b64encode and uuencode filters - support for __MACOSX directory in Zip archives - support for lzop compresion (external utility)
* Replace deprecated (or remove obsolete) libarchive 2.8 functionsmm2013-03-224-12/+8
| | | | with libarchive 3.0 counterparts
* find: Include nanoseconds when comparing timestamps of files.jilles2013-03-172-20/+29
| | | | | | | | | | | | | | | When comparing to the timestamp of a given file using -newer, -Xnewer and -newerXY (where X and Y are one of m, c, a, B), include nanoseconds in the comparison. The primaries that compare a timestamp of a file to a given value (-Xmin, -Xtime, -newerXt) continue to compare times in whole seconds. Note that the default value 0 of vfs.timestamp_precision almost always causes the nanoseconds part to be 0. However, touch -d can set a timestamp to the microsecond regardless of that sysctl. MFC after: 1 week
* Remove EOL whitespace accidentally introduced in r248393.joel2013-03-172-2/+2
|
* Move example to EXAMPLES.joel2013-03-171-7/+5
|
* Add a couple of examples.joel2013-03-162-2/+26
| | | | Obtained from: OpenBSD
* Fix version in the .Fx macro.pluknet2013-03-161-1/+1
| | | | Reported by: <deeptech71@gmail.com>
* Replace our (un)vis(1) commands with implementations from NetBSD tobrooks2013-03-158-608/+6
| | | | | | | | | | match our import of the (un)vis(3) APIs. This adds support for multibyte encoding and the -h and -m flags which support HTTP and MIME encoding respectively. PR: bin/175418 Obtained from: NetBSD
* No need to call an external program.obrien2013-03-131-2/+1
|
* Revert r246917, as it is causing incorrect behaviour as reported onmarkj2013-03-121-1/+1
| | | | | | | freebsd-current. PR: bin/175213 Approved by: emaste (co-mentor)
* Fix the 'C' field for a running thread to match the behavior describedjhb2013-03-111-2/+9
| | | | | | | | | in the manpage by having it display the current CPU (ki_oncpu) rather than the previously used CPU (ki_lastcpu). ki_lastcpu is still used for all other thread states. Reported by: Chris Ross <cross+freebsd@distal.com> MFC after: 1 week
* Fix spelling.glebius2013-03-111-2/+2
| | | | | PR: 176777 Submitted by: Andrey Simonenko <simon comsys.ntu-kpi.kiev.ua>
* Add forgotten .Elmelifaro2013-03-091-0/+1
| | | | MFC with: r248112
* Document netstat -Q flags meaning.melifaro2013-03-091-1/+6
| | | | MFC after: 1 week
* Garbage collect NWFS and NCP bits which are now completely disconnectedattilio2013-03-097-1105/+0
| | | | | | from the tree since few months. This patch is not targeted for MFC.
* Add arm bits to truss.cognet2013-03-074-1/+376
|
* Make c99(1) invoke /usr/bin/cc with argv[0] set to "/usr/bin/cc" insteaddim2013-03-071-1/+1
| | | | | | | of just "cc", since there is no reason to cause additional path searches in this case. MFC after: 3 days
* Make c89(1) invoke /usr/bin/cc with argv[0] also set to /usr/bin/cc,dim2013-03-071-1/+1
| | | | | | | | similar to what c99(1) does, to prevent "c89: illegal option -- 1" messages, when clang is /usr/bin/cc. Reported by: tijl MFC after: 3 days
* Fix typo ('1' != 'l')eadler2013-03-041-1/+1
| | | | | | PR: bin/175975 Submitted by: William Ahern <william@25thandclement.com> Approved by: cperciva (mentor)
* Due to calendar(1)'s abuse of the C preprocessor "unix" gets expanded toeadler2013-03-041-0/+1
| | | | | | | | "1". 'Fix' this. PR: bin/175790 Submitted by: ak Approved by: cperciva (mentor)
* Add an option for finding sparse files.dwmalone2013-03-034-1/+31
| | | | | Reviewed by: iedowse MFC after: 3 weeks
* - Implement two new system calls:pjd2013-03-021-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | int bindat(int fd, int s, const struct sockaddr *addr, socklen_t addrlen); int connectat(int fd, int s, const struct sockaddr *name, socklen_t namelen); which allow to bind and connect respectively to a UNIX domain socket with a path relative to the directory associated with the given file descriptor 'fd'. - Add manual pages for the new syscalls. - Make the new syscalls available for processes in capability mode sandbox. - Add capability rights CAP_BINDAT and CAP_CONNECTAT that has to be present on the directory descriptor for the syscalls to work. - Update audit(4) to support those two new syscalls and to handle path in sockaddr_un structure relative to the given directory descriptor. - Update procstat(1) to recognize the new capability rights. - Document the new capability rights in cap_rights_limit(2). Sponsored by: The FreeBSD Foundation Discussed with: rwatson, jilles, kib, des
* Merge Capsicum overhaul:pjd2013-03-023-17/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Capability is no longer separate descriptor type. Now every descriptor has set of its own capability rights. - The cap_new(2) system call is left, but it is no longer documented and should not be used in new code. - The new syscall cap_rights_limit(2) should be used instead of cap_new(2), which limits capability rights of the given descriptor without creating a new one. - The cap_getrights(2) syscall is renamed to cap_rights_get(2). - If CAP_IOCTL capability right is present we can further reduce allowed ioctls list with the new cap_ioctls_limit(2) syscall. List of allowed ioctls can be retrived with cap_ioctls_get(2) syscall. - If CAP_FCNTL capability right is present we can further reduce fcntls that can be used with the new cap_fcntls_limit(2) syscall and retrive them with cap_fcntls_get(2). - To support ioctl and fcntl white-listing the filedesc structure was heavly modified. - The audit subsystem, kdump and procstat tools were updated to recognize new syscalls. - Capability rights were revised and eventhough I tried hard to provide backward API and ABI compatibility there are some incompatible changes that are described in detail below: CAP_CREATE old behaviour: - Allow for openat(2)+O_CREAT. - Allow for linkat(2). - Allow for symlinkat(2). CAP_CREATE new behaviour: - Allow for openat(2)+O_CREAT. Added CAP_LINKAT: - Allow for linkat(2). ABI: Reuses CAP_RMDIR bit. - Allow to be target for renameat(2). Added CAP_SYMLINKAT: - Allow for symlinkat(2). Removed CAP_DELETE. Old behaviour: - Allow for unlinkat(2) when removing non-directory object. - Allow to be source for renameat(2). Removed CAP_RMDIR. Old behaviour: - Allow for unlinkat(2) when removing directory. Added CAP_RENAMEAT: - Required for source directory for the renameat(2) syscall. Added CAP_UNLINKAT (effectively it replaces CAP_DELETE and CAP_RMDIR): - Allow for unlinkat(2) on any object. - Required if target of renameat(2) exists and will be removed by this call. Removed CAP_MAPEXEC. CAP_MMAP old behaviour: - Allow for mmap(2) with any combination of PROT_NONE, PROT_READ and PROT_WRITE. CAP_MMAP new behaviour: - Allow for mmap(2)+PROT_NONE. Added CAP_MMAP_R: - Allow for mmap(PROT_READ). Added CAP_MMAP_W: - Allow for mmap(PROT_WRITE). Added CAP_MMAP_X: - Allow for mmap(PROT_EXEC). Added CAP_MMAP_RW: - Allow for mmap(PROT_READ | PROT_WRITE). Added CAP_MMAP_RX: - Allow for mmap(PROT_READ | PROT_EXEC). Added CAP_MMAP_WX: - Allow for mmap(PROT_WRITE | PROT_EXEC). Added CAP_MMAP_RWX: - Allow for mmap(PROT_READ | PROT_WRITE | PROT_EXEC). Renamed CAP_MKDIR to CAP_MKDIRAT. Renamed CAP_MKFIFO to CAP_MKFIFOAT. Renamed CAP_MKNODE to CAP_MKNODEAT. CAP_READ old behaviour: - Allow pread(2). - Disallow read(2), readv(2) (if there is no CAP_SEEK). CAP_READ new behaviour: - Allow read(2), readv(2). - Disallow pread(2) (CAP_SEEK was also required). CAP_WRITE old behaviour: - Allow pwrite(2). - Disallow write(2), writev(2) (if there is no CAP_SEEK). CAP_WRITE new behaviour: - Allow write(2), writev(2). - Disallow pwrite(2) (CAP_SEEK was also required). Added convinient defines: #define CAP_PREAD (CAP_SEEK | CAP_READ) #define CAP_PWRITE (CAP_SEEK | CAP_WRITE) #define CAP_MMAP_R (CAP_MMAP | CAP_SEEK | CAP_READ) #define CAP_MMAP_W (CAP_MMAP | CAP_SEEK | CAP_WRITE) #define CAP_MMAP_X (CAP_MMAP | CAP_SEEK | 0x0000000000000008ULL) #define CAP_MMAP_RW (CAP_MMAP_R | CAP_MMAP_W) #define CAP_MMAP_RX (CAP_MMAP_R | CAP_MMAP_X) #define CAP_MMAP_WX (CAP_MMAP_W | CAP_MMAP_X) #define CAP_MMAP_RWX (CAP_MMAP_R | CAP_MMAP_W | CAP_MMAP_X) #define CAP_RECV CAP_READ #define CAP_SEND CAP_WRITE #define CAP_SOCK_CLIENT \ (CAP_CONNECT | CAP_GETPEERNAME | CAP_GETSOCKNAME | CAP_GETSOCKOPT | \ CAP_PEELOFF | CAP_RECV | CAP_SEND | CAP_SETSOCKOPT | CAP_SHUTDOWN) #define CAP_SOCK_SERVER \ (CAP_ACCEPT | CAP_BIND | CAP_GETPEERNAME | CAP_GETSOCKNAME | \ CAP_GETSOCKOPT | CAP_LISTEN | CAP_PEELOFF | CAP_RECV | CAP_SEND | \ CAP_SETSOCKOPT | CAP_SHUTDOWN) Added defines for backward API compatibility: #define CAP_MAPEXEC CAP_MMAP_X #define CAP_DELETE CAP_UNLINKAT #define CAP_MKDIR CAP_MKDIRAT #define CAP_RMDIR CAP_UNLINKAT #define CAP_MKFIFO CAP_MKFIFOAT #define CAP_MKNOD CAP_MKNODAT #define CAP_SOCK_ALL (CAP_SOCK_CLIENT | CAP_SOCK_SERVER) Sponsored by: The FreeBSD Foundation Reviewed by: Christoph Mallon <christoph.mallon@gmx.de> Many aspects discussed with: rwatson, benl, jonathan ABI compatibility discussed with: kib
* Properly handle '-h' argument.gjb2013-02-281-1/+1
| | | | | | PR: 176332 Reviewed by: scottl MFC after: 3 days
* Revert r247300 for now. I'll post a new changeset for review.delphij2013-02-263-11/+11
|
* Expose timespec and timeval macros when __BSD_VISIBLE is defined. Thisdelphij2013-02-263-11/+11
| | | | | | | | | | | allows userland application to use the following macros: timespecclear, timespecisset, timespeccmp, timespecadd, timespecsub; timevalclear, timevalisset, timevalcmp. MFC after: 1 month
* Remove EOL whitespace.joel2013-02-251-6/+6
|
* Fix several new & old style issues.melifaro2013-02-203-14/+12
| | | | | Pointed by: ae, pluknet, zont MFC with: r247036
* Add interface name filtering via 'match' cmd.melifaro2013-02-203-25/+162
| | | | | | | Add 'pps' cmd for switching beetween interface packets/bytes statistics. Submitted by: vsevolod MFC after: 2 weeks
* dtc: fix bootstrapping from 8.2-STABLEuqs2013-02-191-0/+4
| | | | | MFC after: 1 week Approved by: theraven
* WARNS=6 compliancecharnier2013-02-191-1/+3
|
* WARNS=6 compliancecharnier2013-02-196-11/+10
|
* Remove old-style function definitioncharnier2013-02-191-1/+1
|
* Strengthen the check in IS_OUT_OF_BOUNDS to ensure that (j - 1) is amarkj2013-02-171-1/+1
| | | | | | | | | valid index into the input buffer. PR: bin/175213 Reviewed by: gabor Approved by: emaste (co-mentor) MFC after: 1 week
* Since clang 3.2 now has an option to suppress warnings about implicitlydim2013-02-161-5/+0
| | | | | | | promoted K&R parameters, remove the workarounds added for sendmail components in r228558. MFC after: 1 week
* Fix undefined behaviour in usr.bin/mail/util.c.dim2013-02-151-2/+2
| | | | | Reported by: deeptech71@gmail.com MFC after: 3 days
* Fix date.joel2013-02-141-1/+1
|
OpenPOWER on IntegriCloud