summaryrefslogtreecommitdiffstats
path: root/usr.bin
Commit message (Collapse)AuthorAgeFilesLines
* MFC r256557: add uname flags to access userland's __FreeBSD_version morepeter2013-11-202-6/+65
| | | | | | conveniently than the traditional way of scripts parsing #include files. Approved by: re (hrs)
* MFC r258148,r258149,r258150,r258152,r258153,r258154,r258181,r258182:pjd2013-11-181-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r258148: Add a note that this file is compiled as part of the kernel and libc. Requested by: kib r258149: Change cap_rights_merge(3) and cap_rights_remove(3) to return pointer to the destination cap_rights_t structure. This already matches manual page. r258150: Sync return value with actual implementation. r258151: Style. r258152: Precisely document capability rights here too (they are already documented in rights(4)). r258153: The CAP_LINKAT, CAP_MKDIRAT, CAP_MKFIFOAT, CAP_MKNODAT, CAP_RENAMEAT, CAP_SYMLINKAT and CAP_UNLINKAT capability rights make no sense without the CAP_LOOKUP right, so include this rights. r258154: - Move CAP_EXTATTR_* and CAP_ACL_* rights to index 1 to have more room in index 0 for the future. - Move CAP_BINDAT and CAP_CONNECTAT rights to index 0 so we can include CAP_LOOKUP right in them. - Shuffle the bits around so there are no gaps. This is last chance to do that as all moved rights are not used yet. r258181: Replace CAP_POLL_EVENT and CAP_POST_EVENT capability rights (which I had a very hard time to fully understand) with much more intuitive rights: CAP_EVENT - when set on descriptor, the descriptor can be monitored with syscalls like select(2), poll(2), kevent(2). CAP_KQUEUE_EVENT - When set on a kqueue descriptor, the kevent(2) syscall can be called on this kqueue to with the eventlist argument set to non-NULL value; in other words the given kqueue descriptor can be used to monitor other descriptors. CAP_KQUEUE_CHANGE - When set on a kqueue descriptor, the kevent(2) syscall can be called on this kqueue to with the changelist argument set to non-NULL value; in other words it allows to modify events monitored with the given kqueue descriptor. Add alias CAP_KQUEUE, which allows for both CAP_KQUEUE_EVENT and CAP_KQUEUE_CHANGE. Add backward compatibility define CAP_POLL_EVENT which is equal to CAP_EVENT. r258182: Correct right names. Sponsored by: The FreeBSD Foundation Approved by: re (kib)
* MFC r257917:trasz2013-11-141-1/+1
| | | | | | | Fix typo in "iscsictl -v". Approved by: re (gjb) Sponsored by: The FreeBSD Foundation
* MFC r257234:markj2013-11-051-3/+1
| | | | | | With r247602, the "c" flag is no longer printed as a file descriptor flag. Approved by: re (gjb)
* MFC r257379:trasz2013-11-022-43/+43
| | | | | | | | | | | | | | | | | Rename '-h' option to '-p', and use "portal" instead of "host" or "address", in order to be consistent with iSCSI terminology. Besides, calling the option '-h' was just wrong. This changes usage for newly added iscsictl(8), and two newly added subcommands to ctladm(8). This breaks POLA between CURRENT and 10, but since 10.0 has not been released yet, it's still ok to do. MFC r257380: Bump .Dd after r257379. Approved by: re (glebius) Sponsored by: The FreeBSD Foundation
* MFC 256365rpaulo2013-10-126-187/+1
| | | | | | Remove most of the ATF tools and the _atf user. Approved by: re
* When displaying a struct stat, if the -r option was not specified,des2013-10-071-4/+9
| | | | | | | display the numeric rather than symbolic representation of st_mode. Approved by: re (glebius) MFC after: 1 week
* Disable use of compiler atomic builtins. For APR, this is limited tonwhitehorn2013-10-043-5/+3
| | | | | | | | architectures where they are known not to work. For SVN itself, use the least common denominator and disable them across the board. This allows svnlite to build and run on all FreeBSD architectures. Approved by: re (gjb)
* mdoc: remove EOL whitespace.joel2013-10-041-1/+1
| | | | Approved by: re (blanket)
* Odds and ends left over from BIND and unnoticed because they didn'tdes2013-10-011-28/+0
| | | | | | affect 'make universe'. Approved by: re (gjb)
* Update the Dutch calendar entries:rene2013-09-301-11/+11
| | | | | | | | | | - prince Johan Friso passed away in 2013 - correct status of queen Maxima and crown princess Catharina-Amalia - language fixes Approved by: remko (mentor) Approved by: re (gjb) MFC after: 3 days
* Remove BIND.des2013-09-304-89/+0
| | | | Approved by: re (gjb)
* Improve bsdpatch usability:delphij2013-09-262-5/+8
| | | | | | | | | | - Ask only once for "Apply anyway". [1] - Tell user what file have failed patch rather than just how many hunks failed. Reported by: jmg via pfg [1] Tested by: pfg [1] Approved by: re (gjb)
* - Add myself as port commiter and my mentors relationship.danilo2013-09-241-0/+1
| | | | | | - Add myself to calendar.freebsd. Approved by: re (gjb), wg (mentor)
* Build and install drill(1).des2013-09-222-0/+20
| | | | Approved by: re (blanket)
* Correct stale comments.jhb2013-09-201-3/+1
| | | | Approved by: re (joel)
* Add LLDB bmake infrastructureemaste2013-09-202-1/+142
| | | | | | | | | | | This connects LLDB to the build, but it is disabled by default. Add WITH_LLDB= to src.conf to build it. Note that LLDB requires a C++11 compiler so is disabled on platforms using GCC. Approved by: re (gjb) Sponsored by: DARPA, AFRL
* - calendar uses cpp internally, this diff removes this usage anddb2013-09-196-65/+279
| | | | | | | substitutes a limited subset cpp processor internally. PR: src/178463 Approved by: re (gjb)
* Minor mdoc improvements.joel2013-09-191-1/+3
| | | | Approved by: re (blanket)
* Extend the support for exempting processes from being killed when swap isjhb2013-09-198-1/+243
| | | | | | | | | | | | | | | | | | | | | | exhausted. - Add a new protect(1) command that can be used to set or revoke protection from arbitrary processes. Similar to ktrace it can apply a change to all existing descendants of a process as well as future descendants. - Add a new procctl(2) system call that provides a generic interface for control operations on processes (as opposed to the debugger-specific operations provided by ptrace(2)). procctl(2) uses a combination of idtype_t and an id to identify the set of processes on which to operate similar to wait6(). - Add a PROC_SPROTECT control operation to manage the protection status of a set of processes. MADV_PROTECT still works for backwards compatability. - Add a p_flag2 to struct proc (and a corresponding ki_flag2 to kinfo_proc) the first bit of which is used to track if P_PROTECT should be inherited by new child processes. Reviewed by: kib, jilles (earlier version) Approved by: re (delphij) MFC after: 1 month
* cap_new(2) and cap_getrights2) were replaced with cap_rights_limit(2)bdrewery2013-09-191-3/+3
| | | | | | | | and cap_rights_get(2) in r247602 Reviewed by: pjd Approved by: gjb Approved by: re (rodrigc)
* Make svnlite (actually libapr) work correctly on big-endian arches.dim2013-09-191-0/+6
| | | | | | | | | | | | | | Otherwise, you would get errors similar to: $ svn co svn://svn.freebsd.org/base/head test A test/lib A test/lib/libutil svn: E200014: Checksum mismatch for '/home/dim/test/lib/libutil/kinfo_getproc.3': expected: 0882097a545210d88edff8f63b328602 actual: b378eb08a0f4d4c97c513c4b17207f59 Approved by: re (gjb, marius)
* Make iscsictl(8) automatically try to load the iscsi module. While here,trasz2013-09-181-1/+11
| | | | | | improve module loading in iscsid(8) and ctld(8). Approved by: re (delphij)
* Minor mdoc fixes.joel2013-09-141-3/+3
| | | | Approved by: re (blanket)
* Bring in the new iSCSI target and initiator.trasz2013-09-148-0/+1633
| | | | | | Reviewed by: ken (parts) Approved by: re (delphij) Sponsored by: FreeBSD Foundation
* - Decode the idtype argument passed to wait6() in kdump and truss.jhb2013-09-124-14/+154
| | | | | | | | | | - Don't treat an options argument of 0 to wait4() as an error in kdump. - Decode the wait options passed to wait4() and wait6() in truss and decode the returned rusage and exit status. Approved by: re (kib) MFC after: 1 week
* Stick to traditional DEFAULT_SYS_PATH (/usr/share/mk)sjg2013-09-101-0/+1
| | | | | Reviewed by: obrien Approved by: re
* Add a mmap flag (MAP_32BIT) on 64-bit platforms to request that a mapping usejhb2013-09-092-1/+9
| | | | | | | | | | | | | an address in the first 2GB of the process's address space. This flag should have the same semantics as the same flag on Linux. To facilitate this, add a new parameter to vm_map_find() that specifies an optional maximum virtual address. While here, fix several callers of vm_map_find() to use a VMFS_* constant for the findspace argument instead of TRUE and FALSE. Reviewed by: alc Approved by: re (kib)
* Hook host(1) up to the build in the LDNS case.des2013-09-081-0/+4
| | | | Approved by: re (blanket)
* Import Magerya Vitaly's ldns-host, and build it instead of the BIND versiondes2013-09-081-0/+26
| | | | | | in the WITH_LDNS_UTILS case. Approved by: re (blanket)
* Merge bmake-20130904sjg2013-09-052-4/+5
|
* Fix file selection logic for the RCS/SCCS case, as was done for the simplese2013-09-052-34/+27
| | | | | | | file case before. Bump version because of the changed behavior, which now matches the documentation. Reviewed by: pfg
* Change the cap_rights_t type from uint64_t to a structure that we can extendpjd2013-09-055-61/+72
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | in the future in a backward compatible (API and ABI) way. The cap_rights_t represents capability rights. We used to use one bit to represent one right, but we are running out of spare bits. Currently the new structure provides place for 114 rights (so 50 more than the previous cap_rights_t), but it is possible to grow the structure to hold at least 285 rights, although we can make it even larger if 285 rights won't be enough. The structure definition looks like this: struct cap_rights { uint64_t cr_rights[CAP_RIGHTS_VERSION + 2]; }; The initial CAP_RIGHTS_VERSION is 0. The top two bits in the first element of the cr_rights[] array contain total number of elements in the array - 2. This means if those two bits are equal to 0, we have 2 array elements. The top two bits in all remaining array elements should be 0. The next five bits in all array elements contain array index. Only one bit is used and bit position in this five-bits range defines array index. This means there can be at most five array elements in the future. To define new right the CAPRIGHT() macro must be used. The macro takes two arguments - an array index and a bit to set, eg. #define CAP_PDKILL CAPRIGHT(1, 0x0000000000000800ULL) We still support aliases that combine few rights, but the rights have to belong to the same array element, eg: #define CAP_LOOKUP CAPRIGHT(0, 0x0000000000000400ULL) #define CAP_FCHMOD CAPRIGHT(0, 0x0000000000002000ULL) #define CAP_FCHMODAT (CAP_FCHMOD | CAP_LOOKUP) There is new API to manage the new cap_rights_t structure: cap_rights_t *cap_rights_init(cap_rights_t *rights, ...); void cap_rights_set(cap_rights_t *rights, ...); void cap_rights_clear(cap_rights_t *rights, ...); bool cap_rights_is_set(const cap_rights_t *rights, ...); bool cap_rights_is_valid(const cap_rights_t *rights); void cap_rights_merge(cap_rights_t *dst, const cap_rights_t *src); void cap_rights_remove(cap_rights_t *dst, const cap_rights_t *src); bool cap_rights_contains(const cap_rights_t *big, const cap_rights_t *little); Capability rights to the cap_rights_init(), cap_rights_set(), cap_rights_clear() and cap_rights_is_set() functions are provided by separating them with commas, eg: cap_rights_t rights; cap_rights_init(&rights, CAP_READ, CAP_WRITE, CAP_FSTAT); There is no need to terminate the list of rights, as those functions are actually macros that take care of the termination, eg: #define cap_rights_set(rights, ...) \ __cap_rights_set((rights), __VA_ARGS__, 0ULL) void __cap_rights_set(cap_rights_t *rights, ...); Thanks to using one bit as an array index we can assert in those functions that there are no two rights belonging to different array elements provided together. For example this is illegal and will be detected, because CAP_LOOKUP belongs to element 0 and CAP_PDKILL to element 1: cap_rights_init(&rights, CAP_LOOKUP | CAP_PDKILL); Providing several rights that belongs to the same array's element this way is correct, but is not advised. It should only be used for aliases definition. This commit also breaks compatibility with some existing Capsicum system calls, but I see no other way to do that. This should be fine as Capsicum is still experimental and this change is not going to 9.x. Sponsored by: The FreeBSD Foundation
* Reduce WARNS to 0 for dig, host, and nslookup to make themerwin2013-08-303-3/+3
| | | | | | | | | compile with the optional WITH_BIND_SIGCHASE. Submitted by: Andre Albsmeier <Andre.Albsmeier@siemens.com> Approved by: delphij (mentor, implicit) MFC after: 3 days Sponsored by: DK Hostmaster A/S
* Drop build option switch for the older GNU patch.pfg2013-08-291-10/+0
| | | | | | | | As promised, drop the option to make the older GNU patch the default. GNU patch is still being built but something drastic may happen to it to it before Release.
* fix up my copyright and remove third clause..jmg2013-08-261-5/+1
|
* kdump: Decode SOCK_CLOEXEC and SOCK_NONBLOCK in socket() and socketpair().jilles2013-08-262-2/+15
|
* Remove EOL whitespace.joel2013-08-221-2/+2
|
* Update Bind to 9.9.3-P2erwin2013-08-222-6/+6
| | | | | | | | | | | | | | | | | | | | | | | Notable new features: * Elliptic Curve Digital Signature Algorithm keys and signatures in DNSSEC are now supported per RFC 6605. [RT #21918] * Introduces a new tool "dnssec-verify" that validates a signed zone, checking for the correctness of signatures and NSEC/NSEC3 chains. [RT #23673] * BIND now recognizes the TLSA resource record type, created to support IETF DANE (DNS-based Authentication of Named Entities) [RT #28989] * The new "inline-signing" option, in combination with the "auto-dnssec" option that was introduced in BIND 9.7, allows named to sign zones completely transparently. Approved by: delphij (mentor) MFC after: 3 days Sponsored by: DK Hostmaster A/S
* Subversion requires atomic functions we only support on arm with clang.andrew2013-08-191-1/+3
|
* Remove incorrect 'const' qualifier from pointers to dynamic stringjhb2013-08-191-1/+1
| | | | | | | buffers I added in the previous commit. Pointy hat to: jhb MFC after: 1 month
* Add support for parameterised device tree sources to the device tree compiler.theraven2013-08-194-18/+145
| | | | | Reviewed by: brooks Sponsored by: DARPA, AFRL
* Make the "FD" column one character wider, so that "trace" can also alignpjd2013-08-181-6/+6
| | | | properly.
* - Use getnameinfo(3) instead of gethostbyaddr(3) or inet_ntop(3).hrs2013-08-171-18/+25
| | | | | - Fill sin6_scope_id from in6p.sin6_addr.s6_addr[2]. struct inpcb has struct in6_addr for the endpoint addresses, so sin6_scope_id must be filled.
* Add new mmap(2) flags to permit applications to request specific virtualjhb2013-08-162-4/+69
| | | | | | | | | | | | | | | | | | | | | | | | | address alignment of mappings. - MAP_ALIGNED(n) requests a mapping aligned on a boundary of (1 << n). Requests for n >= number of bits in a pointer or less than the size of a page fail with EINVAL. This matches the API provided by NetBSD. - MAP_ALIGNED_SUPER is a special case of MAP_ALIGNED. It can be used to optimize the chances of using large pages. By default it will align the mapping on a large page boundary (the system is free to choose any large page size to align to that seems best for the mapping request). However, if the object being mapped is already using large pages, then it will align the virtual mapping to match the existing large pages in the object instead. - Internally, VMFS_ALIGNED_SPACE is now renamed to VMFS_SUPER_SPACE, and VMFS_ALIGNED_SPACE(n) is repurposed for specifying a specific alignment. MAP_ALIGNED(n) maps to using VMFS_ALIGNED_SPACE(n), while MAP_ALIGNED_SUPER maps to VMFS_SUPER_SPACE. - mmap() of a device object now uses VMFS_OPTIMAL_SPACE rather than explicitly using VMFS_SUPER_SPACE. All device objects are forced to use a specific color on creation, so VMFS_OPTIMAL_SPACE is effectively equivalent. Reviewed by: alc MFC after: 1 month
* Provide UTF-8 version of russian calendars.glebius2013-08-167-1/+253
|
* Make carets line up in dtc diagnostics if the line starts with a tab.theraven2013-08-141-1/+2
|
* Belatedly add my birthday and fix a typo.uqs2013-08-141-1/+2
|
* kdump: Decode AT_FDCWD in first argument of bindat() and connectat().jilles2013-08-131-0/+2
|
* kdump: Improve decoding of various *at calls:jilles2013-08-132-0/+47
| | | | | * Write AT_FDCWD where appropriate. * Decode the remaining arguments of openat() etc like open() etc.
OpenPOWER on IntegriCloud