Re: [PATCH] make 'set +o' useful and POSIX compatible

2016-03-06 Thread Stuart Henderson
On 2016/03/06 10:56, Martin Natano wrote: > On Sun, Mar 06, 2016 at 05:32:16AM +0100, Martijn Dekker wrote: > > This simple patch makes 'set +o' compatible with the POSIX spec. > > Makes sense to me. However, I'm somewhat concerned this might break > existing shell scripts. Anyone here have a

Re: [PATCH] make 'set +o' useful and POSIX compatible

2016-03-06 Thread Robert Peichaer
On Sun, Mar 06, 2016 at 10:56:45AM +0100, Martin Natano wrote: > On Sun, Mar 06, 2016 at 05:32:16AM +0100, Martijn Dekker wrote: > > The command 'set -o' shows the current shell options in an unspecified > > format. Less well-known is the variant 'set +o', which should output the > > current shell

Re: [PATCH] make 'set +o' useful and POSIX compatible

2016-03-06 Thread Martin Natano
> Index: bin/ksh/misc.c > === > RCS file: /cvs/src/bin/ksh/misc.c,v > retrieving revision 1.53 > diff -u -p -u -r1.53 misc.c > --- bin/ksh/misc.c21 Dec 2015 04:57:50 - 1.53 > +++ bin/ksh/misc.c6 Mar 2016 04:27:20

Re: [PATCH] make 'set +o' useful and POSIX compatible

2016-03-06 Thread Martin Natano
On Sun, Mar 06, 2016 at 05:32:16AM +0100, Martijn Dekker wrote: > The command 'set -o' shows the current shell options in an unspecified > format. Less well-known is the variant 'set +o', which should output the > current shell options "in a format that is suitable for reinput to the > shell as

arm: dmamap_destroy: remove explicit unload of map

2016-03-06 Thread Tobias Ulmer
map is passed straight into free where it gets overwritten with junk. No other arch makes map invalid before free, and my N2100 didn't suddenly misbehave either. ok? Index: arch/arm/arm/bus_dma.c === RCS file:

Re: The Case of Lost TM_ZONE

2016-03-06 Thread Vadim Zhukov
2016-03-06 1:23 GMT+03:00 Christian Weisgerber : > > It looks like decided to use TM_ZONE as a wrapper for tm.tm_zone, > > until the tm_zone is gone. So, until the later happens (I found > > no usage of tm_zone in base, BTW), we should at least use TM_ZONE > > consistently.

Re: KASSERT() @ pf_test() is back

2016-03-06 Thread Mattieu Baptiste
On Sun, Mar 6, 2016 at 10:22 PM, Martin Pieuchot wrote: > On 06/03/16(Sun) 19:57, Mattieu Baptiste wrote: >> [...] >> As discussed in january, with the patches committed, -current still >> panics for me: >> http://www.brimbelle.org/mattieu/stuff/panic_statekey/panic10.jpg >>

Re: amd64: foo() -> foo(void)

2016-03-06 Thread Mark Kettenis
> Date: Sun, 6 Mar 2016 23:08:11 +0100 > From: Christian Weisgerber > > Match (and fix) the function declarations. > > PS: I'll do i386 and sparc64, too. ok kettenis@ > Index: amd64/consinit.c > === > RCS

amd64: foo() -> foo(void)

2016-03-06 Thread Christian Weisgerber
Match (and fix) the function declarations. PS: I'll do i386 and sparc64, too. Index: amd64/consinit.c === RCS file: /cvs/src/sys/arch/amd64/amd64/consinit.c,v retrieving revision 1.5 diff -u -p -r1.5 consinit.c --- amd64/consinit.c

i386: foo() -> foo(void)

2016-03-06 Thread Christian Weisgerber
Sync no-argument function declaration and definition by adding (void). Index: i386/bios.c === RCS file: /cvs/src/sys/arch/i386/i386/bios.c,v retrieving revision 1.114 diff -u -p -r1.114 bios.c --- i386/bios.c 20 Feb 2016 19:59:01

[patch] telnet: stored value never read

2016-03-06 Thread fritjof
Hi tech@, the value stored in "old" is never read. --F. Index: sys_bsd.c === RCS file: /cvs/src/usr.bin/telnet/sys_bsd.c,v retrieving revision 1.31 diff -u -r1.31 sys_bsd.c --- sys_bsd.c 29 Nov 2015 14:18:40 - 1.31 +++

