open(2) with hardcoded values

2015-11-12 Thread Ricardo Mestre
Hi! After a quick grep on the tree I found a few places where open(2) is still used with hardcoded numeric values. I sent this to Theo for reviewing, but he might not had the time for it so here it goes: Index: jobs.c === RCS

Re: chmod(1) -f flag is still used?

2015-11-12 Thread Theo de Raadt
Your process here is really strange. You see something, then you write a diff before answering your own question, then you send a mail asking a question with the diff already present as an investment. In OpenBSD, we have a 20 year old repository that explains why a change was made. Before the

Re: open(2) with hardcoded values

2015-11-12 Thread Ted Unangst
Ricardo Mestre wrote: > Hi! > > After a quick grep on the tree I found a few places where open(2) is > still used with hardcoded numeric values. > > I sent this to Theo for reviewing, but he might not had the time for it > so here it goes: When you send patches, can you base them in a single

Re: Replace xfree with free on csh(1)

2015-11-12 Thread Ricardo Mestre
Hello Michael! Sorry, mea culpa. I hope it's not mangled now: Index: alloc.c === RCS file: /cvs/src/bin/csh/alloc.c,v retrieving revision 1.16 diff -u -p -u -r1.16 alloc.c --- alloc.c8 Feb 2015 06:01:25 -1.16 +++

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

2015-11-12 Thread Ted Unangst
Chris Turner wrote: > > Wondering if anyone had a chance to take a look at these - > Subject line tagged accordingly :D > > I could see in some scenarios, aside from generating incorrect > > data, this incorrect record could be used to facillitate hiding > > presence of a successful compromise.

newsyslog -r

2015-11-12 Thread Jan Stary
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 === RCS file:

Re: More less(1)

2015-11-12 Thread Nicholas Marriott
ok nicm On Wed, Nov 11, 2015 at 11:45:07PM -0500, Michael McConville wrote: > That helper function I just tweaked has a total of one usage. Maybe just > inline it? > > > Index: opttbl.c > === > RCS file:

Re: less(1) ctype fixes

2015-11-12 Thread Stefan Sperling
On Wed, Nov 11, 2015 at 07:27:35PM -0500, Michael McConville wrote: > is_optchar() could also take an int in order to be more compatible with > the ctype functions. Perhaps for consistency it would be better to pass an int in and cast to unsigned char when handing off to ctype. I've gotten used

Re: More less(1)

2015-11-12 Thread Stefan Sperling
On Wed, Nov 11, 2015 at 11:45:07PM -0500, Michael McConville wrote: > That helper function I just tweaked has a total of one usage. Maybe just > inline it? > I agree. > > Index: opttbl.c > === > RCS file:

Re: tcpbench pledge

2015-11-12 Thread Sebastian Benoit
David Hill(dh...@mindcry.org) on 2015.11.10 11:44:39 -0500: > Hello - > > pledge starts after getopt because of setrtable. > > rpath needed incase -k (kvm_openfile) > proc needed for drop_gid (setresgid) > > I believe I've hit every code path. More eyes are welcome. Hi, two changes -T at

chmod(1) -f flag is still used?

