Re: pledge for tetris

2015-11-16 Thread Ted Unangst
Ted Unangst wrote: > Theo Buehler wrote: > > In its current form, tetris is a setgid program and needs a whopping > > > > pledge("stdio rpath wpath cpath flock getpw id tty") > > > > throughout its lifetime because of the score file in /var/games. > > > > As discussed with Theo off-list, this is

Re: pledge for tetris

2015-11-16 Thread Theo Buehler
On Tue, Nov 17, 2015 at 12:15:59AM -0500, Ted Unangst wrote: > Theo Buehler wrote: > > In its current form, tetris is a setgid program and needs a whopping > > > > pledge("stdio rpath wpath cpath flock getpw id tty") > > > > throughout its lifetime because of the score file in /var/games. > > >

Re: pledge for tetris

2015-11-16 Thread Michael McConville
Ted Unangst wrote: > Theo Buehler wrote: > > drop the score file support > > No way! this is critical functionality. :) Seconded. :P

Re: pledge for tetris

2015-11-16 Thread Ted Unangst
Theo Buehler wrote: > In its current form, tetris is a setgid program and needs a whopping > > pledge("stdio rpath wpath cpath flock getpw id tty") > > throughout its lifetime because of the score file in /var/games. > > As discussed with Theo off-list, this is risk-only. Thus, drop the > score

Re: pledge for tetris

2015-11-16 Thread Theo Buehler
In its current form, tetris is a setgid program and needs a whopping pledge("stdio rpath wpath cpath flock getpw id tty") throughout its lifetime because of the score file in /var/games. As discussed with Theo off-list, this is risk-only. Thus, drop the score file support, lose the setgid bit a

Re: give cron a sensible default max load_avg for batch jobs

2015-11-16 Thread Craig Skinner
On 2015-11-14 Sat 05:57 AM |, Todd C. Miller wrote: > The quesion no one seems to be asking here is "who actually runs > batch". Anyone? > I do, on small servers with an average uptime(1) load of ~0.2

Re: newsyslog -r

2015-11-16 Thread Jan Stary
ping On Nov 12 22:21:39, h...@stare.cz wrote: > The -r option of newsyslog(8) removes the requirement > that newsyslog runs as root. Would it also make sense > to not try to send the SIGHUP to syslogd in that case? > > Jan > > > Index: newsyslog.8 > ===

Re: [patch] tail(1) follow multiple files

2015-11-16 Thread Ted Unangst
Martijn van Duren wrote: > Isn't anyone willing to take a stab at this patch? > > On 11/09/15 12:56, Martijn van Duren wrote: > > ping > > > > On 11/04/15 23:29, Martijn van Duren wrote: > >> Hello tech@, > >> > >> I got somewhat annoyed by the fact that OpenBSD's tail can't follow > >> multiple f

Re: PC Engines APU2 coming soon - how is OpenBSD's support so far?

2015-11-16 Thread Chris Cappuccio
Noth [nothingn...@citycable.ch] wrote: > No it freezes after the "rebooting..." message appears. It isn't before the > firmware restarts. Hopefully the next firmware release will some kind of fix > for this. > The non-ACPI kernel does this (bsd.rd). bsd should not do this

Re: Signed indexing in bc(1)

2015-11-16 Thread Otto Moerbeek
On Mon, Nov 16, 2015 at 12:45:08PM -0500, Michael McConville wrote: > I may be missing something obvious here, but it seems that the below > indices should be unsigned. str_table has UCHAR_MAX elements, so it > expects to be indexed by chars > 127. > > I'm currently digging through a bunch of seg

Re: pledge mv(1)

2015-11-16 Thread Theo de Raadt
> If only rename(2)'ing then it only needs "stdio rpath cpath", > nevertheless if we need to copy to a different partition it also needs > "wpath fattr" for writing and chmod/chown operations, and finally "proc > exec" are needed due to (extracted directly from mv(1)'s man page) -> > "Should the re

Re: [patch] tail(1) follow multiple files

