summaryrefslogtreecommitdiff
path: root/sbin
AgeCommit message (Collapse)Author
2014-06-03Handle the event parameter of libevent callback function as a bitYASUOKA Masahiko
mask. Also remove redundant imsg_event_add calls. Fixes come from usr.sbin/ospfd/control.c ok reyk
2014-05-31Oops. We're reporting DEV_BSIZE values in error messages, so callKenneth R Westerback
them 'blocks' not 'sectors'.
2014-05-31Cast daddr_t variable (blkno) to (long long) when printing with %lld.Kenneth R Westerback
2014-05-31add -S to usage();Jason McIntyre
2014-05-30Add option -S to have dump(8) only estimate backup size and number of tapesStephan A. Rickauer
required (from NetBSD). ok beck@, krw@ and sthen@
2014-05-30warnings warnings everywhereTed Unangst
2014-05-30WARNING: Encrypted vnd is insecure.Ted Unangst
Migrate your data to softraid before 5.7.
2014-05-29fsck should use the same values in checking as newfs does in creatingKenneth R Westerback
a filesystem. fs_nspf and its derivitives like fs_spc are DEV_BSIZE values, not actual hardware disk sector values. Adjust initializations accordingly. Tweak header and man page comments to make the DEV_BSIZE'ness more obvious for future spelunkers. No-op for DEV_BSIZE (a.k.a. 512-byte) sector devices but should help checking filesystems on, e.g., 4k-byte sector devices. ok jmc@ on the man page tweaks.
2014-05-27Where trying to pread() a single disk sector, the i/o must be for theKenneth R Westerback
actual disk sector size and not DEV_BSIZE. The sector size must be obtained via the disklabel. Larger i/o's must be multiple sectors, so when retrying with a smaller size shrink the attempt by one sector and not DEV_BSIZE. Of course if your d_secsize is DEV_BSIZE, this will all be a no-op. This does not make non-512-byte sectors work, but puts in place the logic to get and use the disklabel info. Which makes the next diffs bite sized and focused. ok guenther@
2014-05-24Nuke last of the illusionary 'dev_bsize' and 'dev_bshift' variables inKenneth R Westerback
favour of DEV_BSIZE. No-op on 512-byte sector devices.
2014-05-24Break annoyingly long line that keeps popping up in diffs.Kenneth R Westerback
2014-05-24Use consistent format specifiers (%lld) and casts (long long) whenKenneth R Westerback
printing out block numbers and sector numbers. Make output verbiage consistent. -Wall happier. Original diff and ok chl@
2014-05-24Don't potentially use stack garbage for e2d_type. InitializeKenneth R Westerback
newent.e2d_type to EXT2_FT_UNKNOWN, a.k.a. 0. Spotted by -Wall.
2014-05-23Make DEBUG a bit easier to use by calling setlogmask(LOG_UPTO(LOG_DEBUG))Kenneth R Westerback
when it is set, and the current setlogmask(LOG_UPTO(LOG_INFO)) when it is not set.
2014-05-23A #define to rename another #define which is then used only once introducesKenneth R Westerback
more obscurity than clarity. Nuke DHCPD_LOG_FACILITY and just use LOG_DAEMON in openlog() call.
2014-05-22Nuke pointless dev_bsize variable which is always set to 512, and justKenneth R Westerback
use DEV_BSIZE. Replace lseek+read with pread().
2014-05-22Nuke pointless dev_bsize variable which is always set to 512, and justKenneth R Westerback
use DEV_BSIZE. Write sizes need to be secsize and not DEV_BSIZE, just like reads. Equivalent to changes made in fsck_ffs.
2014-05-22Nuke some trailing whitespace to shrink subsequent diffs.Kenneth R Westerback
2014-05-21Nuke some trailing whitespace to shrink subsequent diffs.Kenneth R Westerback
2014-05-21Nuke some trailing whitespace to shrink subsequent diffs.Kenneth R Westerback
2014-05-21Nuke some trailing whitespace and break some long lines to shrinkKenneth R Westerback
subsequent diffs.
2014-05-21Nuke some trailing whitespace to shrink subsequent diffs.Kenneth R Westerback
2014-05-21Fix 'fdisk -u', a.k.a. MBR_pcopy(), on sparc64 and possibly others.Kenneth R Westerback
gcc's built-in/in-lined memcpy() can't copy elements of a struct dos_partiton array from inside the __packed struct dos_mbr into an 'unpacked' local variable. But copying the whole array works fine. Be consistant and use the same idiom in both places the partition table is parsed. Leave the landisk workaround/hack in place until it can be confirmed it is no longer needed. ok martynas@ after many alternatives crashed and burned.
2014-05-21Use errc/warnc to simplify code.Philip Guenther
ok jca@ krw@
2014-05-20As suggested by guenther@ and millert@, replace seek+[read|write] withKenneth R Westerback
p[read|write]. Makes the code much clearer by eliminating extra error checking and verbiage. No intentional functional change. Tweaks by and ok guenther@
2014-05-19Nuke some trailing whitespace that snuck in.Kenneth R Westerback
2014-05-19No point in trying to update the -L file on loss of link if no -L hasKenneth R Westerback
been specified. Eliminates spurious "Couldn't write ''" log messages. Spotted while looking into Roman Gorelov's logs on another problem.
2014-05-18Don't add a lease to the leases TAILQ more than once. It tends toKenneth R Westerback
make writing out the leases file go into an infinite loop until /var is full. Reported by Roman Gorelov via bugs@ Fix tested & ok stsp@ uwe@
2014-05-17When parsing a numerical value for the TOS bits, make sure that itAlexander Bluhm
is in a valid range. OK henning@
2014-05-16Zero out grp before re-using it (new ones are already cleared byTodd C. Miller
calloc). We only reuse grp when there is an unresolvable host. Fixes a bug where if a host in a netgroup is unresolvable then entire netgroup is ignore. OK krw@
2014-05-15- typo in commentCharles Longeau
- memset() is not needed after a calloc() - add missing DBG_ENTER; - use SEEK_SET instead of 0 in an lseek() call ok krw@
2014-05-13We don't need no stinkin' 'extern long dev_bsize;'. At least not sinceKenneth R Westerback
fsck_ffs stopped providing it.
2014-05-13pass SA initiator not the exchange initator to sa_address(); ok mikeb@Markus Friedl
2014-05-13Nuke another pointless dev_bsize variable always set to 512 and useKenneth R Westerback
DEV_BSIZE. David Vasek says it still works the same on 4K-byte-sector device. i.e. prints one value incorrectly. For which a fix should be following soon.
2014-05-13Since this is limited to ffs, use ufsinfo_t instead of ino_t.Philip Guenther
Grow the array of cached inodes exponentially instead of arithmetically. Prefer sizeof(*pointer) over sizeof(type) in mallocs. Don't leak memory in searchdir(). Fix multiple bugs in the handling of indirect blocks, including reuse of a static buffer in a recursive function and failure to track the remaining size of the directory blocks to process Tested with a directory *doubly* indirect block! ok krw@
2014-05-12Remove useless dev_bsize variable and use DEV_BSIZE as needed. DivideKenneth R Westerback
sblock_try[] entries by DEV_BSIZE to get proper 512-byte-block address for bread(). Confirmed to still work on 4k-byte sector devices by David Vasek.
2014-05-12Don't exit on encountering RTM_NEWADDR or RTM_DELADDR routing messagesKenneth R Westerback
that lack the appropriate address info. Simply ignore the message as is done for short or incorrectly versioned messages ok claudio@
2014-05-12Since all static leases are in one file, /etc/dhclient.conf, there is noKenneth R Westerback
'wrong interface' specification. So display that error message only for non-static leases. i.e. when reading /var/db/dhclient.leases.<if>.
2014-05-12No need for a dev_bsize variable that is always set to 512,Kenneth R Westerback
a.k.a. DEV_BSIZE. So just use DEV_BSIZE. Confirmed to still work on 4k-byte sector disks by David Vasek.
2014-05-12Make ifconfig do something intelligent based on the required length ofBob Beck
WEP keys rather then being silently dumb, so when using WEP: 1) If the key is a plausible size try to use it. 2) If they key would be a plausible size with '0x' in front of it, add that. 3) If the key is not a plausible size, emit a warning and do not try to use it. ok sthen@
2014-05-11replace realloc(p, N * M) with reallocarray(p, N, M) and remove someAlexander Hall
pointless cleanup if we're obviously going to die anyway ok guenther@
2014-05-11struct direct's d_ino is no longer the same size as an ino_t, so copy itPhilip Guenther
for the call to bsearch() problem report and ok krw@
2014-05-11Tweak DHCPREQUEST log message to omit 'port N', since the port is notKenneth R Westerback
set at that point, and is always set to 67 in send_packet().
2014-05-11Rework/restore recorded lease handling. Actually use 'lease'Kenneth R Westerback
statements in dhclient.conf. Recorded and static leases should now be bound to interfaces when appropriate. .... Ken
2014-05-11remove unused variableCharles Longeau
ok tedu@
2014-05-09Modernize spelling. 'Mimick' -> 'Mimic' in comment.Kenneth R Westerback
2014-05-09Fix '-b' option to work with the superblock locations output by newfsKenneth R Westerback
on 4096-byte sector disks. No-op on 512-byte sector disks. Adhering to the bedrock idea that ffs will *never* use anything but 512-byte block disk addressing (a.k.a. daddr_t), and believing that the 'fake' bread()/bwrite() functions should always be using 512-btye block numbers like their kernel big brothers, nuke the computed dev_bsize and use DEV_BSIZE for conversions to/from byte offsets. Spotted and various fixes tested by David Vasek. Still to fix: scanning for superblocks on 4K disks. ok otto@
2014-05-09my previous attempt to fix the renaming of the inet(3) pages was wrong;Jason McIntyre
this fixes those by referencing the correct page, and cleans up the netintro/ inet entries; all this on the advice (and ok) of guenther!
2014-05-09get rid of redundant {csa,flow}_{src,dst}id pointers, so we don't needMarkus Friedl
to update it on rekey (fixes use-after-free); ok mikeb@
2014-05-09replace iked_transform pointer with xform id, since target of pointerMarkus Friedl
might be freed (e.g. on ike sa rekey); ok mikeb@