httpd: block return with a contentless status

2018-09-06 Thread Carlin Bingham
If httpd is configured to do "block return" with a 1xx or 204 status, it sends a response with a Content-Length header and a body, which per RFC 7230 it must not. The use case for this is a webapp which wants the webserver itself to be configured to return a 204 response for certain requests. I'm

newfs_ext2fs: lost+found ifdefs

2017-03-07 Thread Carlin Bingham
lost+found is always created and always has been, do the ifdefs need to stick around? -- Carlin Index: sbin/newfs_ext2fs/mke2fs.c === RCS file: /cvs/src/sbin/newfs_ext2fs/mke2fs.c,v retrieving revision 1.16 diff -u -p -u -r1.16 mke

Re: tls_config_parse_protocols vs httpd in snapshot

2017-01-05 Thread Carlin Bingham
On Thu, Jan 05, 2017 at 06:02:53PM -0500, Michael W. Lucas wrote: > > Hi, > > Something doesn't seem right between httpd.conf and > tls_config_parse_protocols. Running today's snapshot, but was first > attempted in the 15 Dec snapshot. > > httpd.conf(5) says to get TLS protocols from > tls_confi

Re: gmtime return value

2016-09-19 Thread Carlin Bingham
On Mon, Sep 19, 2016 at 06:48:32AM -0600, Todd C. Miller wrote: > Committed, thanks. > > - todd > Thanks. Is there any chance of this going into -stable? This was found because it was causing test failures in Tor and tor devs are worried that there might be some edge-cases where it can cause re

Re: gmtime return value

2016-09-19 Thread Carlin Bingham
Ping On Sat, Sep 10, 2016 at 06:54:48PM +1200, Carlin Bingham wrote: > If gmtime_r(3) fails it should return NULL, it currently returns a > pointer to the unitialised tm struct it was given. > > > -- > Carlin > > > > In

gmtime return value

2016-09-09 Thread Carlin Bingham
If gmtime_r(3) fails it should return NULL, it currently returns a pointer to the unitialised tm struct it was given. -- Carlin Index: lib/libc/time/localtime.c === RCS file: /cvs/src/lib/libc/time/localtime.c,v retrieving revisi

ps -o etime

2016-09-08 Thread Carlin Bingham
The "etime" keyword is currently an alias for "start". posix says it should be the amount of time since the program started running, in the format [[dd-]hh:]mm:ss, I've encountered some code that doesn't work on openbsd because that's what it expects. The commit that added this in '97 says it was f

Re: rebound: getpw pledge

2015-11-27 Thread Carlin Bingham
On Sat, 28 Nov 2015, at 09:31 AM, Theo de Raadt wrote: > > rebound wants getpw, as of kern_pledge.c 1.123 > > You must be running snapshots, which tricky bit in libc which tests > for "getpw" on non-YP systems. > > This diff will work, or the getpwnam use in rebound.c should be hoisted > up highe

rebound: getpw pledge

2015-11-27 Thread Carlin Bingham
rebound wants getpw, as of kern_pledge.c 1.123 Index: usr.sbin/rebound/rebound.c === RCS file: /cvs/src/usr.sbin/rebound/rebound.c,v retrieving revision 1.45 diff -u -p -u -r1.45 rebound.c --- usr.sbin/rebound/rebound.c 24 Nov 2015

Re: export directive in make

2015-11-10 Thread Carlin Bingham
On Wed, 11 Nov 2015, at 12:55 PM, Ted Unangst wrote: > Carlin Bingham wrote: > > GNU make and NetBSD's bmake (which is also used by FreeBSD) > > support this. > > > > This is based on the implementation from bmake. > > Do you have a makefile that needs this

export directive in make

2015-11-08 Thread Carlin Bingham
GNU make and NetBSD's bmake (which is also used by FreeBSD) support this. This is based on the implementation from bmake. Index: usr.bin/make/config.h === RCS file: /cvs/src/usr.bin/make/config.h,v retrieving revision 1.20 diff -u

httpd file descriptor leak when fcgi socket connection fails

2015-10-07 Thread Carlin Bingham
httpd running with fastcgi leaks the file descriptor if it opens the socket but fails to connect it. Can be demonstrated by starting httpd with a fastcgi config, opening a silly amount of sockets and throwing a bunch of requests at it (eg. with apache bench) so the connections fail. $ fstat | gre

Re: httpd: hsts (rfc 6797)

2015-07-17 Thread Carlin Bingham
On Sat, 18 Jul 2015, at 12:14 PM, Florian Obser wrote: > OK? > > diff --git httpd.conf.5 httpd.conf.5 > index b3eaad8..bfca29f 100644 > --- httpd.conf.5 > +++ httpd.conf.5 > @@ -262,6 +262,18 @@ root directory of > .Xr httpd 8 > and defaults to > .Pa /run/slowcgi.sock . > +.It Ic hsts Oo Ar opt

Re: keyboard and mouse problems

2015-03-12 Thread Carlin Bingham
On Thu, 12 Mar 2015, at 04:11 AM, Theo de Raadt wrote: > Two related problems regarding mice and keyboards came to my attention > during s2k15 in Brisbane and I worked with jcs@ on solutions. > > The first problem is some newer machines (such as the thinkpad x1) > have keyboard repeat or stutterin

Re: Authenticated TLS "contraints" in ntpd(8)

2015-02-11 Thread Carlin Bingham
On Wed, 11 Feb 2015, at 12:32 AM, Reyk Floeter wrote: > Let me share the answer to a question that I got in a private mail: > > > On Tue, Feb 10, 2015 at 10:55:53AM +0100, Reyk Floeter wrote: > >> ---snip--- > >> servers pool.ntp.org > >> constraints from "https://www.google.com/search?q=openntpd"

Re: httpd: redirect to https, or www, or non-www

2014-12-24 Thread Carlin Bingham
On Wed, 24 Dec 2014, at 11:03 PM, Stuart Henderson wrote: > On 2014/12/24 06:44, Carlin Bingham wrote: > > ngninx and apache support url rewriting, letting you redirect from > > arbitrary urls with pattern matching. In my experience the primary > > uses for this are to redire

httpd: redirect to https, or www, or non-www

2014-12-23 Thread Carlin Bingham
ngninx and apache support url rewriting, letting you redirect from arbitrary urls with pattern matching. In my experience the primary uses for this are to redirect from http to https or to remove/add www in the hostname, so I thought it might be useful to have options making these specific uses pos

rand()/random() warning

2014-12-16 Thread Carlin Bingham
There is no warning when compiling code that calls random() but two warnings when compiling code that calls rand() - : warning: random() may return determinstic values, is that what you want?warning: rand() may return determinstic values, is that what you want? Is the first parameter to __warn