libc/regex: more regular error handling

2020-12-30 Thread Miod Vallat
The REQUIRE macro is used to check for a condition, and set an error in the parse struct if it is not satisfied. This changes it from ((condition) || function call) to a, IMHO more readable, if() test. Index: regcomp.c === RCS file:

libc/regex: drop more unused data

2020-12-30 Thread Miod Vallat
re_guts catspace[] is only written to (via categories[]), and never used for anything, so don't bother keeping that. Index: lib/libc/regex/regcomp.c === RCS file: /OpenBSD/src/lib/libc/regex/regcomp.c,v retrieving revision 1.38 diff -

libc/regex: const'r'us

2020-12-30 Thread Miod Vallat
Spencer's code was written before const was a thing, but we can do better. Neither regcomp(3) nor regex(3) modify the strings they are being passed, so we can keep internal pointers as const as well and avoid {dub,spur}ious casts. While there, the temporary array in nonnewline() can be made static

httpd: free log_file in logger_close()

2020-12-30 Thread Theo Buehler
The access and error logs are never freed. They are leaked on sending USR1 to the parent, for example. Index: logger.c === RCS file: /cvs/src/usr.sbin/httpd/logger.c,v retrieving revision 1.22 diff -u -p -r1.22 logger.c --- logger.c

Re: fix examples/acme-client.conf

2020-12-30 Thread Florian Obser
On 31 December 2020 00:42:26 CET, Chris Bennett wrote: >Hi, >after spending several hours trying to find out what the problem was >with getting SSL to work properly again in Apache, I finally found the >problem. > >The -current and src versions are the same in /etc/examples, but >acme-client h

Re: login_passwd.c (etc.) and auth_mkvalue(3) returning NULL

2020-12-30 Thread Ross L Richardson
On Wed, Dec 30, 2020 at 09:08:53AM -0700, Todd C. Miller wrote: >[...] > Yes, that should be checked. In the case of login_passwd.c there > is really no reason to use auth_mkvalue(3) at all as there is nothing > that needs to be escaped. I think the simplest approach is to send > a reject message

Re: [PATCH] octeon.html dead links

2020-12-30 Thread Jordan Geoghegan
On 12/30/20 4:59 AM, Stuart Henderson wrote: > On 2020/12/30 00:12, Jordan Geoghegan wrote: >> Hello, >> >> I noticed some dead links on the octeon.html page for the Portwell and Rhino >> devices. >> >> The Portwell link has been pointed to archive.org and the Rhino links now >> point to correct

fix examples/acme-client.conf

2020-12-30 Thread Chris Bennett
Hi, after spending several hours trying to find out what the problem was with getting SSL to work properly again in Apache, I finally found the problem. The -current and src versions are the same in /etc/examples, but acme-client has changed. I looked in both places to see if I missed a change. Tu

compress sparc64 bsd.rd

2020-12-30 Thread Miod Vallat
Up until 6.5, sparc64 bsd.rd were gzipped kernels. This got lost during the Great Installation Media Unification of the 6.6 release cycle, and since then bsd.rd are uncompressed. The following diff ought to fix this and bring back sparc64 netboot times down to acceptable times. Index: miniroot/Ma

Re: make.1: sync variable substitution bits with NetBSD

2020-12-30 Thread Klemens Nanni
On Wed, Dec 30, 2020 at 07:12:58PM +0100, Marc Espie wrote: > I do think we want to write something specific for .for loop variables > which are actually very special compared to the rest. > > I'm not incredibly happy with the way netbsd explains it, not surprisingly. Do you want to work on this i

Re: make.1: sync variable substitution bits with NetBSD

2020-12-30 Thread Marc Espie
I do think we want to write something specific for .for loop variables which are actually very special compared to the rest. I'm not incredibly happy with the way netbsd explains it, not surprisingly.

tls_config_set_dheparams.3: more prominent list of DHE parameters

2020-12-30 Thread Klemens Nanni
Following the last commit, this ought to complete the page for consistency: better readable and tags for free. Feedback? Objections? OK? Index: tls_config_set_protocols.3 === RCS file: /cvs/src/lib/libtls/man/tls_config_set_protoco

Re: make.1: complete variable substitution bits

2020-12-30 Thread Klemens Nanni
On Sat, Dec 26, 2020 at 05:19:55PM +0100, Klemens Nanni wrote: > After that I'd like to expand it and explain behaviour for other types; > I've scratched my head on make's behaviour for too long and the manual > failed to cover this completely. Here is a minimal diff against our make.1, i.e. not o

Re: [diff] src/usr.sbin/smtpd: change process names

2020-12-30 Thread Giovanni Bechis
On 12/30/20 9:27 AM, Martijn van Duren wrote: > On Tue, 2020-12-29 at 08:57 +0100, Giovanni Bechis wrote: >> On 12/20/20 12:21 AM, gil...@poolp.org wrote: >>> December 19, 2020 11:26 PM, "Martijn van Duren" >>> wrote: >>> Personally I'd rather wait to keep the names in sync, especially since

