Re: httpd rewrites with Lua's pattern matching

2015-06-23 Thread Reyk Floeter
On Tue, Jun 23, 2015 at 10:25:36AM -0400, trondd wrote: On Sun, June 21, 2015 10:01 am, Reyk Floeter wrote: location match '^/page/(%d+)' { block return 302 /index.cgi?page=%1' } So I was playing with the below config, then figured out it's not coded

Re: httpd rewrites with Lua's pattern matching

2015-06-23 Thread Sebastien Marie
On Tue, Jun 23, 2015 at 04:20:58PM +0200, Reyk Floeter wrote: On Sat, Jun 20, 2015 at 03:01:18PM +0200, Reyk Floeter wrote: Comments? OK? This diff includes some fixes from semarie@. We also have regress tests that will go in separately. We'd like to continue in the tree. OK?

Re: httpd rewrites with Lua's pattern matching

2015-06-23 Thread trondd
On Sun, June 21, 2015 10:01 am, Reyk Floeter wrote: location match '^/page/(%d+)' { block return 302 /index.cgi?page=%1' } So I was playing with the below config, then figured out it's not coded to capture on 'server match'. I want to redirect anything I get

Re: Stop G/C mbufs in if_detach()

2015-06-23 Thread Claudio Jeker
On Tue, Jun 23, 2015 at 03:01:54PM +0200, Martin Pieuchot wrote: When an interface is detached or destroyed the CPU executing if_detach() removes all the mbufs received by this interface on three queues: ARP, IPv4 and IPv6 protocol queues. This made sense to avoid referencing a dangling

Re: httpd rewrites with Lua's pattern matching

2015-06-23 Thread Reyk Floeter
On Sat, Jun 20, 2015 at 03:01:18PM +0200, Reyk Floeter wrote: Comments? OK? This diff includes some fixes from semarie@. We also have regress tests that will go in separately. We'd like to continue in the tree. OK? Reyk Index: Makefile

Stop G/C mbufs in if_detach()

2015-06-23 Thread Martin Pieuchot
When an interface is detached or destroyed the CPU executing if_detach() removes all the mbufs received by this interface on three queues: ARP, IPv4 and IPv6 protocol queues. This made sense to avoid referencing a dangling rcvif pointer. But now mbufs contain unique interface indexes and protocol

[patch] httpd: escape matched substring

2015-06-23 Thread Sebastien Marie
On Tue, Jun 23, 2015 at 04:54:22PM +0200, Sebastien Marie wrote: the matched substrings should be escaped with url_encoded() before expansion. Here the patch to address the escaping problem. OK? -- Sebastien Marie Index: server_http.c

Re: [patch] httpd: escape matched substring

2015-06-23 Thread Reyk Floeter
On Tue, Jun 23, 2015 at 06:03:48PM +0200, Sebastien Marie wrote: On Tue, Jun 23, 2015 at 04:54:22PM +0200, Sebastien Marie wrote: the matched substrings should be escaped with url_encoded() before expansion. Here the patch to address the escaping problem. OK? Yes, OK Reyk --

Re: httpd rewrites with Lua's pattern matching

2015-06-23 Thread trondd
On Tue, June 23, 2015 11:28 am, Reyk Floeter wrote: It is just not done yet. As I said, we're improving the interface. But this doesn't affect the initial implementation itself. Reyk Ok, thanks. I think I have a 'location match' use case I can play with, too. Tim.

Re: [patch]rcs: mark unlink as (void)

2015-06-23 Thread Fritjof Bornebusch
On Mon, Jun 15, 2015 at 09:56:18PM +0200, Fritjof Bornebusch wrote: Ping Hi tech@, mark this unlink(2) call as *(void)*, as there is no need to check the return value. This makes it more consistent to all other unlink(2) calls, since they are marked as *(void)* as well.

Re: [patch]rcs: usage functions above the main ones

2015-06-23 Thread Fritjof Bornebusch
On Mon, Jun 15, 2015 at 11:42:10AM +0100, Nicholas Marriott wrote: this seems fine to me Ping On Sun, Jun 14, 2015 at 10:38:40PM +0200, Fritjof Bornebusch wrote: Hi tech@, most of the tools implements the *usage* function above the *main* function. This patch makes it more

Re: explicit_bzero in pkcs5_pbkdf2

2015-06-23 Thread Jean-Philippe Ouellet
I now realize this may have been ignored simply because the clock on the sending machine was horribly off and many people sort mail by date. So... Should this go in? Am I missing something? On Thu, Apr 30, 2015 at 06:03:23PM -0400, Jean-Philippe Ouellet wrote: The intermediate values calculated

Re: httpd rewrites with Lua's pattern matching

2015-06-23 Thread Jean-Philippe Ouellet
On Sat, Jun 20, 2015 at 03:01:18PM +0200, Reyk Floeter wrote: there is some great interest in getting support for rewrites What do people think of something like our tftpd(8)'s -r -r socket Issue filename rewrite requests to the specified UNIX domain socket. tftpd will

Re: httpd rewrites with Lua's pattern matching

2015-06-23 Thread Reyk Floeter
On Tue, Jun 23, 2015 at 02:40:48PM -0400, Jean-Philippe Ouellet wrote: On Sat, Jun 20, 2015 at 03:01:18PM +0200, Reyk Floeter wrote: there is some great interest in getting support for rewrites What do people think of something like our tftpd(8)'s -r -r socket Issue filename

Re: [diff] trivia: change xorl = xorq

2015-06-23 Thread Mike Larkin
On Tue, Jun 23, 2015 at 09:49:26AM +0300, Alexey Dobriyan wrote: Clearing 32-bit register clears whole register, save REX prefix. I see nothing documented in the Intel SDM that says this. Can you cite a reference to support this claim? An aside - even if this were true, I still prefer xorq and

Re: [diff] trivia: change xorl = xorq

2015-06-23 Thread Philip Guenther
On Tue, Jun 23, 2015 at 1:18 PM, Mike Larkin mlar...@azathoth.net wrote: On Tue, Jun 23, 2015 at 09:49:26AM +0300, Alexey Dobriyan wrote: Clearing 32-bit register clears whole register, save REX prefix. I see nothing documented in the Intel SDM that says this. Can you cite a reference to

pkg_info: print used repos

2015-06-23 Thread Jean-Philippe Ouellet
This adds a -p option to pkg_info to show the PackageRepositorys being used. Inspired by trying to parse /etc/pkg.conf with some awk and quickly realized that was the wrong way to solve my problem. I then wrote some perl that reached into OpenBSD:: internals, but concluded it'd be much cleaner

ls(1): Missing fts_close(3)

2015-06-23 Thread Masao Uebayashi
ls(1) omits fts_close(3) after fts_open(3), resulting in an FD leak. Found by Valgrind. Index: bin/ls/ls.c === RCS file: /cvs/src/bin/ls/ls.c,v retrieving revision 1.40 diff -u -p -r1.40 ls.c --- bin/ls/ls.c 18 Apr 2015 18:28:36

Re: ls(1): Missing fts_close(3)

2015-06-23 Thread Ingo Schwarze
Hi, Masao Uebayashi wrote on Wed, Jun 24, 2015 at 12:16:35PM +0900: ls(1) omits fts_close(3) after fts_open(3), resulting in an FD leak. Found by Valgrind. As far as i can see, the code is correct, there doesn't seem to be a leak. The function traverse() is static and only called at the very

Re: ls(1): Missing fts_close(3)

2015-06-23 Thread Ingo Schwarze
Hi, the file ls/main.c is a joke. Minus one file, minus 15 lines of code, no functional change. OK? Ingo Index: Makefile === RCS file: /cvs/src/bin/ls/Makefile,v retrieving revision 1.7 diff -u -p -r1.7 Makefile --- Makefile

Re: ls(1): Missing fts_close(3)

2015-06-23 Thread Theo de Raadt
the file ls/main.c is a joke. Minus one file, minus 15 lines of code, no functional change. OK? No, because commiting that would break the tree. Get ready for a shock.

Re: ls(1): Missing fts_close(3)

2015-06-23 Thread Theo de Raadt
Masao Uebayashi wrote on Wed, Jun 24, 2015 at 12:16:35PM +0900: ls(1) omits fts_close(3) after fts_open(3), resulting in an FD leak. Found by Valgrind. As far as i can see, the code is correct, there doesn't seem to be a leak. There is an ABI misuse; which creates what is a

[diff] trivia: change xorl = xorq

2015-06-23 Thread Alexey Dobriyan
Clearing 32-bit register clears whole register, save REX prefix. Index: arch/amd64/amd64/acpi_wakecode.S === RCS file: /cvs/src/sys/arch/amd64/amd64/acpi_wakecode.S,v retrieving revision 1.35 diff -u -p -u -r1.35 acpi_wakecode.S ---

isblank(3) STANDARDS

2015-06-23 Thread Anthony J. Bentley
ok? Index: lib/libc/gen/isblank.3 === RCS file: /cvs/src/lib/libc/gen/isblank.3,v retrieving revision 1.11 diff -u -p -r1.11 isblank.3 --- lib/libc/gen/isblank.3 6 Jul 2013 17:31:20 - 1.11 +++ lib/libc/gen/isblank.3

Re: Machine hangs on boot with snapshots 5.8-beta

2015-06-23 Thread Mark Kettenis
Date: Tue, 23 Jun 2015 11:59:39 +0100 From: Pedro Caetano pedrocaet...@binaryflows.com Hi, I'm currently testing -current snapshots (tagged 5.8-beta) on an hp dl320 gen8 and the machine panics with the following message: panic: null acpicpu Stopped at Debugger+0x9: leave If

Machine hangs on boot with snapshots 5.8-beta

2015-06-23 Thread Pedro Caetano
Hi, I'm currently testing -current snapshots (tagged 5.8-beta) on an hp dl320 gen8 and the machine panics with the following message: panic: null acpicpu Stopped at Debugger+0x9: leave If i boot with an older kernel (5.7 -current snapshot) and disable acpiprt (via config -ef /bsd) the

Re: ls(1): Missing fts_close(3)

2015-06-23 Thread Ingo Schwarze
Ouch. Theo de Raadt wrote on Tue, Jun 23, 2015 at 09:40:57PM -0600: Ingo Schwarze wrote: the file ls/main.c is a joke. Minus one file, minus 15 lines of code, no functional change. OK? No, because commiting that would break the tree. Get ready for a shock. Indeed:

PackageRepositoryList - kill dead code

2015-06-23 Thread Jean-Philippe Ouellet
This is no longer used anywhere, and even crashes if you try to call it. Besides, OpenBSD::PackageRepository::Source was removed almost a year ago. Index: PackageRepositoryList.pm === RCS file:

Re: interfaces and priorities for relayd routers

2015-06-23 Thread David Gwynne
On 22 Jun 2015, at 18:20, Reyk Floeter r...@openbsd.org wrote: Hi, On Thu, May 14, 2015 at 09:44:22PM +1000, David Gwynne wrote: i want relayd to check teh availability of some services and inject routes when the service is available. if it is available, i want to advertise the routes

Remove broken and wrong PKG_PATH output from pkg_info -vQ

2015-06-23 Thread Jean-Philippe Ouellet
The idea was to print the package repository used followed by the stuff found in it, but that doesn't work: $ pkg_info -vQ foo Use of uninitialized value $ENV{PKG_PATH} in concatenation (.) or string at /usr/libdata/perl5/OpenBSD/PkgInfo.pm line 604. PKG_PATH= foo2zjs-20140627