1
0
mirror of https://github.com/openbsd/src.git synced 2024-12-21 23:18:00 -08:00
Commit Graph

14040 Commits

Author SHA1 Message Date
jsg
76b1f2ebe5 change '386BSD 0.1.2.4/FreeBSD' to .Fx
the 0.2.4 patchkit for 386BSD 0.1 did not have this command
2024-12-21 13:15:36 +00:00
jsg
7ed182d8b9 correct history; a reboot command did not appear until 4BSD 2024-12-21 05:01:25 +00:00
sthen
dfd6150703 use opendev() for fsck_ext2fs, based on code adding this to fsck_ffs
tweak (add strncmp()...blockcheck section) from martijn@
ok martijn@
2024-12-18 10:36:05 +00:00
kirill
a95f0396ca unwind: support wildcard in blacklist
Any domain in the blacklist that starts with '.', which is not a legal
name due to an empty label, is treated as any subdomain on that zone.

This means that .example.com blocks all requests to any subdomain of
example.com, but allows example.com.

No objections: florian@ OK: kn@
2024-11-24 11:33:34 +00:00
kn
e08605c7f2 omit preceding flag from command/modifier lists to get tags; OK jmc
reads odd to repeat, e.g. -F, when listing all its modifiers.
as a consequence, automatic tagging wouldn't work, e.g. no "zero"
tag would exist to jump to that -F modifier's definition.

also add manual tags for -R and -T as get explained together with
-s and -t, respectively, where only the first flag gets tagged.
2024-11-21 18:16:01 +00:00
claudio
0e59d0d19c Convert sbin and usr.bin to check for imsgbuf_init failure and add
imsgbuf_allow_fdpass where needed.

OK tb@
2024-11-21 13:35:20 +00:00
claudio
fa353a8f9b s/ibuf_add_buf/ibuf_add_ibuf/
OK tb@
2024-11-21 13:26:49 +00:00
claudio
aab0b47446 Implement the recv_imsg/read_message function in the correct way.
One needs to first check imsg_get() if there is a imsg already in
the queue. Then if that returns 0 call imsgbuf_read(). Do this in
a loop until imsg_get() returns an imsg.

OK tb@ and nicm@ for file
2024-11-21 13:24:07 +00:00
claudio
668e5ba9d8 Convert the common imsgbuf_read calls to the post EAGAIN world.
OK tb@
2024-11-21 13:21:33 +00:00
claudio
31be28ca73 Use imsgbuf_queuelen() instead of accessing the w.queue member.
OK tb@
2024-11-21 13:18:37 +00:00
claudio
9cbf9e90b0 Use imsgbuf_clear() where appropriate instead of msgbuf_clear().
OK tb@
2024-11-21 13:17:56 +00:00
claudio
dd7efffe3c Rename imsg_init, imsg_clear, imsg_read, imsg_write and imsg_flush to
imsgbuf_init, imsgbuf_clear, imsgbuf_read, imsgbuf_write and imsgbuf_flush.

This separates the imsgbuf API from the per-imsg API.

OK tb@
2024-11-21 13:17:01 +00:00
claudio
e3b6409cb3 Convert imsg_write() callers to the new simplified return logic.
OK tb@
2024-11-21 13:14:44 +00:00
claudio
ce33693d52 Introduce imsg_write() and use it instead of msgbuf_write().
imsg_write() is just a thin wrapper around msgbuf_write(). So this is
mostly search and replace.

OK tb@
2024-11-21 13:10:18 +00:00
claudio
f978fa48b9 imsg_flush no longer returns EAGAIN. Simplify proc_flush_imsg() accordingly.
Issue spotted by op@
2024-11-21 13:06:19 +00:00
yasuoka
e449cd41a7 The block size of HMAC-SHA2-{384,512} must be 128 bytes.
ok tb
2024-11-21 10:07:30 +00:00
kirill
e496dff3a7 pfctl: clear statistic for specified addresses
OK:  bluhm@
2024-11-20 13:57:29 +00:00
dlg
42a2f8b7e7 bump the type used to specify traffic queue bandwidth to 64bit.
this should let people specify interface and queue bandwidths greater
than ~4Gbit.

this changes the pf ioctls used to specify queues, so if you want
to try this you'll need a new kernel, new headers, and a new pfctl
(and systat). or upgrade using a snapshot. the effort and benefit
of providing compat isn't worth it.

putting it in now so people can kick it around.
2024-11-12 04:14:51 +00:00
florian
726515c9a7 Prevent completely empty interface blocks.
This is meaningless in dhcpleased(8) and *not* needed to receive
leases for an interface. In fact dhcpleased(8) works just fine without
any configuration file at all.

man page diff & OK kn
2024-11-11 15:19:31 +00:00
kn
9720bce564 sync curly braces markup, fix indent
Replace literal braces with .Brq, use a list and indent the interface options
under that interface entry to reflect hierarchy (rad.conf(5) does that, too).

Feedback from/fine with jmc
2024-11-09 12:44:12 +00:00
sobrado
22ac2f2a6f usage should fit in a 80-column display.
ok jmc@
2024-11-09 10:57:06 +00:00
jca
2119819d27 Ignore extra groups that don't fit in the buffer passed to getgrouplist(3)
Our kernel supports 16 groups (NGROUPS_MAX), but nothing prevents
an admin from adding a user to more groups.  With that tweak we'll keep
on ignoring them instead of potentially reading past the buffer passed to
getgrouplist(3).  That behavior is explicitely described in initgroups(3).