2015-11-12 Thread Andrea Biscuola
Hi tech. Digging around the tree (Yes, i want try to contribute if possible), i found this small piece of code: >case 'f': /* no longer documented. */ > fflag = 1; > break; And the usage of this flag in two conditional statement in a logic OR: >if (ischmod) { >

Re: Replace xfree with free on csh(1)

2015-11-12 Thread Ricardo Mestre
It seems I was still with mangling problems, does it look good now? Index: alloc.c === RCS file: /cvs/src/bin/csh/alloc.c,v retrieving revision 1.16 diff -u -p -u -r1.16 alloc.c --- alloc.c 8 Feb 2015 06:01:25 - 1.16

Re: chmod(1) -f flag is still used?

2015-11-12 Thread Christian Weisgerber
On 2015-11-12, Theo de Raadt wrote: > There are older repositories and documents to review. Specifically, the Berkeley repository culminating in 4.4BSD can be conveniently accessed here: https://svnweb.freebsd.org/csrg/ (That's converted. The original was in SCCS.)

Re: Replace xfree with free on csh(1)

2015-11-12 Thread Michael McConville
Ricardo Mestre wrote: > It seems I was still with mangling problems, does it look good now? You're still wrapping a couple lines in the second-to-last hunk, but I fixed them manually. ok mmcc@ > Index: alloc.c > === > RCS file:

Re: move cron socket to /var/run/cron.sock (pledge)

2015-11-12 Thread Jérémie Courrèges-Anglas
Theo de Raadt writes: >> Grmbl. I've hard a hard time trying to understand *why* this would be >> needed. The answer is pledge(2), who makes chmod(2) fail with EPERM >> instead of killing the process. >> >> I find this confusing. IMO pledge(2) should let the kernel

if_isconnected()

2015-11-12 Thread Martin Pieuchot
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. ok? Index: netinet6/in6.c === RCS file:

mpsafe ifqueues

2015-11-12 Thread David Gwynne
this introduces mpsafety to ifqueue operations. this follows on from some mopping up of (now) inappropriate use of ifqueues and the IF_ and IFQ_ operations on them. in most cases those ifqueues have been replaced with mbuf_lists or mbuf_queues. the reason we want mpsafe ifqueues is so we can run

Re: sunfire v120 gem interfaces

2015-11-12 Thread David Gwynne
> On 13 Nov 2015, at 12:16, Ryan Freeman wrote: > > On Tue, Nov 10, 2015 at 08:27:36PM +1000, David Gwynne wrote: >> any joy? i mean, failure? > > Well I got something different. I've noticed the failures only seem to happen > when my roommates arrive home. I can use my

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

2015-11-12 Thread Rolf Sommerhalder
Got two APU2b4 boards yesterday, and they fail to boot 5.8 or -current, i386 or amd64, from USB early in the process (see below). So far, I could not figure out if there are differences to your setup from your dmesgs. Eventually, did you revceive an earlier hardware revision APU2a4, with an

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

2015-11-12 Thread Stuart Henderson
set tty com0 On 2015/11/12 14:32, Rolf Sommerhalder wrote: > Got two APU2b4 boards yesterday, and they fail to boot 5.8 or > -current, i386 or amd64, from USB early in the process (see below). > > So far, I could not figure out if there are differences to your setup > from your dmesgs.

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

2015-11-12 Thread Rolf Sommerhalder
Many thanks Stuart! > set tty com0 Bingo, and then reduce serial line speed from 115k to 9600 :-)

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

2015-11-12 Thread Daniel Ouellet
you got stuck at the same place I did. For i386/amd64 you have to tell boot you want serial output either at the boot prompt or via boot.conf. stty com0 115200 set tty com0 See archive: http://marc.info/?l=openbsd-misc=144531335118929=2 And this should be on misc@ anyway. Take care. Daniel

initial 802.11n implementation

2015-11-12 Thread Stefan Sperling
This diff adds an initial implementation of 802.11n. It is functional but mostly adds foundations to build future work on top of. It completes the little bits of 11n code added by damien@ years ago. It supports all non-optional 11n features for STA (client) operation. It adds 11n support only

Re: sunfire v120 gem interfaces

2015-11-12 Thread Ryan Freeman
On Fri, Nov 13, 2015 at 12:36:40PM +1000, David Gwynne wrote: > > > On 13 Nov 2015, at 12:16, Ryan Freeman wrote: > > > > On Tue, Nov 10, 2015 at 08:27:36PM +1000, David Gwynne wrote: > >> any joy? i mean, failure? > > > > Well I got something different. I've noticed the

Re: sunfire v120 gem interfaces

2015-11-12 Thread Ryan Freeman
On Tue, Nov 10, 2015 at 08:27:36PM +1000, David Gwynne wrote: > any joy? i mean, failure? Well I got something different. I've noticed the failures only seem to happen when my roommates arrive home. I can use my stuff remotely all day from work without a hitch, roommates come home and usually

cron: remove log_it() and use syslog() directly

2015-11-12 Thread Todd C. Miller
Now that we only log via syslog it makes sense to do so directly. We also no longer need to do anything on SIGHUP, which is now explicitly ignored (was implicitly before). I've preserved the format of the log entries which is basically: (username) WHAT (details) Logs due to normal operation