2015-11-16 Thread Martijn van Duren
Isn't anyone willing to take a stab at this patch? On 11/09/15 12:56, Martijn van Duren wrote: ping On 11/04/15 23:29, Martijn van Duren wrote: Hello tech@, I got somewhat annoyed by the fact that OpenBSD's tail can't follow multiple files and since the last attempt at it was from 2008 I thou

Re: PC Engines APU2 coming soon - how is OpenBSD's support so far?

2015-11-16 Thread Noth
No it freezes after the "rebooting..." message appears. It isn't before the firmware restarts. Hopefully the next firmware release will some kind of fix for this. On 16/11/15 16:00, Chris Cappuccio wrote: Noth [nothingn...@citycable.ch] wrote: Hi again, I think I've found a bug: if I have

[trivial] int -> size_t in pax(1)

2015-11-16 Thread Michael McConville
ok? Index: pax.h === RCS file: /cvs/src/bin/pax/pax.h,v retrieving revision 1.27 diff -u -p -r1.27 pax.h --- pax.h 19 Mar 2015 05:14:24 - 1.27 +++ pax.h 16 Nov 2015 18:23:24 - @@ -79,7 +79,7 @@ typedef struct

Re: pledge route(8) with '-n' flag

2015-11-16 Thread Ricardo Mestre
Hello again, With the latest patch I sent all code paths honor -n and won't abort due to pledge only to stdio, for now the only remaining it's newroute (add/change/delete) that aborts if -n is used and pledge only to stdio. Now, this one starts getting into netinet and I'm still not comfortable w

Re: [patch] gprof(1): fix incompatible pointer types

2015-11-16 Thread Serguey Parkhomovsky
Hi Philip, Thanks for the detailed explanation on comparison functions for qsort. I have looked through your changes, and have only found one issue: > 2) totalcmp(A,B) and totalcmp(B,A) both return <0 if both A and B have >name==0 and cycleno!=0, and they both return >0 if both A and B have

pledge mv(1)

2015-11-16 Thread Ricardo Mestre
Hello, If only rename(2)'ing then it only needs "stdio rpath cpath", nevertheless if we need to copy to a different partition it also needs "wpath fattr" for writing and chmod/chown operations, and finally "proc exec" are needed due to (extracted directly from mv(1)'s man page) -> "Should the rena

Re: apmd(8) messages

2015-11-16 Thread Michael McConville
Jan Stary wrote: > When we set perf policy to high, we say "high". > So when we set to low, say "low", not "manual". > (Both manual high and manual low are manual.) > > And it's not "client reply", it's a reply to the client, right? ok mmcc@ > Index: apmd.c >

Re: Reducing compilation warnings in imsg.c on FreeSBD