Re: login_passwd.c (etc.) and auth_mkvalue(3) returning NULL

2020-12-30 Thread Todd C . Miller
On Wed, 30 Dec 2020 15:34:34 +1100, Ross L Richardson wrote: > auth_mkvalue(3) may return NULL (if no memory is available), but > login_passwd.c and friends use the return value without checking. Yes, that should be checked. In the case of login_passwd.c there is really no reason to use auth_mkv

uvm_fault: amap & anon locking

2020-12-30 Thread Martin Pieuchot
Diff below adds some locking to UVM's amap & anon data structures that should be enough to get the upper part of the fault handler out of the KERNEL_LOCK(). This diff doesn't unlock the fault handler, I'd suggest to do this in a later step on an arch by arch basis. This is a port of what exists i

Re: [diff] src/usr.sbin/smtpd: change process names

2020-12-30 Thread Todd C . Miller
On Wed, 30 Dec 2020 09:27:34 +0100, Martijn van Duren wrote: > On Tue, 2020-12-29 at 08:57 +0100, Giovanni Bechis wrote: > > On 12/20/20 12:21 AM, gil...@poolp.org wrote: > > > December 19, 2020 11:26 PM, "Martijn van Duren" alat.at> wrote: > > > > > > > Personally I'd rather wait to keep the na

Re: tls_config_parse_protocols.3: more prominent protocol list

2020-12-30 Thread Klemens Nanni
On Wed, Dec 30, 2020 at 08:30:38AM +0100, Theo Buehler wrote: > While I have no objection to doing something along these lines, I dislike > how "all" is singled out in this new list. It's really not recommended. > > I would just keep the order as it was (I see no issue with mentioning > aliases f

Re: [PATCH] octeon.html dead links

2020-12-30 Thread Stuart Henderson
On 2020/12/30 00:12, Jordan Geoghegan wrote: > Hello, > > I noticed some dead links on the octeon.html page for the Portwell and Rhino > devices. > > The Portwell link has been pointed to archive.org and the Rhino links now > point to correct URL after Rhino Labs changed their website around. Th

Fix pppoe_dispatch_disc_pkt definition to be in accordance with style(9)

2020-12-30 Thread Vitaliy Makkoveev
Subj. Index: sys/net/if_pppoe.c === RCS file: /cvs/src/sys/net/if_pppoe.c,v retrieving revision 1.74 diff -u -p -r1.74 if_pppoe.c --- sys/net/if_pppoe.c 30 Dec 2020 12:10:39 - 1.74 +++ sys/net/if_pppoe.c 30 Dec 2020 12:31:2

Re: Rename SIMPLEQ_ to STAILQ_, diff 1/7

2020-12-30 Thread Denis Fondras
Le Tue, Dec 29, 2020 at 12:36:22PM -0700, Todd C. Miller a écrit : > On Sat, 26 Dec 2020 15:07:36 -0700, "Theo de Raadt" wrote: > > > Well in that case this should still be a multistep process. > > > > Add STAILQ > > > > Convert things, including everything in ports > > > > No diff should change a

Re: libc/regex: safer pointer arithmetic

2020-12-30 Thread Theo Buehler
On Tue, Dec 29, 2020 at 06:03:36AM -0700, Todd C. Miller wrote: > On Tue, 29 Dec 2020 10:33:26 +, Miod Vallat wrote: > > > regcomp.c uses the "start + count < end" idiom to check that there are > > "count" bytes available in an array of char "start" and "end" both point > > to. > > > > This is

Re: [diff] src/usr.sbin/smtpd: change process names

2020-12-30 Thread Martijn van Duren
On Tue, 2020-12-29 at 08:57 +0100, Giovanni Bechis wrote: > On 12/20/20 12:21 AM, gil...@poolp.org wrote: > > December 19, 2020 11:26 PM, "Martijn van Duren" > > wrote: > > > > > Personally I'd rather wait to keep the names in sync, especially since > > > it's an easy 2 line diff that can easily

[PATCH] octeon.html dead links

2020-12-30 Thread Jordan Geoghegan
Hello, I noticed some dead links on the octeon.html page for the Portwell and Rhino devices. The Portwell link has been pointed to archive.org and the Rhino links now point to correct URL after Rhino Labs changed their website around. I've attached the patch rather that inlining it as I'm a

Re: [diff] src/usr.sbin/smtpd: change process names

2020-12-30 Thread Giovanni Bechis
On 12/20/20 12:21 AM, gil...@poolp.org wrote: > December 19, 2020 11:26 PM, "Martijn van Duren" > wrote: > >> Personally I'd rather wait to keep the names in sync, especially since >> it's an easy 2 line diff that can easily be incorperated in the bigger >> thing. But it's not something I'm goin