Re: KASSERT() @ pf_test() is back

2016-03-06 Thread Martin Pieuchot
On 06/03/16(Sun) 19:57, Mattieu Baptiste wrote: > [...] > As discussed in january, with the patches committed, -current still > panics for me: > http://www.brimbelle.org/mattieu/stuff/panic_statekey/panic10.jpg > http://www.brimbelle.org/mattieu/stuff/panic_statekey/panic11.jpg >

Re: KASSERT() @ pf_test() is back

2016-03-06 Thread Martin Pieuchot
On 06/03/16(Sun) 22:35, Mattieu Baptiste wrote: > On Sun, Mar 6, 2016 at 10:22 PM, Martin Pieuchot wrote: > > On 06/03/16(Sun) 19:57, Mattieu Baptiste wrote: > >> [...] > >> As discussed in january, with the patches committed, -current still > >> panics for me: > >>

Re: proc.h: update PID_MAX after sys/compat is gone

2016-03-06 Thread Philip Guenther
On Sun, Mar 6, 2016 at 6:57 AM, Michal Mazurek wrote: > intro.2 needs updating as well: ... > .It Process ID > Each active process in the system is uniquely identified by a non-negative > integer called a process ID. > -The range of this ID is from 1 to 32766. > +The range

Re: Merge db_elf_sym_values() into db_symbol_values()

2016-03-06 Thread Martin Pieuchot
On 02/03/16(Wed) 11:51, Martin Pieuchot wrote: > Or is it the other way around? > > ok? Anyone? > > Index: ddb/db_elf.c > === > RCS file: /cvs/src/sys/ddb/db_elf.c,v > retrieving revision 1.19 > diff -u -p -r1.19 db_elf.c > ---

mips64 trap_frame -> trapframe

2016-03-06 Thread Martin Pieuchot
To unify our archs and to expose this structure in MI code without having another layer of abstraction, I'd like to rename it. ok? Index: loongson/dev/bonito.c === RCS file: /cvs/src/sys/arch/loongson/dev/bonito.c,v retrieving

nologin(8) overhaul

2016-03-06 Thread Benjamin Baier
A /usr/bin/false vs. /sbin/nologin argument led me to nologin(8) so here are some suggestions. - de-lint - return instead of exit() - no need to tell an *possible evil* ssh user that pledge(2) failed - some more churn/clean up Greetings Ben Index: nologin.c

Re: rdist.c patch

2016-03-06 Thread Edgar Pettijohn
On 03/06/16 00:12, Philip Guenther wrote: On Sun, Feb 28, 2016 at 1:35 PM, Edgar Pettijohn wrote: --- rdist.c.origSun Feb 28 15:29:27 2016 +++ rdist.cSun Feb 28 15:32:06 2016 @@ -57,8 +57,7 @@ char *path_remsh = NULL; static void

/usr/games/adventure include clean up

2016-03-06 Thread Edgar Pettijohn
--- crc.c.origSun Mar 6 10:31:34 2016 +++ crc.cSun Mar 6 10:31:55 2016 @@ -33,6 +33,7 @@ * SUCH DAMAGE. */ +#include #include "extern.h" unsigned long crctab[] = { --- done.c.origSun Mar 6 10:40:59 2016 +++ done.cSun Mar 6 10:42:25 2016 @@ -37,8 +37,10 @@ /*

Re: socppc/fdt: fix fdt_find_node for the case we don't find a node

2016-03-06 Thread Martin Pieuchot
On 28/02/16(Sun) 17:49, Patrick Wildt wrote: > Hi, > > If we're calling fdt_find_node() and do not actually find the node we're > looking for, we call strncmp with a NULL value. > > What happens is that we use fdt_child_node(node) to retrieve a child > and then use fdt_next_node(child) to go

Re: socppc/fdt: fix end signature check (again)

2016-03-06 Thread Martin Pieuchot
On 28/02/16(Sun) 16:58, Patrick Wildt wrote: > Hi, > > unfortunately the end signature check is still not correct. Consulting > the spec cleared the confusion of why the check does not work on my ARM > machines. > > The FDT tree contains a "structure block". The FDT header contains >

