Re: trunk vs busy ports

2015-11-19 Thread Chris Cappuccio
David Gwynne [da...@gwynne.id.au] wrote: > IFF_OACTIVE means the hardware ring is full, not if it is busy. > > perhaps a better check is to see whether there are pending packets > on the send queue? > > i could also argue we dont need the check at all, but this is less > of a semantic change. >

Re: Question about shm_open and sem_open

2015-11-19 Thread Ted Unangst
游俊德 wrote: > Hello, > > I have a question about source code of shm_open and sem_open functions. > > int > shm_open(const char *path, int flags, mode_t mode) > { > (skipped) > > if (sb,st_uid != getuid()) { > close(fd); >errno = EPERM; >

Question about shm_open and sem_open

2015-11-19 Thread 游俊德
Hello, I have a question about source code of shm_open and sem_open functions. int shm_open(const char *path, int flags, mode_t mode) { (skipped) if (sb,st_uid != getuid()) { close(fd); errno = EPERM; return -1; }

does openssl get to use dns?

2015-11-19 Thread Todd T. Fries
To demonstrate: openssl s_client -connect www.google.com:443 A fix, probably not the full or correct one: Index: openssl.c === RCS file: /cvs/src/usr.bin/openssl/openssl.c,v retrieving revision 1.19 diff -u -p -u -r1.19 openssl.c

trunk vs busy ports

2015-11-19 Thread David Gwynne
IFF_OACTIVE means the hardware ring is full, not if it is busy. perhaps a better check is to see whether there are pending packets on the send queue? i could also argue we dont need the check at all, but this is less of a semantic change. ok? Index: if_trunk.c ==

ntpd pledge, needs "unix" to talk to ntpctl

2015-11-19 Thread Andreas Kusalananda Kähäri
Hi, I noticed that ntpd would die if I tried to use ntpctl to check on it: [...] 29946 ntpd CALL poll(0xda8993ab5c0,4,1000) 29946 ntpd RET poll 1 29946 ntpd CALL kbind(0x7f7c2558,0x18,0x7bb3facd5f812ed9) 29946 ntpd RET kbind 0 29946 ntpd CALL accept(5,0x7f7c2630

sppp_subr vs if_start and a use after free

2015-11-19 Thread David Gwynne
once you enqueue an mbuf, you no longer own it. therefore you cant read the length out of it. this reads the length first, then tries to enq it. also, call if_start instead of a bare call to the underlying start routine. ok? Index: if_spppsubr.c =

Re: tail -n +NUM broken [Was CVS: cvs.openbsd.org: src]

2015-11-19 Thread Ted Unangst
Ted Unangst wrote: > > > Modified files: > > > usr.bin/tail : extern.h forward.c misc.c read.c reverse.c > > >tail.c > > > > > > Log message: > > > another try to allow tailing multiple files. maybe it works? > > > commit now to allow people to test. > > > > I just updat

Re: tail -n +NUM broken [Was CVS: cvs.openbsd.org: src]

2015-11-19 Thread Ted Unangst
> > Modified files: > > usr.bin/tail : extern.h forward.c misc.c read.c reverse.c > > tail.c > > > > Log message: > > another try to allow tailing multiple files. maybe it works? > > commit now to allow people to test. > > I just updated to very latest snapshot and ta

Re: [PATCH 1/2] flex 2.5.39

2015-11-19 Thread Ted Unangst
Serguey Parkhomovsky wrote: > * renamed parse.c, parse.h, scan.c, skel.c with init prefix so compiling > flex outside of obj by accident wouldn't clobber the bootstrap files Do you remember what caused you to skip using the in base yacc? The diff below seems to work for me. Index: Makefile

serious watchdog timeout issues with em driver

2015-11-19 Thread Sonic
Have serious problems for over 7 weeks now with em driver, specifically any rev of if_em.c > 1.305. Starting with rev 1.306, released on 2015/09/30 and continuing to -current, watchdog timeouts rue the day. Unfortunately rev 1.305 no longer builds with -current as it appears the patch in rev 1.309

Memory corruptions in bc(1)

2015-11-19 Thread Michael McConville
I'm already cache-thrashing with all of my side projects, so if anyone's interested I'll leave this to them. A few days ago, I wanted to try American Fuzzy Lop (afl), and bc(1) seemed like a good first target: it pretty much just goes from stdin to stdout, so there's no code reorganization needed.

atc(6): convert hand-rolled option parsing to getopt(3)

2015-11-19 Thread Theo Buehler
Index: games/atc/main.c === RCS file: /cvs/src/games/atc/main.c,v retrieving revision 1.23 diff -u -p -r1.23 main.c --- games/atc/main.c13 Jul 2014 14:01:04 - 1.23 +++ games/atc/main.c19 Nov 2015 22:36:50 - @@ -46,

Re: pledge for tetris

2015-11-19 Thread Theo Buehler
Now that tedu moved the score file to $HOME, we can get by with "stdio rpath wpath cpath tty". Do some basic clean up in the manual. There's more to do, but leave that for later. Index: games/tetris/tetris.6 === RCS file: /var/cvs/s

Re: [patch] was: Re: login(3) routines data integrity patch

2015-11-19 Thread Ted Unangst
Chris Turner wrote: > On 11/12/15 14:10, Ted Unangst wrote: > > Chris Turner wrote: > >>> > >>> The attached patch calls fsync(2) on related FD's in the login(3) > >>> routines, which corrected the problem on my test machine, > >>> and imho might be a good idea in general. > > > > AFAIK it should

Re: calloc -> malloc in get_data() and get_string()

2015-11-19 Thread Todd C. Miller
On Wed, 18 Nov 2015 22:10:05 -0500, Michael McConville wrote: > Ted Unangst wrote: > > Joerg Jung wrote: > > > > Michael McConville wrote: > > > > Relayd, httpd, and ntpd define the functions get_data() and > > > > get_string(). Both call calloc and then immediately memcpy. > > > > Calloc's zeroin

[patch] fortune(6): fix missing negative in manpage

2015-11-19 Thread Serguey Parkhomovsky
If you are willing to be offended, then quit using -o? It should be the opposite. Index: fortune.6 === RCS file: /cvs/src/games/fortune/fortune/fortune.6,v retrieving revision 1.14 diff -u -p -r1.14 fortune.6 --- fortune.6 25 Sep 20

pledge route(8) with '-n' flag

2015-11-19 Thread Ricardo Mestre
Hi, I gave it another go to further reduce the pledge promises in route(8), and this is what I could come up with: Remove the initial pledge and join the 2 switch cases, then apply a specific pledge depending on the codepath: flush route, show and monitor use "stdio" if -n is used, otherwise it

rt_ifp in tcp_mss()

2015-11-19 Thread Martin Pieuchot
Stop using rt_ifp, ok? Index: netinet/tcp_input.c === RCS file: /cvs/src/sys/netinet/tcp_input.c,v retrieving revision 1.308 diff -u -p -r1.308 tcp_input.c --- netinet/tcp_input.c 6 Nov 2015 11:20:56 - 1.308 +++ netinet/tcp_

rt_ifp and arp

2015-11-19 Thread Martin Pieuchot
Fewer rt_ifp in arp, ok? Index: netinet/if_ether.c === RCS file: /cvs/src/sys/netinet/if_ether.c,v retrieving revision 1.188 diff -u -p -r1.188 if_ether.c --- netinet/if_ether.c 18 Nov 2015 13:58:02 - 1.188 +++ netinet/if_et

rt_ifp and pf(4)

2015-11-19 Thread Martin Pieuchot
Stop using rt_ifp. While here put some NCARP... ok? Index: net/pf.c === RCS file: /cvs/src/sys/net/pf.c,v retrieving revision 1.950 diff -u -p -r1.950 pf.c --- net/pf.c12 Nov 2015 10:07:14 - 1.950 +++ net/pf.c19 Nov

Re: Pledge for Vi and Ex

2015-11-19 Thread Anthony J. Bentley
"Anthony J. Bentley" writes: > Gregor Best writes: > > @@ -229,6 +230,14 @@ editor(GS *gp, int argc, char *argv[]) > > } > > if (LF_ISSET(SC_EX) && F_ISSET(gp, G_SCRIPTED)) > > silent =3D 1; > > + > > + if (secure) { > > + if (pledge("stdio rpath wpath cpath fattr fl