Re: [PATCH] mfs improvements

2014-11-15 Thread bytevolcano
On Sat, 15 Nov 2014 19:27:11 -0700 (MST) Theo de Raadt wrote: > Nope. That is unsuitable use of issetugid. This is not a setuid > program. Revised diff below omits that change then. Index: sbin/newfs/newfs.c === RCS file: /cvs/

Re: mg(1): Second set of patches

2014-11-15 Thread Theo de Raadt
>Good idea. Please go for it, this MAX() was problematic at SunOS. SunOS portabibility is not relevant today.

Re: mg(1): Second set of patches

2014-11-15 Thread Kamil Rytarowski
> Sent: Sunday, November 16, 2014 at 1:27 AM > From: "Philip Guenther" > To: "Kamil Rytarowski" > Cc: tech@openbsd.org > Subject: Re: mg(1): Second set of patches > > > On Sat, 15 Nov 2014, Kamil Rytarowski wrote: > > I'm attaching two enhancements against mg(1): > > > > 0001-Include-limits.h-f

Re: mg(1) compatibility patches

2014-11-15 Thread Kamil Rytarowski
> Sent: Sunday, November 16, 2014 at 1:09 AM > From: "Philip Guenther" > To: "Kamil Rytarowski" > Cc: "Theo de Raadt" , tech-openbsd > , "Ted Unangst" > Subject: Re: mg(1) compatibility patches > > On Fri, Nov 14, 2014 at 3:16 PM, Kamil Rytarowski wrote: > ... > > Feel free to evaluate the res

Re: [PATCH] mfs improvements

2014-11-15 Thread Theo de Raadt
Nope. That is unsuitable use of issetugid. This is not a setuid program. > 2. Call and check issetugid() to ensure the information from getenv() > is safe to use. If not, default to _PATH_TMP. > > >Index: sbin/newfs/newfs.c >=== >RC

mount_tmpfs(8) MINOR man page correction

2014-11-15 Thread bytevolcano
The manual page for mount_tmpfs(8) states that it was included in OpenBSD 5.4, when the first -release with tmpfs was 5.5. Corrected in the following diff: Index: sbin/mount_tmpfs/mount_tmpfs.8 === RCS file: /cvs/src/sbin/mount_tmp

[PATCH] mfs improvements

2014-11-15 Thread bytevolcano
Based on feedback from others on this list while creating a tmpfs patch over a month ago, I have fixed some issues with mount_mfs: 1. Print out an error message if the template directory path is too long rather than just silently trucating it. 2. Call and check issetugid() to ensure the inform

Re: mg(1): Second set of patches

2014-11-15 Thread Philip Guenther
On Sat, 15 Nov 2014, Kamil Rytarowski wrote: > I'm attaching two enhancements against mg(1): > > 0001-Include-limits.h-for-INT_MIN-and-INT_MAX.patch > 0002-Comparison-of-array-bp-b_fname-not-equal-to-a-null-p.patch The latter patch was committed *months* ago. Please verify you're working from

Re: mg(1) compatibility patches

2014-11-15 Thread Philip Guenther
On Fri, Nov 14, 2014 at 3:16 PM, Kamil Rytarowski wrote: ... > Feel free to evaluate the rest of the patches (0002-0005), > as they are meant to be generic. With a couple, I've committed those. Thanks! Philip Guenther

Re: Missing include in sys/ipc.h

2014-11-15 Thread Philip Guenther
On Thu, Nov 13, 2014 at 10:31 PM, Brad Smith wrote: > ping. Discussion died out. Can we please move this issue forward? It's in Philip

vi: #include workarounds

2014-11-15 Thread Martin Natano
Remove #include workarounds; no binary change. cheers, natano Index: common/exf.c === RCS file: /cvs/src/usr.bin/vi/common/exf.c,v retrieving revision 1.32 diff -u -r1.32 exf.c --- common/exf.c14 Nov 2014 20:23:56 -

vi: cl_putchar

2014-11-15 Thread Martin Natano
The cl_putchar() function does nothing, but call putchar(). stacklevel-- cheers, natano Index: cl/cl_funcs.c === RCS file: /cvs/src/usr.bin/vi/cl/cl_funcs.c,v retrieving revision 1.17 diff -u -r1.17 cl_funcs.c --- cl/cl_funcs.c

mg(1): Second set of patches

2014-11-15 Thread Kamil Rytarowski
Hello, I'm attaching two enhancements against mg(1): 0001-Include-limits.h-for-INT_MIN-and-INT_MAX.patch 0002-Comparison-of-array-bp-b_fname-not-equal-to-a-null-p.patch Regards,>From f4a353e59af01b14455a6302e6309887b70796ba Mon Sep 17 00:00:00 2001 From: Kamil Rytarowski Date: Sat, 15 Nov 2014

Re: locate - change sizeof(char **) to sizeof(char *)

