Re: operations on nd_prefix list must take rdomain into account

2015-01-12 Thread Martin Pieuchot
On 26/11/14(Wed) 18:24, Mike Belopuhov wrote: More rdomain checks are needed to be able to use the same subnet in a back to back connection between IPv6 rdomains as pointed out by mpi@. OK? ok mpi@ diff --git sys/netinet6/nd6.c sys/netinet6/nd6.c index 9616187..d704cd6 100644 ---

httpd with fcgi send garbage after non-chunked response

2015-01-12 Thread Erik Lax
Hi, In the case where httpds fcgi module handles the end marker, it should abort if fcgi_chunked is not true. Now it sends 8 bytes of garbage after each request (it's often NUL terminated so it doesn't seem to show up in browsers). This patched fixed it for me. Index:

Re: ftp proxy host header

2015-01-12 Thread Alexander Bluhm
On Mon, Jan 12, 2015 at 01:04:14PM +, Stuart Henderson wrote: Good catch, definition for *proxyhost needs to go outside the #ifndef. Thanks, new diff: Index: usr.bin/ftp/fetch.c === RCS file:

Re: ntpd: prefer sizeof(thing) to sizeof(struct type)

2015-01-12 Thread Brent Cook
On Fri, Jan 09, 2015 at 05:45:17PM -0500, Ted Unangst wrote: On Fri, Jan 09, 2015 at 15:45, Brent Cook wrote: From: Brent Cook bust...@gmail.com Yeah yeah, a pointer is a pointer (except when it isn't :). I think this looks nicer, since idx2peer is really the thing we're allocating to.

Re: ntpd: fix some memory leaks in dns handling

2015-01-12 Thread Brent Cook
Fri, Jan 09, 2015 at 03:32:37PM -0700, Todd C. Miller wrote: On Fri, 09 Jan 2015 15:45:51 -0600, Brent Cook wrote: - If imsg_add fails, it frees buf. But, so does imsg_close. Punt for now and just die if imsg_add fails (maybe this should be handled more nicely?) I think it makes

Re: ftp proxy host header

2015-01-12 Thread Stuart Henderson
On 2015/01/12 13:51, Jérémie Courrèges-Anglas wrote: Stuart Henderson st...@openbsd.org writes: On 2015/01/12 12:35, Alexander Bluhm wrote: Hi, Fetching port distfiles with ftp from githup does not work when using a https proxy. The problem is that the http Host header is not not

Re: ftp proxy host header

2015-01-12 Thread Martin Pieuchot
On 12/01/15(Mon) 14:22, Alexander Bluhm wrote: On Mon, Jan 12, 2015 at 01:04:14PM +, Stuart Henderson wrote: Good catch, definition for *proxyhost needs to go outside the #ifndef. Thanks, new diff: Awesome, I can now run fw_update(1) behind our broken proxy. ok with me. Index:

Re: better implicit warnings in kernel

2015-01-12 Thread Alexander Bluhm
On Thu, Jan 08, 2015 at 07:00:30PM -0500, Ted Unangst wrote: I think -Wimplicit-function-declaration is a better fit for the desired warning here. We don't want implicit function declarations. This is the same warning we recently added to userland in a few places. -Wstrict-prototypes was

Re: Sending route messages for local routes or cloning routes

2015-01-12 Thread Martin Pieuchot
On 07/01/15(Wed) 19:00, Florian Riehm wrote: Hi Martin, Thanks for your diff! Regardless of my problem it makes our code more clear. The loop in rt_newaddrmsg() was ugly. Here's a diff that should generate a RTM_ADD message for every CLONING route added while keeping the existing

ftp proxy host header

2015-01-12 Thread Alexander Bluhm
Hi, Fetching port distfiles with ftp from githup does not work when using a https proxy. The problem is that the http Host header is not not set and githup.com needs that. So remember the host form the url and write it into the http request. Also write the http request into the debugging output

openssl c_lient http proxy

2015-01-12 Thread Alexander Bluhm
Hi, I have always missed the possiblility to use the openssl c_lient tool with an http proxy. So I implemented a -proxy feature in the same hackish way as -starttls. Do we want that option? bluhm Index: usr.bin/openssl/s_client.c

Re: ftp proxy host header

2015-01-12 Thread David Coppa
On Mon, Jan 12, 2015 at 1:39 PM, Stuart Henderson st...@openbsd.org wrote: On 2015/01/12 12:35, Alexander Bluhm wrote: Hi, Fetching port distfiles with ftp from githup does not work when using a https proxy. The problem is that the http Host header is not not set and githup.com needs that.

Re: ftp proxy host header

2015-01-12 Thread Jérémie Courrèges-Anglas
Stuart Henderson st...@openbsd.org writes: On 2015/01/12 12:35, Alexander Bluhm wrote: Hi, Fetching port distfiles with ftp from githup does not work when using a https proxy. The problem is that the http Host header is not not set and githup.com needs that. So remember the host form

Re: ftp proxy host header

2015-01-12 Thread Stuart Henderson
On 2015/01/12 12:35, Alexander Bluhm wrote: Hi, Fetching port distfiles with ftp from githup does not work when using a https proxy. The problem is that the http Host header is not not set and githup.com needs that. So remember the host form the url and write it into the http request.

Re: Kill IPv4 list of addresses

2015-01-12 Thread Mike Belopuhov
On 6 January 2015 at 13:26, Martin Pieuchot mpieuc...@nolizard.org wrote: Diff below remove the last use of the global IPv4 list of addresses. The code using it is a hack to move the unique cloning route of a subnet from one ifa to another. I know a proper fix would be to use multipath for

Re: Sending route messages for local routes or cloning routes

2015-01-12 Thread Alexander Bluhm
On Mon, Jan 12, 2015 at 03:00:41PM +0100, Martin Pieuchot wrote: @@ -1138,7 +1140,8 @@ rt_ifa_add(struct ifaddr *ifa, int flags * userland that a new address has been added. */ if (flags RTF_LOCAL) - rt_newaddrmsg(RTM_ADD, ifa,

Re: ntpd: prefer sizeof(thing) to sizeof(struct type)

2015-01-12 Thread Reyk Floeter
On Mon, Jan 12, 2015 at 09:02:50AM -0600, Brent Cook wrote: On Fri, Jan 09, 2015 at 05:45:17PM -0500, Ted Unangst wrote: On Fri, Jan 09, 2015 at 15:45, Brent Cook wrote: From: Brent Cook bust...@gmail.com Yeah yeah, a pointer is a pointer (except when it isn't :). I think this

Re: ntpd: fix some memory leaks in dns handling

2015-01-12 Thread Todd C. Miller
On Mon, 12 Jan 2015 09:12:02 -0600, Brent Cook wrote: - Nothing seems to free the result of host_dns(), so add host_dns_free() and call after each query. - If imsg_add fails, it frees buf. Avoid dereferencing the freed buf afterward in imsg_close(). That looks good to me. - todd

Re: ntpd: prefer sizeof(thing) to sizeof(struct type)

2015-01-12 Thread Theo de Raadt
- if ((p-query = calloc(1, sizeof(struct ntp_query))) == NULL) + if ((p-query = calloc(1, sizeof(*(p-query == NULL) I do not think the replacement pattern is better in any way.

Re: env fix

2015-01-12 Thread Todd C. Miller
On Mon, 12 Jan 2015 14:11:19 -0500, Ted Unangst wrote: Alas, the posix spec for env doesn't require that arguments be correctly formatted environment variables. There is no such thing as a correctly formatted environment variable. The restrictions are only for *shell* variables. The shell is

Re: env fix

2015-01-12 Thread Ted Unangst
On Sun, Jan 11, 2015 at 23:17, Jérémie Courrèges-Anglas wrote: Philip Guenther guent...@gmail.com writes: On Sun, 11 Jan 2015, Ted Unangst wrote: Even more awesome. How about enforcing the full rule? IIUC the first diff removed '/' from the characters allowed in an environment variable,

Re: pax: directory traversal (from CVE request)

2015-01-12 Thread Daniel Cegiełka
2015-01-12 20:48 GMT+01:00 Ted Unangst t...@tedunangst.com: On Mon, Jan 12, 2015 at 19:58, Daniel Cegiełka wrote: http://www.openwall.com/lists/oss-security/2015/01/07/5 Does someone can confirm this vulnerability? It's probably the problem of OpenBSD-derived (?) pax. The following is

Re: env fix

2015-01-12 Thread Todd C. Miller
On Mon, 12 Jan 2015 12:14:51 -0700, Theo de Raadt wrote: How about this? Makes sense to me. OK millert@ - todd

Only replace /obsd if /bsd changed

2015-01-12 Thread Simon Nicolussi
Hello, /bsd currently replaces /obsd upon installation of a new kernel. That's not a problem under normal circumstances, but if one accidentally issues make install twice, /obsd will be the same as the new (i.e., potentially unbootable) /bsd kernel. How about leaving /obsd alone if /bsd didn't

Re: Only replace /obsd if /bsd changed

2015-01-12 Thread Theo de Raadt
Oh so someone actually uses the install target? I've been thinking about deleting it

Re: Only replace /obsd if /bsd changed

2015-01-12 Thread Ted Unangst
On Tue, Jan 13, 2015 at 00:39, Simon Nicolussi wrote: Theo de Raadt wrote: Oh so someone actually uses the install target? I've been thinking about deleting it First the powerdown= feature, now this. I seem to have a hidden talent for using just the things you're ripping out. Oh well,

Re: Only replace /obsd if /bsd changed

2015-01-12 Thread sven falempin
On Mon, Jan 12, 2015 at 6:04 PM, Theo de Raadt dera...@cvs.openbsd.org wrote: Oh so someone actually uses the install target? I've been thinking about deleting it when testing small things I sometimes use make install instead of cp ... . --

Re: Only replace /obsd if /bsd changed

2015-01-12 Thread Simon Nicolussi
Theo de Raadt wrote: Oh so someone actually uses the install target? I've been thinking about deleting it First the powerdown= feature, now this. I seem to have a hidden talent for using just the things you're ripping out. Oh well, in that case: Index: faq/faq5.html

Re: Only replace /obsd if /bsd changed

2015-01-12 Thread David Hill
On Mon, Jan 12, 2015 at 07:49:32PM -0500, Ted Unangst wrote: On Tue, Jan 13, 2015 at 00:39, Simon Nicolussi wrote: Theo de Raadt wrote: Oh so someone actually uses the install target? I've been thinking about deleting it First the powerdown= feature, now this. I seem to have a

mg: remove contp variable from cmode.c

2015-01-12 Thread Brian Callahan
Hi everyone -- In mg's cmode.c getindent() it looks like there's a contp variable that gets initialized and we set it back and forth between FALSE and TRUE a few times. But we never actually do anything with it. This diff removes it. OK? ~Brian Index: cmode.c

Re: axen(4): use %zu modifier for size_t in DPRINTF

2015-01-12 Thread Stefan Sperling
On Mon, Jan 12, 2015 at 06:56:37PM +0100, Fabian Raetz wrote: Hi, this fixes the build with AXEN_DEBUG defined for me. Trailing whitespace removed while here. Regards, Fabian Index: if_axen.c === RCS file:

axen(4): use %zu modifier for size_t in DPRINTF

2015-01-12 Thread Fabian Raetz
Hi, this fixes the build with AXEN_DEBUG defined for me. Trailing whitespace removed while here. Regards, Fabian Index: if_axen.c === RCS file: /cvs/src/sys/dev/usb/if_axen.c,v retrieving revision 1.9 diff -u -p -r1.9 if_axen.c ---

Re: ntpd: prefer sizeof(thing) to sizeof(struct type)

2015-01-12 Thread Ted Unangst
On Mon, Jan 12, 2015 at 11:15, Brent Cook wrote: Would this more appropriately-scoped patch be OK? Looks reasonable to me.

Re: ntpd: prefer sizeof(thing) to sizeof(struct type)

2015-01-12 Thread Brent Cook
On Mon, Jan 12, 2015 at 05:44:20PM +0100, Reyk Floeter wrote: On Mon, Jan 12, 2015 at 09:02:50AM -0600, Brent Cook wrote: On Fri, Jan 09, 2015 at 05:45:17PM -0500, Ted Unangst wrote: On Fri, Jan 09, 2015 at 15:45, Brent Cook wrote: From: Brent Cook bust...@gmail.com Yeah yeah, a

spamd-setup bug parsing non-CIDR IPs

2015-01-12 Thread Todd C. Miller
Both single IP addresses and ranges suffer from an off-by one error. The range is inclusive so the end address should not be incremented by one. Compare how 212.174.194.30/32 is parsed vs. 212.174.194.30 or 212.174.194.30-212.174.194.30. In cidr2range() we have: *start = cidr.addr;