Initialize username if retrieving the username attribute fails. Also,
check the attribute length, this should have been included in the previous
commit (revision 1.15).
Reject the Access-Request instead of stopping the module when neither
the request nor the response has a usable User-Name. Also initialize
local variables in ipcp_reject().
rpki-client: simplify roa_ip_cmp()
Instead of two memcmp we can use the same approach as in ccr_vrp_cmp()
and compare struct ip_addr() and the prefix length to obtain the ordering
sort-of but not quite rquired by RFC 9582, section 4.3.3. Right now only
three amazon CAs don't follow this ordering, so maybe we can get them to
fix that soon and start requiring the order, which avoids some algorithmic
complexity issues.
ok claudio
Use the Request Authenticator as the CHAP challenge when the
Access-Request has no CHAP-Challenge attribute, as specified in RFC
2865 section 5.3. Previously such requests were never answered, so
they stayed pending in radiusd forever.
Reported and diff from Acts1631
rpki-client: fix roa_ip_cmp() for differing AFIs
Presumably a copy-paste error. It does not matter in practice since the
function is only called for addresses of the same AF.
ok claudio
Abort the query when radiusd_eap2mschap fails to handle a received EAP
message. Previously such a query was never answered nor aborted, so it
stayed in radiusd forever and kept its RADIUS Identifier busy; 256 of
them blocked all later requests from the same NAS socket. Also free
the EAP context immediately after sending Access-Reject for an EAP NAK,
instead of waiting for the timeout.
Reported and original diff from Acts1631
Extend the imsgev code to handle read and write internally
imsgev_new() now takes a imsg_handler and and error_handler as callbacks
and calls them when imsg are available or when an error happened.
The imsg_handler now simply gets a imsg pointer and so functions like
main_dispatch_ospfe become a lot simpler.
The error handler is called with an event of EV_WRITE or EV_READ and passes
errno or 0 (for the connection close case).
ospfd does not care about any of that. Since errors are either ignored
(control socker) or are terminal.
Also rework the various imsg dispatch functions to stop peaking at imsg
internals like imsg->data.
OK tb@
Major rework of the libevent based imsg handling in ospfd.
Use imsgbuf_set_userdata() and imsgbuf_set_close_callback() to wrap
the imsg event properly into the imsg framework. This is done in
imsgev.c and it also adds a imsgev_new and imsgbuf_clear calls to
wrap all the setup and teardown into two simple calls.
With this imsg_compose_event() can be nuked and one can use the
imsg API directly without thinking about libevent.
OK tb@
Stop send-keys rejecting pane input when the default target client is
readonly by checking the client that ran the command. Based on fix from
Karl Lehenbauer in GitHub issue 5940.
Add a NOERASE cell flag and use it to draw the character under the
prompt cursor so that terminals which for some reason draw the cursor in
the cell foreground colour look right, GitHub issue 5829.
Split sti(4) in two drivers, sti(4) for rom services and stifb(4) for actual
display operation. This will allow future drivers to attach to sti(4) but
operate differently.
ext2fs: read on-disk timestamps as signed
The ext2 inode keeps its times as 32-bit seconds, which Linux reads as
signed: 1901 to 2038. ext2fs_getattr() widened them unsigned, so a
time before 1970, set by Linux or by utimes(2) here, came back in the
2100s. Sign-extend them. Storing needs no change: the low 32 bits of
a negative time_t are what Linux writes.
Found by xfstests generic/258.
OK miod@
ext2fs: no atime update on a read-only mount
ext2fs_getattr() ran EXT2FS_ITIMES() directly, so a read on a read-only
mount (which sets IN_ACCESS) stamped the in-core atime with the current
time, and stat(2) reported it, although nothing reached the disk. Call
ufs_itimes() instead, as ufs_getattr() does: it skips the update on a
read-only mount and hands ext2 inodes to EXT2FS_ITIMES() otherwise.
Found by xfstests generic/003.
OK miod@