Re: cp -i might violate POSIX

2016-03-06 Thread Jeremie Courreges-Anglas
Theo Buehler writes: > On Sat, Mar 05, 2016 at 01:41:32AM +0100, Timo Buhrmester wrote: >> From src/bin/cp/cp.c: >> >while ((ch = getopt(argc, argv, "HLNPRfailprv")) != -1) >> >[...] >> >case 'i': >> >iflag =

Re: The Case of Lost TM_ZONE

2016-03-06 Thread Jeremie Courreges-Anglas
Vadim Zhukov writes: > 2016-03-06 1:23 GMT+03:00 Christian Weisgerber : >> > It looks like decided to use TM_ZONE as a wrapper for tm.tm_zone, >> > until the tm_zone is gone. So, until the later happens (I found >> > no usage of tm_zone in base, BTW), we

Re: proc.h: update PID_MAX after sys/compat is gone

2016-03-06 Thread Michal Mazurek
On 11:32:04, 5.03.16, Philip Guenther wrote: > On Sat, Mar 5, 2016 at 8:10 AM, Michal Mazurek wrote: > > sys/compat is gone. I don't know if PID_MAX can or should be increased, > > but I don't think the comment is now useful. > > I think we can go a bit further now and

Re: KASSERT() @ pf_test() is back

2016-03-06 Thread Mattieu Baptiste
On Sun, Mar 6, 2016 at 11:33 PM, Martin Pieuchot wrote: > On 06/03/16(Sun) 22:35, Mattieu Baptiste wrote: >> On Sun, Mar 6, 2016 at 10:22 PM, Martin Pieuchot wrote: >> > On 06/03/16(Sun) 19:57, Mattieu Baptiste wrote: >> >> [...] >> >> As discussed in january,

Re: rdist.c patch

2016-03-06 Thread Alexander Hall
On March 6, 2016 5:57:23 PM GMT+01:00, Edgar Pettijohn wrote: > > >On 03/06/16 00:12, Philip Guenther wrote: >> On Sun, Feb 28, 2016 at 1:35 PM, Edgar Pettijohn >> wrote: >>> --- rdist.c.origSun Feb 28 15:29:27 2016 >>> +++ rdist.cSun

Re: socppc/fdt: fix end signature check (again)

2016-03-06 Thread David Gwynne
OK by me On 7 Mar 2016 12:51 a.m., "Martin Pieuchot" wrote: > On 28/02/16(Sun) 16:58, Patrick Wildt wrote: > > Hi, > > > > unfortunately the end signature check is still not correct. Consulting > > the spec cleared the confusion of why the check does not work on my ARM > >

Re: [patch] telnet: stored value never read

2016-03-06 Thread Michael McConville
frit...@alokat.org wrote: > the value stored in "old" is never read. It's best to leave these unless there's a good reason not to. It probably means that the programmer wanted to maintain the validity of the variable in case we decide to use it later in the function. > Index: sys_bsd.c >

improve xterm(1) resilience against control code attacks

2016-03-06 Thread Ingo Schwarze
Hi, if two programs communicating encoded character strings to each other disagree about the encoding, that can result in problems. One particular example of such communication is an application program passing output text to a terminal emulator program. If the terminal uses a different

Typo in smtpd.conf(5)

2016-03-06 Thread Sevan Janiyan
Hi, Attached diff corrects a typo to correspond with the commit message. s/ca/certificate http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.sbin/smtpd/smtpd.conf.5?rev=1.142=text/x-cvsweb-markup Sevan Index: usr.sbin/smtpd/smtpd.conf.5

Re: rdist.c patch

2016-03-06 Thread Jacob L. Leifman
In some regards rdist is possibly more powerful/flexible than rsync with its built in support for post-processing scripts. For example, I find it extremely useful for keeping CARP firewalls in sync while allowing for administrative changes to either. On 7 Mar 2016 at 11:18, Michael Kennett

Re: arm: dmamap_destroy: remove explicit unload of map

2016-03-06 Thread Patrick Wildt
On Sun, Mar 06, 2016 at 12:53:24PM +0100, Tobias Ulmer wrote: > map is passed straight into free where it gets overwritten with junk. > No other arch makes map invalid before free, and my N2100 didn't > suddenly misbehave either. Been building base with this diff, no issues. Also it doesn't seem

