Re: Change behaviour of vis(3) in syslogd concerning backslash escaping

2022-06-02 Thread Matthias Pitzl
On 02.06.2022 - 08:49:41, Theo de Raadt wrote: > The purpose of the vis() addition was mostly to guard against later > "cat" views of the output files sending remote-controllable escape-codes > to terminals (especially in xterm, there are many unfortunately features > which should not be reachable

usb: another bad hid quirk

2022-06-02 Thread Anton Lindqvist
Hi, I recently got a Gembird EG-PMS2 power strip controllable over USB. It currently attaches over uhidev which is problematic since it lacks an interrupt endpoint causing uhidev to punt early during attachment. Instead, letting it attach as ugen makes it possible to control the device using third-

Re: httpd: add include_dir keyword

2022-06-02 Thread Theo de Raadt
I do not understand why it is believed that people will generate better configurations if they split the parts out into different files. Adding that kind of trick to an already established grammer rarely works well. It only works in narrowly constrained uses of the old grammer, because now one m

Re: obsolete dump options syntax

2022-06-02 Thread Christian Weisgerber
Jan Stary: > http://cvsweb.netbsd.org/bsdweb.cgi/src/sbin/dump/main.c.diff?r1=1.4&r2=1.5&f=h > "Use getopt(3), with obsolete() from restore(8) for backward compatibility." > > So it's restore(8); I write "restore rf" myself. > Is this it? Does that still need to be supported by dump(8)? The same

Re: httpd: add include_dir keyword

2022-06-02 Thread mfrench
Coincidentally I have been working on adding globbing support to include in the httpd config parser. I have only done light testing, nothing in production yet but the patch provided below has not given me any trouble in my test environment yet. Any feedback is welcome! -Matt Index: parse.y ==

[patch] 802.11 printing akm and cipher suite lists in tcpdump

2022-06-02 Thread Mikhail
Recently I bought a router with WPA3 support and decided to investigate wireless dump with WPA3 config, during the process I've found a small bug in tcpdump - it doesn't print all akms, also the printing logic is flawed if more than one akm or pairwise cipher is presented - there is extra addition

Re: vmm: remove vm teardown from vcpu run path (testers needed)

2022-06-02 Thread Dave Voutila
Dave Voutila writes: > tech@ et al.: > > Looking for testers of the following diff for vmm(4). In my efforts to > fix some stability issues, I'm taking baby steps tweaking parts of the > code to make my upcoming proposal (adding refcnts) easier to swallow. > > This change removes the calling of

Re: Change behaviour of vis(3) in syslogd concerning backslash escaping

2022-06-02 Thread Theo de Raadt
The purpose of the vis() addition was mostly to guard against later "cat" views of the output files sending remote-controllable escape-codes to terminals (especially in xterm, there are many unfortunately features which should not be reachable from remote. the nastiest features were disabled over

Re: obsolete dump options syntax

2022-06-02 Thread Theo de Raadt
Sure. That solves the immediate problem, provides people with a strong hint to use options, and does no harm to the legacy option behaviour which people used for half a century and will use for the next half a century Todd C. Miller wrote: > On Thu, 02 Jun 2022 07:54:02 -0600, "Theo de Raad

Re: obsolete dump options syntax

2022-06-02 Thread Todd C . Miller
On Thu, 02 Jun 2022 07:54:02 -0600, "Theo de Raadt" wrote: > I'm fine with a / check, but it also needs documenting. While there can't > we say at least one option must be supplied? How about this? - todd Index: sbin/dump/dump.8

Change behaviour of vis(3) in syslogd concerning backslash escaping

2022-06-02 Thread Matthias Pitzl
Hi, We're sending log data in JSON format to a SIEM system and noticed a special behaviour of OpenBSD's syslogd concerning strings with backslashes that is unique to OpenBSD: echo '{"msg": \"This is "a test\""}' | logger results in the following string logged: {"msg": "This is \\"a test\\""} As

Re: obsolete dump options syntax

2022-06-02 Thread Theo de Raadt
Todd C. Miller wrote: > True, those would not be handled but isn't the most common usage > to pass a fully-qualified path or a device name? The biggest problem > I see is that this would not catch a disk uid being used but I don't > think that is really fixable unless we check the string for a d

Re: obsolete dump options syntax

2022-06-02 Thread Todd C . Miller
On Thu, 02 Jun 2022 07:43:15 -0600, "Theo de Raadt" wrote: > Hmm, but consider these cases > > dump home > > or > > mkdir 0af > dump 0af > > or > > cd /dev && dump rsd0a True, those would not be handled but isn't the most common usage to pass a fully-qualified path or a device name? The biggest

Re: obsolete dump options syntax

2022-06-02 Thread Theo de Raadt
Todd C. Miller wrote: > On Thu, 02 Jun 2022 14:36:16 +0200, Jan Stary wrote: > > > That results in the above. What obsolete options format > > is this trying to accomodate? The manpage doesn't say - > > the options it describes are perfectly getopt()-likable. > > Looking at the CVS log, this was

Re: obsolete dump options syntax

2022-06-02 Thread Theo de Raadt
Jan Stary wrote: > On Jun 02 07:16:52, dera...@openbsd.org wrote: > > Your diff completely breaks a majority of the ways people use it. > > Does that mean people mostly use > the undocumented obsolete syntax > that obsolete() keeps supported? It means at least 1 person use that option code, whi

Re: obsolete dump options syntax

2022-06-02 Thread Todd C . Miller
On Thu, 02 Jun 2022 14:36:16 +0200, Jan Stary wrote: > That results in the above. What obsolete options format > is this trying to accomodate? The manpage doesn't say - > the options it describes are perfectly getopt()-likable. > Looking at the CVS log, this was already "obsolete" > in the origina

Re: obsolete dump options syntax

2022-06-02 Thread Jan Stary
On Jun 02 07:16:52, dera...@openbsd.org wrote: > Your diff completely breaks a majority of the ways people use it. Does that mean people mostly use the undocumented obsolete syntax that obsolete() keeps supported? > Jan Stary wrote: > > > # dump /home

Re: obsolete dump options syntax

2022-06-02 Thread Theo de Raadt
Your diff completely breaks a majority of the ways people use it. Jan Stary wrote: > # dump /home > dump: option requires an argument -- h > > # dump /music > dump: option requires an argument -- s > > # dump /media > dump: option requir

Re: obsolete dump options syntax

2022-06-02 Thread Jan Stary
On Jun 02 14:36:16, h...@stare.cz wrote: > # dump /home > dump: option requires an argument -- h > > # dump /music > dump: option requires an argument -- s > > # dump /media > dump: option requires an argument -- d > > What? Before passing

dump(8) wording

2022-06-02 Thread Jan Stary
The following wording of dump(8) can IMHO be be simplified without any loss: Rewinding or ejecting tape features after a close operation on a tape device depend on the name of the tape unit device used. I am not a native speaker; but if I parse that right, what "features" are thos

obsolete dump options syntax

2022-06-02 Thread Jan Stary
# dump /home dump: option requires an argument -- h # dump /music dump: option requires an argument -- s # dump /media dump: option requires an argument -- d What? Before passing its options to getopt(), dump's main() processes them with ob

igc vlan hwtagging

2022-06-02 Thread Moritz Buhl
Dear tech@, the following diff should implement vlan hwtagging for igc. I would appreciate feedback from further testing. OK? mbuhl Index: sys/dev/pci/if_igc.c === RCS file: /cvs/src/sys/dev/pci/if_igc.c,v retrieving revision 1.9 di

Re: libcrypto: altering tbs sigalg on X509 and X509_CRL

2022-06-02 Thread Theo Buehler
On Wed, Jun 01, 2022 at 11:00:12AM +1000, Alex Wilson wrote: > I'm trying to sign X509 and X509_CRL objects without using X509_sign et al > -- since the key I'm signing with isn't in the memory of the process doing > this and you can't write an ENGINE for something that can't sign a > pre-calculate

Re: httpd: add include_dir keyword

2022-06-02 Thread Stuart Henderson
On 2022/06/02 12:53, qorg11 wrote: > > I don't think we want this functionality. > > Some users have been asking for it in the #openbsd IRC channel. there are 20+ programs in base which use a config parser derived from the same source as usr/sbin/httpd's, and generally they are kept in sync as mu

Re: httpd: add include_dir keyword

2022-06-02 Thread qorg11
Ugh, this is awkward. Index: httpd.conf.5 === RCS file: /cvs/src/usr.sbin/httpd/httpd.conf.5,v retrieving revision 1.121 diff -u -p -u -p -r1.121 httpd.conf.5 --- httpd.conf.5 9 Mar 2022 13:50:41 - 1.121 +++ httpd.conf.5 2 Jun 2022

Re: bgpd cleanup RTP_ limit checks in parse.y

2022-06-02 Thread Theo Buehler
On Thu, Jun 02, 2022 at 01:07:07PM +0200, Claudio Jeker wrote: > On Thu, Jun 02, 2022 at 12:44:49PM +0200, Theo Buehler wrote: > > On Thu, Jun 02, 2022 at 11:38:05AM +0200, Claudio Jeker wrote: > > > Lets use the same check for both priority checks in parse.y. > > > Also rephrase the error messages

Re: bgpd cleanup RTP_ limit checks in parse.y

2022-06-02 Thread Claudio Jeker
On Thu, Jun 02, 2022 at 12:44:49PM +0200, Theo Buehler wrote: > On Thu, Jun 02, 2022 at 11:38:05AM +0200, Claudio Jeker wrote: > > Lets use the same check for both priority checks in parse.y. > > Also rephrase the error messages to be less cryptic. > > Both checks do the same check since RTP_NONE =

Re: httpd: add include_dir keyword

2022-06-02 Thread qorg11
Ignore that last patch. It has a wrong indentation in an if block. Index: httpd.conf.5 === RCS file: /cvs/src/usr.sbin/httpd/httpd.conf.5,v retrieving revision 1.121 diff -u -p -u -p -r1.121 httpd.conf.5 --- httpd.conf.5 9 Mar 2022 13

Re: httpd: add include_dir keyword

2022-06-02 Thread qorg11
> I don't think we want this functionality. Some users have been asking for it in the #openbsd IRC channel. In any case, I have fixed the patch file. Index: httpd.conf.5 === RCS file: /cvs/src/usr.sbin/httpd/httpd.conf.5,v retrieving

Re: bgpd cleanup RTP_ limit checks in parse.y

2022-06-02 Thread Theo Buehler
On Thu, Jun 02, 2022 at 11:38:05AM +0200, Claudio Jeker wrote: > Lets use the same check for both priority checks in parse.y. > Also rephrase the error messages to be less cryptic. > Both checks do the same check since RTP_NONE = 0 and RTP_LOCAL = 1. ok > Using RTP_LOCAL as a priority is actually

Re: httpd: add include_dir keyword

2022-06-02 Thread Florian Obser
On 2022-06-02 11:04 +02, qorg11 wrote: > This patch addes the "inlcude_dir" keyword for httpd.conf. Which works > just like "include" but it includes all the files in a directory, for > example: include "/etc/httpd.d" > > The diff file is attatched. I don't think we want this functionality. More

bgpd cleanup RTP_ limit checks in parse.y

2022-06-02 Thread Claudio Jeker
Lets use the same check for both priority checks in parse.y. Also rephrase the error messages to be less cryptic. Both checks do the same check since RTP_NONE = 0 and RTP_LOCAL = 1. Using RTP_LOCAL as a priority is actually not possible since that one is reserved for the kernel (used by interface a

Re: bgpd, check ktable_exists return value

2022-06-02 Thread Claudio Jeker
On Thu, Jun 02, 2022 at 11:13:31AM +0200, Theo Buehler wrote: > On Thu, Jun 02, 2022 at 11:05:26AM +0200, Claudio Jeker wrote: > > When setting the default routing table for bgpd make sure that > > ktable_exists() does not fail. > > Also improve the warning message in ktable_exists() a bit. > > Su

Re: bgpd, check ktable_exists return value

2022-06-02 Thread Theo Buehler
On Thu, Jun 02, 2022 at 11:05:26AM +0200, Claudio Jeker wrote: > When setting the default routing table for bgpd make sure that > ktable_exists() does not fail. > Also improve the warning message in ktable_exists() a bit. Sure, ok. The existing checks in parse.y do 'if (ktable_exists(..) != 1)' a

httpd: add include_dir keyword

2022-06-02 Thread qorg11
This patch addes the "inlcude_dir" keyword for httpd.conf. Which works just like "include" but it includes all the files in a directory, for example: include "/etc/httpd.d" The diff file is attatched. Index: httpd.conf.5 === RCS file:

bgpd, check ktable_exists return value

2022-06-02 Thread Claudio Jeker
When setting the default routing table for bgpd make sure that ktable_exists() does not fail. Also improve the warning message in ktable_exists() a bit. -- :wq Claudio Index: kroute.c === RCS file: /cvs/src/usr.sbin/bgpd/kroute.c,v