ok millert@ gilles@
2024-11-04 21:59:15 +00:00
dlg
9a83655441 add a "natt" option that forces negotiation of nat-t (and udpencap).
this is like the -t command line option on iked itself, but you get
to keep the ike listener on port 500 and you can enable this on
specific policies instead of all of them.

this is useful if you're dealing with an org that can't firewall
ESP traffic well and so you need to force the traffic to be udp
encapsulated even if there's no NAT involved.

ok markus@ tobhe@
2024-11-04 02:44:28 +00:00
kn
3612e128aa Simplify name/prefix markup, readability tweak and cleanup
Leave the notion of repition to ... and markup optional prefixes as such;
'name/prefix [name/prefix ...]' becomes 'name[/prefix] ...'.

Also sync with unwind.conf.5 to fix curly braces and indentation.

OK florian
Input OK jmc
2024-11-01 08:27:49 +00:00
florian
be0e8945dd Document /var/db/dhcp6leased/uuid.
Input & OK kn, jmc, sthen
2024-10-30 17:01:28 +00:00
jsg
a52c5fd070 remove duplicate defines 2024-10-23 03:14:32 +00:00
sthen
df2ad42785 apply the CVE-2024-8508 fix from unbound (put a limit on resources used
for handling DNS compression). OK florian
2024-10-08 00:21:08 +00:00
chrisz
c08965e9c1 Make scaling available for normal mice, too; not just for touchpads.
Add reverse_scrolling to the manpage.

ok bru@
2024-10-05 13:27:16 +00:00
jmc
411db55cb2 add some commas, to aid readability;
from thorsten blum
2024-09-29 18:00:38 +00:00
bru
21cd3483f0 Correct an indexing error that may leave stale data in the mousecfg buffer.
ok mpi@
2024-09-25 19:56:33 +00:00
jsg
479c151d34 remove unneeded semicolons; checked by millert@ 2024-09-20 02:00:46 +00:00
florian
1a83499475 Close correct file descriptor.
Instead of closing the just received UDP socket we closed the imsg fd
thus cleanly shutting down dhcpleased(8).

Problem triggered by sf@ with something like
while :; do ifconfig vio0 -inet; done
while :; do ifconfig vio0 inet autoconf; done

The problem triggers when dhcpleased configured a lease and in just
the right moment the autoconf flag gets removed. The main process
opens a udp socket and sends it to the frontend. At the same time the
frontend learned (from the route socket), that the interface lost its
autoconf flag. When the frontend then receives the udp socket via fd
passing it tries to close it. Due to a typo it would instead close the
imsg file descriptor.

Found by me after lots of head scratching.
OK tb
2024-09-16 07:34:49 +00:00
yasuoka
9ca241fcbd Add handling of "Class" attribute. diff from markus
ok markus
2024-09-15 11:08:50 +00:00
jsg
f6e4162f05 remove unused variables 2024-09-15 07:14:58 +00:00
yasuoka
4c8569653c Fix a typo 2024-09-11 00:41:51 +00:00
jmc
6bf665493e missing "Ar" in previous; 2024-09-10 05:33:32 +00:00
yasuoka
ed822a905c When accounting start the type attribute was added twice.
from markus
2024-09-09 23:38:29 +00:00
kn
2402a19bf8 Add triple-dots to synopsis as multiple name[=value] arguments may be given
OK jmc sobrado
2024-09-09 05:36:17 +00:00
miod
19b65b990b Repair build with gcc. 2024-09-06 06:31:11 +00:00
florian
7037e34cdf Sync to unbound 1.21.0; heavy lifting by sthen
parse_edns_from_query_pkt() grew a parameter to handle cookies, which
we don't use.
2024-09-05 08:22:46 +00:00
tb
c920a736d2 dhcpleased: fix a sizeof for IMSG_REQUEST_REBOOT.
"fatal in engine: engine_dispatch_frontend: invalid IMSG_REQUEST_REBOOT"
reported by qwer.ty tuta io

ok florian kn
2024-09-01 20:24:42 +00:00
florian
596e189798 Do not send zero sized vendor or client ids.
The frontend and engine do not like this due to improved error
checking.

Found by Josh Grosse and Renato Aguiar, thanks!
2024-08-27 05:55:39 +00:00
florian
7e5648d1f8 Use i2s instead of hard coding the imsg type. Suggested by tb. 2024-08-26 06:06:04 +00:00
florian
c7074a5260 errno is unset, use fatalx(3) instead of fatal(3). 2024-08-26 06:05:05 +00:00
florian
f46577a894 Be stricter in what we accept from the main process.
While here mention function where fatalx(3) occurred like everywhere
else.

Suggested by & OK tb
2024-08-26 06:04:24 +00:00
florian
45c5e5ad7f Do not peek inside of struct imsg.
input & OK tb
2024-08-25 09:53:53 +00:00
florian
5bd09d2d82 sin6_to_str and i2s take a single argument.
Pointed out by tb
2024-08-25 07:04:05 +00:00
florian
9a7d784aa6 Simplify engine_showinfo_ctl()
It only handles one imsg type these days, so it doesn't need to peek
into struct imsg at all.

pointed out by & OK tb
2024-08-24 16:35:05 +00:00
florian
46c03dec08 Stop peeking into struct imsg when relaying control messages.
pointed out by & OK tb
2024-08-24 16:34:23 +00:00
florian
33d2acb625 Do not peek inside of struct imsg.
While here use i2s helper function for error logging.

OK tb
2024-08-24 09:44:41 +00:00