2015-11-16 Thread Ted Unangst
Craig Rodrigues wrote: > I tried the following and was able to compile without warning: > > Index: imsg.c > === > --- imsg.c (revision 290924) > +++ imsg.c (working copy) > @@ -74,7 +74,7 @@ > > again: > if (getdta

Signed indexing in bc(1)

2015-11-16 Thread Michael McConville
I may be missing something obvious here, but it seems that the below indices should be unsigned. str_table has UCHAR_MAX elements, so it expects to be indexed by chars > 127. I'm currently digging through a bunch of segfaults found by American Fuzzy Lop (afl). I don't think I've come across this i

Re: Reducing compilation warnings in imsg.c on FreeSBD

2015-11-16 Thread Craig Rodrigues
On Mon, Nov 16, 2015 at 9:03 AM, Philip Guenther wrote: > >> integers of different signs: 'unsigned long' and 'int' [-Wsign-compare] > >> >= getdtablesize()) { > >> ^ ~~~ > >> 1 warning generated. > > Out of curiousity, in your experience how often is that war

Re: PC Engines APU2 coming soon - how is OpenBSD's support so far?

2015-11-16 Thread Jason Barbier
Looks like you need to email support and get the updated BIOS. I had the same problem and there is an update to the bios to allow for mSATA boot but not SD card boot yet. -- Jason Barbier | E: jab...@serversave.us GPG Key-ID: B5F75B47(http://kusuriya.devio.us/pubkey.asc) On Sat, Nov 14, 2015, at

apmd(8) messages

2015-11-16 Thread Jan Stary
When we set perf policy to high, we say "high". So when we set to low, say "low", not "manual". (Both manual high and manual low are manual.) And it's not "client reply", it's a reply to the client, right? Jan Index: apmd.c ===

Re: Reducing compilation warnings in imsg.c on FreeSBD

2015-11-16 Thread Theo de Raadt
> > Both OSs define getdtablesize() as sysconf(_SC_OPEN_MAX). sysconf(3) > > returns a long, so it seems more correct to make getdtablesize(3) return > > a long or ssize_t. The return value has to be signed because sysconf(3) > > is specified by POSIX to return -1 and set errno on failure. > > No,

Re: Reducing compilation warnings in imsg.c on FreeSBD

2015-11-16 Thread Mark Kettenis
> Date: Mon, 16 Nov 2015 11:41:09 -0500 > From: Michael McConville > > Craig Rodrigues wrote: > > Recently, I imported imsg.c from OpenBSD to the > > FreeBSD base system's libopenbsd: > > > > https://svnweb.freebsd.org/changeset/base/290375 > > > > When compiling on FreeBSD, we get a compiler w

Re: Reducing compilation warnings in imsg.c on FreeSBD

2015-11-16 Thread Philip Guenther
On Mon, Nov 16, 2015 at 8:41 AM, Michael McConville wrote: > Craig Rodrigues wrote: >> Recently, I imported imsg.c from OpenBSD to the >> FreeBSD base system's libopenbsd: >> >> https://svnweb.freebsd.org/changeset/base/290375 >> >> When compiling on FreeBSD, we get a compiler warning with clang:

Re: Reducing compilation warnings in imsg.c on FreeSBD

2015-11-16 Thread Theo de Raadt
> Both OSs define getdtablesize() as sysconf(_SC_OPEN_MAX). sysconf(3) > returns a long, so it seems more correct to make getdtablesize(3) return > a long or ssize_t. The return value has to be signed because sysconf(3) > is specified by POSIX to return -1 and set errno on failure. Don't be ridicu

Re: Reducing compilation warnings in imsg.c on FreeSBD

2015-11-16 Thread Michael McConville
Craig Rodrigues wrote: > Recently, I imported imsg.c from OpenBSD to the > FreeBSD base system's libopenbsd: > > https://svnweb.freebsd.org/changeset/base/290375 > > When compiling on FreeBSD, we get a compiler warning with clang: > > cc -O2 -pipe -I/opt2/branches/head2/lib/libopenbsd -std=gn

Re: pledge route(8) with '-n' flag

2015-11-16 Thread Theo de Raadt
> On 16/11/15(Mon) 10:03, Ricardo Mestre wrote: > > Hello! > > > > Like Benoit said, monitor still needs dns all the time, but since pledge > > was being called there again with dns pledge then I thought it wouldn't > > abort. Taking that into consideration and looking at it a little bit > > more,

Re: PC Engines APU2 coming soon - how is OpenBSD's support so far?

2015-11-16 Thread Chris Cappuccio
Noth [nothingn...@citycable.ch] wrote: > Hi again, > > I think I've found a bug: if I have a console session open using minicom > or cu when rebooting, the machine hangs. This doesn't happen with either > CentOS Linux 7 or FreeBSD 10.2 / 11. I can reproduce the problem. Anyone > else have this i

pledge newsyslog

2015-11-16 Thread Sebastian Benoit
hi, this is pledge() in newsyslog. please check & test... and is someone using monitormode, please say so ;) (oh, and oks?) diff --git usr.bin/newsyslog/newsyslog.c usr.bin/newsyslog/newsyslog.c index 761da36..acfd871 100644 --- usr.bin/newsyslog/newsyslog.c +++ usr.bin/newsyslog/newsyslog.c @

Re: httpd URL rewrite support patch

2015-11-16 Thread Stanislaw Adaszewski
Some more fixes for style and parser syntax. Best, S. On Sun, Nov 15, 2015 at 07:46:35PM +0100, Reyk Floeter wrote: > On Sun, Nov 15, 2015 at 06:41:49PM +0100, Stanislaw Adaszewski wrote: > > Sorry again, I'm trying now with with patch as an attachment - > > when I did it the first time I think

Re: pledge route(8) with '-n' flag

2015-11-16 Thread Ricardo Mestre
Hi Martin, Using the same logic of my previous patch, now monitor works with "stdio" when -n is used and "stdio rpath dns" otherwhise. Unfortunately for newroute (add/delete/change) it still needs the 3 of them since when it detects it's a host (instead of an IP address) it will always contact the

Re: initial 802.11n implementation

2015-11-16 Thread Stefan Sperling
On Mon, Nov 16, 2015 at 11:56:27AM +0100, Martin Pieuchot wrote: > I'm not saying that's better. I'm saying that the actual 11n driver/ > stack glue has been designed with iwn(4)'s behavior in mind. So I > think that's one argument more to do the same with iwm(4)... At least > at this stage. Bu

Re: Fewer rt_ifp in sys/net

2015-11-16 Thread Martin Pieuchot
On 11/11/15(Wed) 13:00, Martin Pieuchot wrote: > Mostly around rtrequest(9) code, ok? Anybody? > Index: net/route.c > === > RCS file: /cvs/src/sys/net/route.c,v > retrieving revision 1.270 > diff -u -p -r1.270 route.c > --- net/route

Re: if_isconnected()

2015-11-16 Thread Martin Pieuchot
On 12/11/15(Thu) 11:41, Martin Pieuchot wrote: > This is basically a rewrite of in6_ifpprefix() in a more generic > fashion. The idea is to get rid of rt_ifp. I'm also introducing > if_isconnected() because I want to use it in ARP. Updated diff to make use of the function in ARP, any ok? Index:

Re: initial 802.11n implementation

2015-11-16 Thread Martin Pieuchot
On 15/11/15(Sun) 21:32, Stefan Sperling wrote: > On Sun, Nov 15, 2015 at 08:27:28PM +0100, Martin Pieuchot wrote: > > I'm really concerned about the use of tasks in iwm_ampdu_rx_{start,stop} > > > > By looking at iwn(4) which also has a lot of bits for handling A-MPDU > > and A-MSDU frames, it see

Re: pledge route(8) with '-n' flag

2015-11-16 Thread Martin Pieuchot
On 16/11/15(Mon) 10:03, Ricardo Mestre wrote: > Hello! > > Like Benoit said, monitor still needs dns all the time, but since pledge > was being called there again with dns pledge then I thought it wouldn't > abort. Taking that into consideration and looking at it a little bit > more, how about thi

Re: httpd URL rewrite support patch

2015-11-16 Thread Stanislaw Adaszewski
Please take a look at the modified patch. I've introduced the "pass rewrite" syntax you proposed, added support for recursive rewriting (disabled by default), fixed freeing of http_path and created separate rewrite_uri field not to interfere with the return_uri logic. Best, S. On Sun, Nov 15, 20

Re: pledge route(8) with '-n' flag

2015-11-16 Thread Ricardo Mestre
Hello! Like Benoit said, monitor still needs dns all the time, but since pledge was being called there again with dns pledge then I thought it wouldn't abort. Taking that into consideration and looking at it a little bit more, how about this? I removed the first pledge in main() between the 2 swi

Reducing compilation warnings in imsg.c on FreeSBD

2015-11-16 Thread Craig Rodrigues
Hi, Recently, I imported imsg.c from OpenBSD to the FreeBSD base system's libopenbsd: https://svnweb.freebsd.org/changeset/base/290375 When compiling on FreeBSD, we get a compiler warning with clang: cc -O2 -pipe -I/opt2/branches/head2/lib/libopenbsd -std=gnu99 -fstack-protector-strong -Wsys