Re: [patch] PkgCreate.pm make it more clear why a shared library is invalid

2015-11-12 Thread Marc Espie
On Wed, Nov 11, 2015 at 05:13:45PM +0100, Adam Wolk wrote: > Hi tech@, > > I have been working recently on packaging a shared library for the > first time and hit a stumbling block yesterday. > > $ make package > `/usr/ports/pobj/libwebsockets-1.5/fake-amd64/.fake_done' is up to date. > ===>

Re: [patch] PkgCreate.pm make it more clear why a shared library is invalid

2015-11-12 Thread Adam Wolk
On Thu, 12 Nov 2015 16:15:35 +0100 Marc Espie wrote: > On Wed, Nov 11, 2015 at 05:13:45PM +0100, Adam Wolk wrote: > > Hi tech@, > > > > I have been working recently on packaging a shared library for the > > first time and hit a stumbling block yesterday. > > > > $ make package

xfree leftover on diff(1)

2015-11-12 Thread Ricardo Mestre
Hi, diff(1) stopped using xfree, a few weeks ago, to use free directly, but xmalloc.h still kept a leftover: Index: xmalloc.h === RCS file: /cvs/src/usr.bin/diff/xmalloc.h,v retrieving revision 1.3 diff -u -p -u -r1.3 xmalloc.h

Re: export directive in make

2015-11-12 Thread Marc Espie
Okay, I've had a bit of time to look (again) at gmake. This patch won't make it in its current form. It does only implement a very partial subset of what gmake does, namely the export VAR=VALUE syntax. I'll have to check gmake's code more closely, because the other export forms DO expand the

Re: Replace xfree with free on csh(1)

2015-11-12 Thread Michael McConville
Ricardo Mestre wrote: > Hi, > > On csh(1), since Free() just calls free() and xfree() is a #define to > Free() then free() can be called directly instead of xfree() and the > #define can be removed, is this approach correct? Seems like this patch is mangled, unless it's something on my machine.

Replace xfree with free on csh(1)

2015-11-12 Thread Ricardo Mestre
Hi, On csh(1), since Free() just calls free() and xfree() is a #define to Free() then free() can be called directly instead of xfree() and the #define can be removed, is this approach correct? Index: alloc.c === RCS file:

Re: unify xmalloc (was Re: [patch] cvs: retire xfree())

2015-11-12 Thread Michael McConville
Michael W. Bombardieri wrote: > > > ok for removing xfree from aucat? > > > > yes, ok ratchov; if later this causes me merges i'll find another > > solution. Feel free to do the same in usr.bin/sndiod, as it's > > almost the same. > > Same thing for sndiod... ok mmcc@ > Index: abuf.c >

Remove non HMAC versions of MD5 and SHA1 from the OCF

2015-11-12 Thread Mike Belopuhov
They're not exposed via PF_KEY so I assume they were used directly via /dev/crypto. There's no code that uses them and by now no new code should. OK? Index: sys/crypto/cryptodev.h === RCS file: /cvs/src/sys/crypto/cryptodev.h,v

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

2015-11-12 Thread Chris Turner
Wondering if anyone had a chance to take a look at these - Subject line tagged accordingly :D Cheers, - Chris On 10/30/15 11:44, Chris Turner wrote: Hello - I was testing some login data collection scripts (on a VM) and discovered that in certain cases, it was possible for a login record

cron: use absolute paths in pathnames.h

2015-11-12 Thread Todd C. Miller
This also gets rid of set_cron_cwd(), cron now chdirs to '/' via daemon(3). We can assume that the cron/at dirs were created at install time and we can't actually create them with the correct mode or group due to pledge anyway. I've moved the setegid(crontab) bit to open_socket() where it is

Re: cron: use absolute paths in pathnames.h

2015-11-12 Thread Todd C. Miller
On Thu, 12 Nov 2015 09:24:41 -0700, "Todd C. Miller" wrote: > This also gets rid of set_cron_cwd(), cron now chdirs to '/' via > daemon(3). We can assume that the cron/at dirs were created at > install time and we can't actually create them with the correct > mode or group due to pledge anyway.