2014-11-15 Thread Nicolas Bedos
Ted Unangst wrote: > I think using sizeof(*dbv) would be the better idiom. Here's an updated diff, including Tobias Stoeckmann's fix. Index: src/usr.bin/locate/locate/util.c === RCS file: /cvs/src/usr.bin/locate/locate/util.c,v retr

vi: filemodes

2014-11-15 Thread Martin Natano
The S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH mode can be replaced by DEFFILEMODE. See the diff below; no binary change. cheers, natano Index: common/exf.c === RCS file: /cvs/src/usr.bin/vi/common/exf.c,v retrieving revision

Re: locate - change sizeof(char **) to sizeof(char *)

2014-11-15 Thread Ted Unangst
On Sat, Nov 15, 2014 at 18:42, Nicolas Bedos wrote: > In usr.bin/locate/locate/locate.c and util.c the variable dbv is defined > as a pointer to char * and is used to access the path to every database > provided to locate. E.g. when running > > locate -d /path/to/db1 -d /path/to/db2 -d /path/to/db

vi: mvchgat

2014-11-15 Thread Martin Natano
I missed this part of the workaround for a missing mvchgat(); no binary change. Index: cl/cl_funcs.c === RCS file: /cvs/src/usr.bin/vi/cl/cl_funcs.c,v retrieving revision 1.17 diff -u -r1.17 cl_funcs.c --- cl/cl_funcs.c 12 Nov 2

Re: locate - change sizeof(char **) to sizeof(char *)

2014-11-15 Thread patrick keshishian
On Sat, Nov 15, 2014 at 10:12:17AM -0800, patrick keshishian wrote: > On Sat, Nov 15, 2014 at 06:42:34PM +0100, Nicolas Bedos wrote: > > In usr.bin/locate/locate/locate.c and util.c the variable dbv is defined > > as a pointer to char * and is used to access the path to every database > > provided

Re: locate - change sizeof(char **) to sizeof(char *)

2014-11-15 Thread Tobias Stoeckmann
On Sat, Nov 15, 2014 at 06:42:34PM +0100, Nicolas Bedos wrote: > dbv = malloc(sizeof(char **)) > > which I believe should be > > dbv = malloc(sizeof(char *)) Correct. While at it, we should also fix the examples in the comment. Tobias Index: util.c ==

Re: locate - change sizeof(char **) to sizeof(char *)

2014-11-15 Thread patrick keshishian
On Sat, Nov 15, 2014 at 06:42:34PM +0100, Nicolas Bedos wrote: > In usr.bin/locate/locate/locate.c and util.c the variable dbv is defined > as a pointer to char * and is used to access the path to every database > provided to locate. E.g. when running > > locate -d /path/to/db1 -d /path/to

locate - change sizeof(char **) to sizeof(char *)

2014-11-15 Thread Nicolas Bedos
In usr.bin/locate/locate/locate.c and util.c the variable dbv is defined as a pointer to char * and is used to access the path to every database provided to locate. E.g. when running locate -d /path/to/db1 -d /path/to/db2 -d /path/to/db3 * *dbv points to '/path/to/db1' *(dbv+1) points

Re: VPLS patch [0/3]: introduction

2014-11-15 Thread David Gwynne
> On 15 Nov 2014, at 3:40 am, Stuart Henderson wrote: > > On 2014/11/14 15:24, Rafael Zalamena wrote: >> On Fri, Nov 14, 2014 at 05:41:32PM +0100, Mike Belopuhov wrote: >>> >>> is it possible to call it something other than just wire(4)? >>> vpls maybe? >> >> pseudowire(4) then? (looks long to

vi: the LIBRARY is a lie

2014-11-15 Thread Martin Natano
The LIBRARY define is undocumenteed and triggers the same conditional inclusions as PURIFY does. See the diff below, no binary change. cheers, natano Index: cl/cl_main.c === RCS file: /cvs/src/usr.bin/vi/cl/cl_main.c,v retrieving r

use siphash to protect the mroute hash

2014-11-15 Thread David Gwynne
i have no idea how to test this. tests? oks? Index: ip_mroute.c === RCS file: /cvs/src/sys/netinet/ip_mroute.c,v retrieving revision 1.71 diff -u -p -r1.71 ip_mroute.c --- ip_mroute.c 30 Sep 2014 12:54:22 - 1.71 +++ ip_mrout

vi: perl api

2014-11-15 Thread Martin Natano
When building vi with PERLINTERP=yes the build errors out with the following message: /usr/src/usr.bin/vi/build/../ex/ex_perl.c: In function 'ex_perl': /usr/src/usr.bin/vi/build/../ex/ex_perl.c:59: error: implicit declaration of function 'perl_ex_perl' /usr/src/usr.bin/vi/build/../ex/ex_perl.c:60

vi: stale prototype

2014-11-15 Thread Martin Natano
The sscr_pty() function has been removed in r1.18. Let's kill the remaining prototype. cheers, natano Index: ex/ex_script.c === RCS file: /cvs/src/usr.bin/vi/ex/ex_script.c,v retrieving revision 1.21 diff -u -r1.21 ex_script.c --- e