Re: dc(1); fix 0Z

2017-12-02 Thread kshe
On Sat, 02 Dec 2017 07:50:35 +, Otto Moerbeek wrote: > Spotted while working on kshe's diff. > > Makes Z0p work the same as both gnu dc and the orignal dc. > > OK? I guess you probably mean `0Zp', and in that case a mere return n->scale; should suffice here. Also, the manual

Re: dc(1); fix 0Z

2017-12-02 Thread Otto Moerbeek
On Sat, Dec 02, 2017 at 10:38:00AM +, kshe wrote: > On Sat, 02 Dec 2017 07:50:35 +, Otto Moerbeek wrote: > > Spotted while working on kshe's diff. > > > > Makes Z0p work the same as both gnu dc and the orignal dc. > > > > OK? > > I guess you probably mean `0Zp', and in that case a mere >

Re: gettimeofday(2) does not conform to POSIX.1-2008?

2017-12-02 Thread Scott Cheloha
On Sat, Dec 02, 2017 at 11:54:23AM -0700, Theo de Raadt wrote: > > > Wouldn't be the first error in POSIX. The documents have gotten > > > sloppier. I think this is due to their commitee not acquiring any > > > sensible young blood. > > > > fwiw, the "return zero and only zero" behavior traces

Re: gettimeofday(2) does not conform to POSIX.1-2008?

2017-12-02 Thread Scott Cheloha
On Sat, Dec 02, 2017 at 11:05:17AM -0700, Theo de Raadt wrote: > > TL;DR: POSIX.1-2008 says gettimeofday(2) can't return anything but 0, > > but we return -1 on invalid input. > > It must return -1 to indicate the tp pointer is to invalid memory. > All system calls indicate invalid pointer

gettimeofday(2) does not conform to POSIX.1-2008?

2017-12-02 Thread Scott Cheloha
Hi, TL;DR: POSIX.1-2008 says gettimeofday(2) can't return anything but 0, but we return -1 on invalid input. We claim that our gettimeofday(2) conforms to POSIX.1-2008. Is something off here? Also, gettimeofday(2) is an XSI extension, so I think at a minimum the STANDARDS section needs to be

mess with regression tests

2017-12-02 Thread Sergey Bronnikov
Hello, openbsd has a regression testuite in a base tree. Testset for each component is in a separate directory, Makefiles for each testsuite uses bsd.regress.mk framework and connected to the root Makefile. So it is easy to run overall testsuite with 'make regress'. But tests for some utilities

iked: set flag if we send more proposals

2017-12-02 Thread Patrick Wildt
Hi, if we wanted to send out more proposals than just one, we need to set a flag in the SA header that there is another proposal coming. The "more" attribute borrows its values, as specified in the RFC, from IKEv1. ok? Patrick diff --git a/sbin/iked/ikev2.c b/sbin/iked/ikev2.c index

Re: diff: cu(1): add secure kiosk mode + stricter pledge

2017-12-02 Thread Jan Klemkow
On Fri, Dec 01, 2017 at 04:17:42PM -0700, Theo de Raadt wrote: > > The diff adds the option -k (for kiosk mode) > > Congratulations, you win some sort of prize. That is the worst-named > option I have seen in more than a decade. Thanks. :-) > Good idea though, but I think we have better

Re: diff: cu(1): add secure kiosk mode + stricter pledge

2017-12-02 Thread Jan Klemkow
On Sat, Dec 02, 2017 at 08:17:15PM +0100, Jan Klemkow wrote: > On Fri, Dec 01, 2017 at 04:17:42PM -0700, Theo de Raadt wrote: > > So two comments: Calling this thing by the right name (escape), > > would allow you to search other programs which have similar functions, > > see if someone did it

Re: gettimeofday(2) does not conform to POSIX.1-2008?

2017-12-02 Thread Theo de Raadt
> TL;DR: POSIX.1-2008 says gettimeofday(2) can't return anything but 0, > but we return -1 on invalid input. It must return -1 to indicate the tp pointer is to invalid memory. All system calls indicate invalid pointer arguments in that way, and this one is not special. [EFAULT] An

Re: gettimeofday(2) does not conform to POSIX.1-2008?

2017-12-02 Thread Theo de Raadt
> > Wouldn't be the first error in POSIX. The documents have gotten > > sloppier. I think this is due to their commitee not acquiring any > > sensible young blood. > > fwiw, the "return zero and only zero" behavior traces back at least > as far as here (SUSv2, I think): > >