summaryrefslogtreecommitdiff
path: root/sbin
AgeCommit message (Collapse)Author
2014-03-14Revert last -- broke building snaps.Kenneth R Westerback
2014-03-13Remove some lint -- ARGSUSED.Kenneth R Westerback
Inspired by guenther@.
2014-03-13Merge 'struct DISK_metrics' and 'struct disk' into one, since we don'tKenneth R Westerback
need to record two sets of metric/geometry data. Use 'geometry' instead of 'metrics' in names and comments. Eliminate DISK_getmetrics(). While here, make 64 the minimal valid value for '-l' instead of 1. This avoids the possibility of having 0 cylinders. No intentional functional change. Feedback & tweak from chris@
2014-03-13no more spray(8);Jason McIntyre
2014-03-12don't leak an ibuf for each expired SA; ok mikeb@Markus Friedl
2014-03-12unbreak config-address w/o pool; ok mikeb@Markus Friedl
2014-03-11For CA generation, go back to using a two-step procedure to create a CSR andStuart Henderson
then self-sign it rather than using the "openssl req" shortcut. This allows us to specify -extfile and thus set the correct certificate extensions so that stricter SSL implementations will trust this as a CA cert, and matches how things are done in ssl(8). This is basically a partial revert of r1.77. Researched by chrisz@, tweak/ok jmc@ ok beck@
2014-03-10No need to pass the name of the command to the function that isKenneth R Westerback
implementing that command, a pointer to the command arguments is the only thing needed. No need to have a pointer to the command table in every command, since there is only one table. No need for shiney new stack space for every command name and arguments parsed, since we don't recurse we can just use static memory. No intentional functional change.
2014-03-09Instead of passing around 'char buf[DEV_BSIZE]' buffers, pass aroundKenneth R Westerback
'struct dos_mbr' variables, since that is what the buffers were used for. Removes need to know about DEV_BSIZE and thus include param.h from all files but one so move the param.h #include to that file (mbr.c). Nuke a bunch of local MBR #defines in favour of the disklabel.h ones. Remove a bunch of unneeded #includes, replace the odd malloc/bzero with calloc, replace equally odd bcopy's with memcpy, remove a stray duplicate MBR parsing in MBR_pcopy(). No intentional functional change.
2014-03-08It's silly to check at compile time for DEV_BSIZE == 512.Kenneth R Westerback
ok deraadt@ with gritted teeth on keeping <sys/param.h> for now.
2014-03-07Relieve the code of an overburden of unnecessary typedefKenneth R Westerback
abstraction. Call a 'struct' a 'struct' and not a pony. No functional change. idea ok deraadt@
2014-03-07If allocation of 'id' fails, don't try to deref it after 'goto fail'.Gerhard Roth
ok millert@
2014-03-06tweak previous;Jason McIntyre
2014-03-05fix a null test, from remco.Ted Unangst
and then modernize some other function pointer calls.
2014-03-02-l disksize code, to force LBA mode. code by chris, after I suggestedTheo de Raadt
wrapping rows of echo's via fdisk was silly. ok kettenis krw
2014-02-28Bring back the code removed in rev1.317 used to print anchors withMike Belopuhov
wildcard path ("ftp-proxy/*"), but make sure to call it after we're done with the ruleset for the current anchor. On one hand this repairs printing content of such anchors and on the other it allows to use a wildcard on the command line for anchors that were not initially specified with a wildcard. Makes pfctl regress happy again. OK henning, deraadt
2014-02-26Try to reduce the confusion about rdomain vs rtable. More is needed butClaudio Jeker
this is a start. With input from many.
2014-02-26Try to be more precise about rtable and rdomains.Claudio Jeker
2014-02-26Still a lie, the default is not 0. It is inherited from the process.Claudio Jeker
OK by many
2014-02-26don't policy_ref an activate policy (policy_ref/unref are assymetrical),Markus Friedl
otherwise the policy list might get corrupted; from haesbaert
2014-02-26short note that the filesystem is always mounted readonlyTed Unangst
2014-02-22Revert mountpoints tweaking. Needs much more serious surgery than timeKenneth R Westerback
permits before release, and is pointless without other following diffs to justify it that will not make release. Should fix segfault's during install reported by Rod Whitworth on tech@
2014-02-21support rekeying for IPCOMP; ok mikeb@Markus Friedl
2014-02-21Permit building without portmap/mountd rpc calls in the fallback nfs pathTheo de Raadt
ok guenther
2014-02-18check the error from ikev2_cp_setaddrMarkus Friedl
2014-02-18Do not create the default dhcp-client-identifier if an empty stringKenneth R Westerback
has been configured as the value. i.e. 'send dhcp-client-identifier "";' in dhclient.conf will result in no dhcp-client-identifier (option 61) being sent. Useful for testing dhcp server behaviour.
2014-02-17interpret 'config address net/prefix' as a pool of addresses andMarkus Friedl
randomly choose the address for CFG_REQUEST. this address will be used to replace 0.0.0.0/32 in the specified flow. e.g. > ikev2 passive esp from 192.168.1.0/24 to 0.0.0.0 \ > config address 192.168.10.200/24 will assign an address between 192.168.10.200 and 192.168.10.254 and replace 0.0.0.0 with this address. ok mikeb@ on older version of this diff.
2014-02-17basic OCSP support. enable with 'set ocsp "http://10.0.0.10:8888/"'Markus Friedl
ok mikeb@
2014-02-17Fix compiler warnings in the format strings: use %zd for ssize_t andReyk Floeter
%zu for size_t. From Andre de Oliveira With input and OK from blambert@ markus@
2014-02-17Remove a stray debug printf that crept in via one of the newqueueLawrence Teo
commits. ok henning@
2014-02-16Further tweak to mpfree(). Don't bother setting about-to-be-freedKenneth R Westerback
memory to NULL.
2014-02-15Don't risk dereferencing NULL pointer to mountpoints arrayKenneth R Westerback
when calling mpfree() with the array.
2014-02-15Stop leaking mount point strings in temporary copies of theKenneth R Westerback
mountpoints array.
2014-02-14Ooops. r1.169 was supposed to add 'total sectors' to the list ofKenneth R Westerback
fields that are ignored when reading an ascii disklabel. Actually remove the parsing of 'total sectors', which was just above the line trying to skip said parsing. Spotted when halex@ forced me to read this code again.
2014-02-14remove unused function that distracts from cleaning up the imsg_flush() messSebastian Benoit
ok krw, florian, henning
2014-02-14initial support for IPCompMarkus Friedl
still experimental and rekeying needs some work; ok mikeb@
2014-02-13mark up argument placeholders with .Ar; from Jan Stary <hans at stare dot cz>Ingo Schwarze
2014-02-13Hard looping on EAGAIN is bad. Just fall out to outer event loopKenneth R Westerback
when EAGAIN is encountered while trying to flush messages.
2014-02-12make sure to set the msg_responded flag on the original message; ok mikeb@Markus Friedl
2014-02-09Don't use imsg_flush(), roll a local flush_unpriv_ibuf() that loopsKenneth R Westerback
on EAGAIN, sets quit to INTERNALSIG on errors (unless quit is already set to something else), and prints a consistant error message when errors other than EPIPE and end of file are encountered. Fixes failure to write resolv.conf when -L is used, and makes add_address() and add_route() also wait until imsg is in pipe.
2014-02-09Nuke a couple of extraneous blank lines.Kenneth R Westerback
2014-02-09Use correct function name in error message. 'cleanup' was renamedKenneth R Westerback
'sendhup' a while ago.
2014-02-09Missing {} around multi-statement else. Malformed IMSG_HUP messages shouldKenneth R Westerback
not cause privileged process to exit.
2014-02-08Create dhclient lease files and dhcpd lease files with permissions 0640,Kenneth R Westerback
rather than 0000 and 0664 respectively. ok kettenis@ tedu@
2014-02-07Create -L leases files with the same 0000 permissions as regularKenneth R Westerback
leases.IF files. Inconsistency pointed out by Jiri B.
2014-02-07Log failures to fchmod() or fchown() the file written inKenneth R Westerback
priv_write_file().
2014-02-07Nuke unused #define CLIENT_PATH. A remnant of dhclient-script.Kenneth R Westerback
2014-02-05add a fstab example, with help from and ok jmc@Nick Holland
2014-02-05Always set the signature to DOSMBR_SIGNATURE when writing a MBR toKenneth R Westerback
disk. This means skipping the '(U)pdate' command after editing the MBR will still produce something disklabel(8) will respect in the morning. Problem noted by David Vasek. ok jsing@ toby@. Moral support halex@.
2014-01-25Correct parsing of dhclient.conf statements 'fixed-address' andKenneth R Westerback
'next-server'. Modify new lease being cloned with their values rather than overwriting original lease being cloned.