Re: rdist.c patch

2016-03-06 Thread Michael Kennett
I use rdist (triggered from /etc/daily), but the standard build does have limitations and can dump core in some circumstances (refer http://marc.info/?l=openbsd-tech=141551244520320=2). My use of it is to maintain a shadow boot partition, and to copy selected files onto a separate server. Whilst

Re: i386: foo() -> foo(void)

2016-03-06 Thread Mike Larkin
On Sun, Mar 06, 2016 at 11:39:00PM +0100, Christian Weisgerber wrote: > Sync no-argument function declaration and definition by adding (void). > ok mlarkin > Index: i386/bios.c > === > RCS file: /cvs/src/sys/arch/i386/i386/bios.c,v

Re: df(1): replace __progname with getprogname()

2016-03-06 Thread Michael McConville
ok mmcc@ Michal Mazurek wrote: > Index: bin/df/df.c > === > RCS file: /cvs/src/bin/df/df.c,v > retrieving revision 1.55 > diff -u -p -r1.55 df.c > --- bin/df/df.c 8 Feb 2016 16:23:54 - 1.55 > +++ bin/df/df.c 1

NULL checks of static arrays

2016-03-06 Thread Michael McConville
We check static arrays against NULL pretty often in the kernel. I suspect most of these are due to recent kernel API changes. Should they be removed, or do people want to keep them around in case the APIs change again? Clang 3.7 warns about them by default, so they're easy to find.

Re: preserve /etc and /var file ownership during make build

2016-03-06 Thread Theo de Raadt
> During make build the distrib/sets/makeetcset script does not preserve > ownership when installing /etc and /var files from the base set. > > I've noticed that this leads to some discrepancies compared with a normal > install / upgrade. Then please list them...

Re: socppc/fdt: fix fdt_find_node for the case we don't find a node

2016-03-06 Thread Patrick Wildt
On Sun, Mar 06, 2016 at 04:23:08PM +0100, Martin Pieuchot wrote: > On 28/02/16(Sun) 17:49, Patrick Wildt wrote: > > Hi, > > > > If we're calling fdt_find_node() and do not actually find the node we're > > looking for, we call strncmp with a NULL value. > > > > What happens is that we use

Re: /usr/games/adventure include clean up

2016-03-06 Thread Michael McConville
The sys includes should be first and separate. See style(9). Edgar Pettijohn wrote: > --- crc.c.origSun Mar 6 10:31:34 2016 > +++ crc.cSun Mar 6 10:31:55 2016 > @@ -33,6 +33,7 @@ > * SUCH DAMAGE. > */ > > +#include > #include "extern.h" > > unsigned long crctab[] = { > ---

Re: /usr/games/adventure include clean up

2016-03-06 Thread Edgar Pettijohn
--- io.c.origSun Mar 6 12:43:12 2016 +++ io.cSun Mar 6 12:43:36 2016 @@ -37,7 +37,9 @@ /*Re-coding of advent in C: file i/o and user i/o*/ +#include #include +#include #include #include #include --- subr.c.origSun Mar 6 12:39:53 2016 +++ subr.cSun

Re: /usr/games/adventure include clean up

2016-03-06 Thread Michael McConville
There has to be a blank line after the sys includes. Edgar Pettijohn wrote: > --- io.c.origSun Mar 6 12:43:12 2016 > +++ io.cSun Mar 6 12:43:36 2016 > @@ -37,7 +37,9 @@ > > /*Re-coding of advent in C: file i/o and user i/o*/ > > +#include > #include > +#include >

Re: KASSERT() @ pf_test() is back

2016-03-06 Thread Mattieu Baptiste
On Fri, Mar 4, 2016 at 2:31 PM, Alexandr Nedvedicky wrote: > Hello Stuart, > > thanks for testing it. I'll commit it today. > Hi Alexandr, As discussed in january, with the patches committed, -current still panics for me:

Re: preserve /etc and /var file ownership during make build

2016-03-06 Thread Nathanael Rensen
On 7 March 2016 at 08:49, Theo de Raadt wrote: >> During make build the distrib/sets/makeetcset script does not preserve >> ownership when installing /etc and /var files from the base set. >> >> I've noticed that this leads to some discrepancies compared with a normal >>