summaryrefslogtreecommitdiff
path: root/sbin
AgeCommit message (Collapse)Author
2015-02-26%% not % in error message; ok millert@ henning@Stuart Henderson
2015-02-15Use "In" to mark up include files, instead of wrongly wrapping with Aq.Anthony J. Bentley
Aq is not the same as <> in non-ASCII situations, so this caused incorrect output in some places. And it provided no semantics besides. ok schwarze@
2015-02-15convert bcmp to memcmpTed Unangst
ok doug millert miod
2015-02-15These functions turned up in my grep for bcmp. There are already perfectlyTed Unangst
good cmp functions written for qsort, but then different versions were written which (ab)use the fact that bsearch doesn't strictly require the key type to be the same as the element type. Nevertheless, I think it's clearer and cleaner to create a complete key struct and search with that. As a bonus, we don't need two different compare functions just to compare with two different encoding values. ok millert
2015-02-14Rather than using 0xff as a placeholder for "don't check prio", use 0xff toStuart Henderson
mean "prio is 0". This avoids the need for code changes in programs which add pf rules (as was done in pfctl but not other programs) to handle the new "check prio" functionality. Specifically this unbreaks ftp-proxy. Use of #define rather than magic 0xff suggested by benno. ok benno "if henning doesnt like it he can change it when he recovers from jet-lag"
2015-02-13Direct people to netstat for the new multicast routing sysctls.Philip Guenther
problem noted by dcoppa@ ok claudio@
2015-02-10since we inherit prio (as in, the queuing priority) from outside sources,Henning Brauer
i. e. on vlan interfaces, it is useful to be able to match on it - effectively matching on classification done elsewhere. i thought i had long implemented that, but chrisz@ asking for it made me notice that wasn't the case. tests by chrisz, ok phessler pelikan
2015-02-10Groundwork for better route support over multiple interfaces byKenneth R Westerback
using RTM_IFA to bind routes to an interface. Keep the subnet route conflict avoidance code for the time being. diff from claudio@ as part of larger routing magic diff. ok claudio@ mpi@
2015-02-10If 'write' is issued after a 'reinit' command, and the MBR to beKenneth R Westerback
written does not contain an EFI partition, zap any GPT signature found on the 2nd (LBA 1) and last sectors on the disk. The install script uses this sequence. This is a temporary workaround until more GPT support is imported post-5.7. Should fix at least some machines who insist on using the GPT even after we have overritten the 'protective' MBR. ok deraadt@ tedu@ beck@ millert@
2015-02-09provide a net.inet6.ip6.ifq sysctl so people can see and fiddleDavid Gwynne
with the ip6intrq. ok claudio@
2015-02-09Rename 'm_flag' to 'e_flag' since it's '-e' that sets it. RenameKenneth R Westerback
'User_modify' to 'USER_edit' for the same reason.
2015-02-08Use AI_ADDRCONFIG when resolv hosts on startup.Reyk Floeter
OK henning@
2015-02-08Get rid of a bunch of memset()'s where struct variables and arraysKenneth R Westerback
are clearly properly initialized in the same area. Prompted by the recent shrinkage of most imsg structs.
2015-02-07parse debug levels with strtonum, so that debug 1banana doesn't parse.Ted Unangst
ok mikeb
2015-02-07Add support for interface-mtu (option 26).Kenneth R Westerback
Original request+diff from matthew@ ok dlg@
2015-02-07When getopt processing flags, many should be flag=1 instead of flag++Theo de Raadt
ok tedu miod
2015-02-07GC unused parameters now that ifname and rdomain are not used inKenneth R Westerback
constructing imsgs. ok reyk@
2015-02-06Better size_t overflow check for mount_mfs. OK miod@Todd C. Miller
2015-02-06convert atoi to strtonumTed Unangst
2015-02-06unneeded getopt.hTheo de Raadt
2015-02-06The write_file() privsep interface was too permissive andReyk Floeter
theoretically allowed the unprivileged child process to write to arbitrary files. Restrict it by replacing it with two specific write_resolv_conf() and write_option_db() privsep interfaces where all the critical decision has been moved to the parent. OK krw@
2015-02-06matthew@ points out that it's a bad idea to rely on the non-privileged,Kenneth R Westerback
network-facing process to properly fill out the interface name and rdomain on which operations are to be performed. Instead, always use the interface name and rdomain discovered before forking and dropping privs. Lets all the imsg structs to drop a couple of members. ok matthew@ henning@
2015-02-06Don't let errors leak the memory returned by getifaddrs().Kenneth R Westerback
2015-02-06Remove route/netstat -f encap in favor of ipsecctl -s flow.Reyk Floeter
OK deraadt@
2015-02-05Use sizeof(struct X) rather than sizeof(*p) in calloc() invocations.Kenneth R Westerback
History indicates this is slightly less error prone. Inconsistant usage pointed out by Benjamin Baier.
2015-02-05implement "ifconfig <if> -inet", removing all inet addressesHenning Brauer
for symmetry with -inet6 mostly. ok phessler theo
2015-02-02replace the wireless scan example with one showing how to select monitorJason McIntyre
mode: the wireless pages already carry the scan example, and this one seems a fair substitute; the diff is from bradain foley, tweaked according to some suggestions from stsp;
2015-02-01free(NULL) works, so stop checking for non-zero length allocationKenneth R Westerback
or non-NULLness before calling free(). This batch from Benjamin Baier.
2015-01-31free(NULL) works, so stop checking for non-zero length allocationKenneth R Westerback
or non-NULLness before calling free().
2015-01-31Don't leak the "access protected, zero sized object" returned byKenneth R Westerback
calloc(N, 0). Avoid the whole controversy by skipping zero length options while cloning a lease. Leak reported by Remco van den Berg via bugs@. Additional testing and diagnostic help from Benjamin Baier. Thanks!
2015-01-31Set is_static to 0 before trying to free a lease. Otherwise itKenneth R Westerback
might leak. *Should* not be possible but better safe than sorry.
2015-01-31Always free(buf) if errmsg is set while trying to flush routes.Kenneth R Westerback
2015-01-30Don't leak incompletely cloned static lease. Should never happenKenneth R Westerback
but better safe than sorry. Noted and diff from Benjamin Baier. Thanks!
2015-01-30Tweak error message to say 'realloc' since that's what's failing,Kenneth R Westerback
not 'malloc'.
2015-01-21Include <netinet/in.h> before <net/pfvar.h>. In a future change whenTheo de Raadt
ports is ready, <net/pfvar.h> will stop including a pile of balony.
2015-01-21Build the argument list for halt/reboot without excessive use ofChristian Weisgerber
the conditional operator. Adapted from NetBSD. ok miod@
2015-01-21Use plain "-p" to specify "halt and power down", for consistencyChristian Weisgerber
and compatibility with other BSDs. Adapted from FreeBSD. Still permit the combination "-hp" as requested by many. ok sthen@
2015-01-20Adjust <sys/param.h> comments regarding use of use of MAXFRAG, orTheo de Raadt
delete <sys/param.h> if now possible ok guenther
2015-01-20Rewrite to void using union sockaddr_unionTheo de Raadt
ok mikeb
2015-01-19DEFAULT_PRIORITY and DEFAULT_QLIMIT no longer usedTheo de Raadt
2015-01-19remove #ifndef #define blocks trying to handle lack of BUFSIZTheo de Raadt
ok millert
2015-01-19Remove unnecessary <netinet/ip_ipsp.h> includesMike Belopuhov
2015-01-18do not require <a.out.h>Theo de Raadt
2015-01-16Constify the driver name to disk type table, and remove rz and ccd from thatMiod Vallat
list. ok krw@ millert@
2015-01-16Arguments are just ".Ar", not ".Brq Ar" or even ".Ns { Ns Ar ... Ns }".Ingo Schwarze
The .Ar macro already causes distinctive formatting in a standard way, so there is no need for additional braces. This also fixes the only mandoc warning in src/sbin.
2015-01-16Tweak previous: Do not put punctuation on its own line, put it at the endIngo Schwarze
of the preceding macro line; no output change with mandoc, fixes output with groff. Also, if you want spacing back after .Sm off, do not add an argument containing a blank character, simply rely on .Sm on.
2015-01-16Clean up macros in isakmpd(8).Anthony J. Bentley
- Fix mandoc warnings ("WARNING: skipping empty macro: No") - Mark up arguments with Ar, not Aq Ic - Mark up pathnames with Pa ok jmc@
2015-01-16Replace <sys/param.h> with <limits.h> and other less dirty headers whereTheo de Raadt
possible. Annotate <sys/param.h> lines with their current reasons. Switch to PATH_MAX, NGROUPS_MAX, HOST_NAME_MAX+1, LOGIN_NAME_MAX, etc. Change MIN() and MAX() to local definitions of MINIMUM() and MAXIMUM() where sensible to avoid pulling in the pollution. These are the files confirmed through binary verification. ok guenther, millert, doug (helped with the verification protocol)
2015-01-15tell the truth about DES.Igor Sobrado
joint work with djm@ and jsing@ ok djm@
2015-01-15I bet the reference to <sys/ttycom.h> near the ldisc list in tty(4)Theo de Raadt
led this program and the associated manual pages to including that file directly, rather than the canonical include path of <sys/ioctl.h> discussed with millert