Re: uhidpp(4): logitech hid++ device driver

2021-01-29 Thread Anton Lindqvist
On Fri, Jan 29, 2021 at 10:15:05PM +0200, Ville Valkonen wrote: > Hi, > > I have a bit oldish Logitech M705 mouse, bought around 2010-2011. > Regarding the dmesg (on below) I can see it gets attached correctly to > uhiddp0 but doesn't report battery levels. Here's the line from dmesg: > uhidpp0

disklabel: pointer deref fix

2021-01-29 Thread Christian Weisgerber
Fix a pointer dereference in disklabel(8). This looks like somebody wrote *s[0] in place of (*s)[0]. Which in this case happens to be equivalent, but it still looks wrong. OK? Index: sbin/disklabel/editor.c === RCS file:

sed: make use of getline(3)

2021-01-29 Thread Christian Weisgerber
Replace fgetln(3) with getline(3) in sed. The mf_fgets() part is from Johann Oskarsson for Illumos/FreeBSD. Passes our sed regression tests. OK? Index: usr.bin/sed/main.c === RCS file: /cvs/src/usr.bin/sed/main.c,v retrieving

Re: ftp: make use of getline(3)

2021-01-29 Thread Christian Weisgerber
Hiltjo Posthuma: > > @@ -75,19 +74,8 @@ cookie_load(void) > > if (fp == NULL) > > err(1, "cannot open cookie file %s", cookiefile); > > date = time(NULL); > > - lbuf = NULL; > > - while ((line = fgetln(fp, )) != NULL) { > > - if (line[len - 1] == '\n') { > > -

Re: ftp: make use of getline(3)

2021-01-29 Thread Hiltjo Posthuma
On Fri, Jan 29, 2021 at 07:22:11PM +0100, Christian Weisgerber wrote: > Make use of getline(3) in ftp(1). > > Replace fparseln(3) with getline(3). This removes the only use > of libutil.a(fparseln.o) from the ramdisk. > Replace a complicated fgetln(3) idiom with the much simpler getline(3). > >

Re: uhidpp(4): logitech hid++ device driver

2021-01-29 Thread Ville Valkonen
Hi, I have a bit oldish Logitech M705 mouse, bought around 2010-2011. Regarding the dmesg (on below) I can see it gets attached correctly to uhiddp0 but doesn't report battery levels. Here's the line from dmesg: uhidpp0 at uhidev2 device 1 mouse "M705" serial xx-xx-x-xx, device 2 keyboard "K750"

Re: uhidpp(4): logitech hid++ device driver

2021-01-29 Thread Anton Lindqvist
On Fri, Jan 29, 2021 at 07:23:37PM +0200, Ville Valkonen wrote: > Hello Anton, > > either I failed to use git or then files have changed since the first patch: > $ git apply -p0 --check hid_plusplus.patch > error: patch failed: share/man/man4/Makefile:83 > error: share/man/man4/Makefile: patch

ftp: make use of getline(3)

2021-01-29 Thread Christian Weisgerber
Make use of getline(3) in ftp(1). Replace fparseln(3) with getline(3). This removes the only use of libutil.a(fparseln.o) from the ramdisk. Replace a complicated fgetln(3) idiom with the much simpler getline(3). OK? Index: distrib/special/ftp/Makefile

Re: unwind(8): open DNSSEC trustanchor late

2021-01-29 Thread Klemens Nanni
On Fri, Jan 29, 2021 at 04:52:40PM +0100, Florian Obser wrote: > Re-try to open DNSSEC trust anchor file if /var is not mounted yet. > With this we are able to start unwind before the network is up and > partitions are mounted. OK kn

Re: unwind(8): use SO_BINDANY

2021-01-29 Thread Claudio Jeker
On Fri, Jan 29, 2021 at 06:29:52PM +0100, Florian Obser wrote: > Hold off on this for now, claudio pointed out that I might not be > supposed to use SO_BINDANY like this. I checked the code and I think using SO_BINDANY should be OK. Still not sure if unwind can bind(2) before any interface is

Re: unwind(8): use SO_BINDANY

2021-01-29 Thread Florian Obser
Hold off on this for now, claudio pointed out that I might not be supposed to use SO_BINDANY like this. On Fri, Jan 29, 2021 at 04:51:46PM +0100, Florian Obser wrote: > I want to start unwind earlier, around the time when slaacd comes up, > the network is not up at that point. Set SO_BINDANY to

Re: unwind(8): recheck on libunbound config changes

2021-01-29 Thread Klemens Nanni
On Fri, Jan 29, 2021 at 04:48:53PM +0100, Florian Obser wrote: > Some libunbound configuration changes can change the quality of a > resolver so we have to schedule a re-check. OK kn

Re: uhidpp(4): logitech hid++ device driver

2021-01-29 Thread Ville Valkonen
Hello Anton, either I failed to use git or then files have changed since the first patch: $ git apply -p0 --check hid_plusplus.patch error: patch failed: share/man/man4/Makefile:83 error: share/man/man4/Makefile: patch does not apply error: patch failed: share/man/man4/uhidev.4:40 error:

IPsec IPv6 Path MTU discovery

2021-01-29 Thread Alexander Bluhm
Hi, This fixes path MTU discovery for ESP tunneled in IPv6. In IPv6 we always want short TCP segments or fragments encapsulated in ESP instead off fragmented ESP packets. ok? bluhm Index: netinet/ip_output.c === RCS file:

Re: rc(8): start unwind earlier

2021-01-29 Thread Florian Obser
On Fri, Jan 29, 2021 at 04:56:47PM +0100, Antoine Jacoutot wrote: > On Fri, Jan 29, 2021 at 04:53:34PM +0100, Florian Obser wrote: > > Start unwind earlier. > > > > OK? > > > > diff --git rc rc > > index 94465add54f..7b5f835f0af 100644 > > --- rc > > +++ rc > > @@ -442,6 +442,7 @@

Re: rc(8): start unwind earlier

2021-01-29 Thread Antoine Jacoutot
On Fri, Jan 29, 2021 at 04:53:34PM +0100, Florian Obser wrote: > Start unwind earlier. > > OK? > > diff --git rc rc > index 94465add54f..7b5f835f0af 100644 > --- rc > +++ rc > @@ -442,6 +442,7 @@ fill_baddynamic tcp > sysctl_conf > > start_daemon slaacd >/dev/null 2>&1 > +start_daemon unwind

rc(8): start unwind earlier

2021-01-29 Thread Florian Obser
Start unwind earlier. OK? diff --git rc rc index 94465add54f..7b5f835f0af 100644 --- rc +++ rc @@ -442,6 +442,7 @@ fill_baddynamic tcp sysctl_conf start_daemon slaacd >/dev/null 2>&1 +start_daemon unwind >/dev/null 2>&1 echo 'starting network' @@ -454,8 +455,6 @@ sh /etc/netstart mount

unwind(8): use SO_BINDANY

2021-01-29 Thread Florian Obser
I want to start unwind earlier, around the time when slaacd comes up, the network is not up at that point. Set SO_BINDANY to be able to already bind upd/53 and tcp/53 on localhost. This will make integration with dhclient easier (I hope). diff --git unwind.c unwind.c index

unwind(8): recheck on libunbound config changes

2021-01-29 Thread Florian Obser
Some libunbound configuration changes can change the quality of a resolver so we have to schedule a re-check. OK? diff --git resolver.c resolver.c index feeb6c2f27a..006632e0303 100644 --- resolver.c +++ resolver.c @@ -175,7 +175,7 @@ void replace_forwarders(struct

Re: sndiod: Move controls out of the device structure, please test & review

2021-01-29 Thread Alexandre Ratchov
On Fri, Jan 29, 2021 at 12:42:37PM +0100, Alexandre Ratchov wrote: > Moving to a global server-wide controls list is necessary to expose > controls that are not associated to a particular device (ex. a device > selector). > > The current hack to use the device-side sioctl_desc->addr variable as >

Re: execve -1 errno 12 Cannot allocate memory

2021-01-29 Thread Mark Kettenis
> Date: Fri, 29 Jan 2021 09:48:42 -0500 > From: Philippe Meunier > > Philippe Meunier wrote: > >Is there some kind of limitation on the size of an ELF executable that can > >be executed on i386? I mean, in addition to the limits in /etc/login.conf? > > When using readelf(1) on the chrome

Re: execve -1 errno 12 Cannot allocate memory

2021-01-29 Thread Jonathan Gray
On Fri, Jan 29, 2021 at 09:48:42AM -0500, Philippe Meunier wrote: > Philippe Meunier wrote: > >Is there some kind of limitation on the size of an ELF executable that can > >be executed on i386? I mean, in addition to the limits in /etc/login.conf? > > When using readelf(1) on the chrome

Re: execve -1 errno 12 Cannot allocate memory

2021-01-29 Thread Philippe Meunier
Philippe Meunier wrote: >Is there some kind of limitation on the size of an ELF executable that can >be executed on i386? I mean, in addition to the limits in /etc/login.conf? When using readelf(1) on the chrome executable from chromium-81.0.4044.138.tgz from OpenBSD 6.7-release i386 packages, I

execve -1 errno 12 Cannot allocate memory

2021-01-29 Thread Philippe Meunier
Hello, Is there some kind of limitation on the size of an ELF executable that can be executed on i386? I mean, in addition to the limits in /etc/login.conf? Here's why I'm asking: $ uname -a OpenBSD t43.my.domain 6.8 GENERIC#4 i386 $ cat /etc/login.conf [...] default:\ :path=/usr/bin

Re: have pf_route bail out if it resolves a route with RTF_LOCAL set

2021-01-29 Thread Alexander Bluhm
On Fri, Jan 29, 2021 at 10:53:09AM +1000, David Gwynne wrote: > > Are you sure that it does not break any use case? I have seen so > > much strange stuff. What is the advantage? > > The current behaviour is lucky at best, and quirky at worst. Usually I > would agree with you that breaking stuff

Improving the syspatch(8) and sysupgrade(8) test for the invoking user's privileges

2021-01-29 Thread Horia Racoviceanu
Hi, I noticed the syspatch(8) and sysupgrade(8) ksh scripts test if the invoking user has the right privileges i.e. (($(id -u) != 0)) The test for the effective user ID number can be bypassed in syspatch(8) and sysupgrade(8) by sh e.g. $ id -u 1000 $ sh /usr/sbin/sysupgrade -s

sndiod: Move controls out of the device structure, please test & review

2021-01-29 Thread Alexandre Ratchov
Moving to a global server-wide controls list is necessary to expose controls that are not associated to a particular device (ex. a device selector). The current hack to use the device-side sioctl_desc->addr variable as client-side key can't work anymore. So, we use a unique dynamically allocated

npppd(8)/pppac(4): remove dummy TUNSIFMODE ioctl(2) call

2021-01-29 Thread Vitaliy Makkoveev
Since OpenBSD 6.7 npppd(8) can't work over tun(4) anymore. I propose to remove dummy TUNSIFMODE ioctl(2) call. Index: sys/net/if_pppx.c === RCS file: /cvs/src/sys/net/if_pppx.c,v retrieving revision 1.106 diff -u -p -r1.106 if_pppx.c

Re: Improving the syspatch(8) and sysupgrade(8) test for the invoking user's privileges

2021-01-29 Thread Antoine Jacoutot
On Fri, Jan 29, 2021 at 03:31:10AM -0500, Horia Racoviceanu wrote: > Hi, > > I noticed the syspatch(8) and sysupgrade(8) ksh scripts test if the > invoking user has the right privileges i.e. (($(id -u) != 0)) > > The test for the effective user ID number can be bypassed in > syspatch(8) and

makemap(8): Parse aliases similar to expand_line

2021-01-29 Thread Martin Vahlensieck
Hi While browsing the smtpd(8) source I discovered that makemap(8) uses strsep(3) to split the alias lines at commas. This is different from other code which uses expand_line (which uses expand_line_split). This leads to contrived alias lines such as martin: "/usr/local/bin/weird_mda