Re: Better error output for readlink(1)

2017-04-05 Thread Nicholas Marriott
On Tue, Apr 04, 2017 at 05:03:26PM -0500, Scott Cheloha wrote: > > On Apr 4, 2017, at 4:46 PM, Nicholas Marriott > > wrote: > > > > readlink is explicitly documented to silently exit 1 if run without -f, > > and GNU readlink behaves the same way. I doubt that should

Re: ifconfig.8: Small improvement, typofix

2017-04-05 Thread Jason McIntyre
On Tue, Apr 04, 2017 at 03:32:19PM +0200, Klemens Nanni wrote: > Hey, > > blocknonip's description is a tad clearer that way, the rest is mostly > cosmetical but still. now committed, thanks. i left out hunk 3 as the text that's there is correct. you have to read it like this: three times four

Re: syslogd log_debug

2017-04-05 Thread Todd C. Miller
On Wed, 05 Apr 2017 02:10:44 +0200, Alexander Bluhm wrote: > Updated diff after unlock, ok? Looks correct. OK millert@ - todd

Re: rtadvd: asprintf

2017-04-05 Thread Jeremie Courreges-Anglas
Just to make things clear, Jeremie Courreges-Anglas writes: > The last commit to this file fixed two (void)asprintf calls. Fix the > two remaining calls: depend on the ret buffer being set to NULL on I meant "don't depend on..." here, sorry for the confusion. > failure. > >

ip6_input.c and mld6.c bcopy -> memcpy

2017-04-05 Thread David Hill
Hello - The following diff removes bcopy from ip6_input.c and mld6.c by using memcpy as the memory does not overlap. OK? Index: ip6_input.c === RCS file: /cvs/src/sys/netinet6/ip6_input.c,v retrieving revision 1.181 diff -u -p

clean up disabled 386 code

2017-04-05 Thread Michael W. Bombardieri
Hi, The code in "#if 0" has been disabled since revision 1.1. >From what I see netbsd removed it too: http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/arch/i386/i386/trap.c.diff?r1=1.237=1.238=date_with_tag=MAIN=h - Michael Index: src/sys/arch/i386/i386/trap.c

Re: syslogd log_warn

2017-04-05 Thread Todd C. Miller
On Wed, 05 Apr 2017 18:17:38 +0200, Alexander Bluhm wrote: > Replace logerror() functions with generic log_warn() from log.c. > Make messages a bit more consistent. Note that the new function > supports format strings. Replace some log_debug() with log_warn(). OK millert@ - todd

Re: mmap:ing /dev/rsdNc fails with EINVAL on all my attempts pages give no hint. Any way around it?

2017-04-05 Thread Theo de Raadt
> "ls -l /dev/rsd0c; ls -l /dev/sd0c" shows that sd0c is a block device > and rsd0c is a character device, and mmap's man page says that > "character special files" are OK. The manual pages will never list all restrictions.

identd.c patch

2017-04-05 Thread Edgar Pettijohn
Remove unused function getport() Index: identd.c === RCS file: /cvs/src/usr.sbin/identd/identd.c,v retrieving revision 1.34 diff -u -p -u -r1.34 identd.c --- identd.c4 Sep 2016 14:39:32 - 1.34 +++ identd.c5 Apr

mmap:ing /dev/rsdNc fails with EINVAL on all my attempts pages give no hint. Any way around it?

2017-04-05 Thread Tinker
Hi tech@, (I post it here as this is a low level tech question. Any extended talk should be moved to misc@..) Any way I try to mmap /dev/rsd0c , I get EINVAL (22). Neither http://man.openbsd.org/mmap nor http://man.openbsd.org/sd gives any hint. "ls -l /dev/rsd0c; ls -l /dev/sd0c" shows

Re: mmap:ing /dev/rsdNc fails with EINVAL on all my attempts pages give no hint. Any way aroundit?

2017-04-05 Thread Ted Unangst
disks cannot be mmapped. Tinker wrote: > Hi tech@, > > (I post it here as this is a low level tech question. Any extended talk > should be moved to misc@..) > > Any way I try to mmap /dev/rsd0c , I get EINVAL (22). > > Neither http://man.openbsd.org/mmap nor http://man.openbsd.org/sd gives >

Re: mmap:ing /dev/rsdNc fails with EINVAL on all my attempts pages give no hint. Any way around it?

2017-04-05 Thread Todd C. Miller
Not all devices support mmap. Only those that define a d_mmap entry in cdevsw[] will work (see conf.c and conf.h in the kernel). On OpenBSD, disks can not be mmaped. - todd

Re: syslogd log_warn

2017-04-05 Thread Alexander Bluhm
On Fri, Mar 17, 2017 at 02:09:35AM +0100, Alexander Bluhm wrote: > This is the next step for refactoring internal syslogd(8) logging. Replace logerror() functions with generic log_warn() from log.c. Make messages a bit more consistent. Note that the new function supports format strings. Replace

Re: mmap:ing /dev/rsdNc fails with EINVAL on all my attempts pages give no hint. Any way around it?

2017-04-05 Thread Theo de Raadt
> On 2017-04-05 17:24, Theo de Raadt wrote: > >> "ls -l /dev/rsd0c; ls -l /dev/sd0c" shows that sd0c is a block device > >> and rsd0c is a character device, and mmap's man page says that > >> "character special files" are OK. > > > > The manual pages will never list all restrictions. > >

Re: mmap:ing /dev/rsdNc fails with EINVAL on all my attempts pages give no hint. Any way around it?

2017-04-05 Thread Tinker
On 2017-04-05 18:05, Theo de Raadt wrote: .. >> So presently higher-speed access is restricted to read()/write() - >> noted. > > So what? Yeah you're right - while some really nice code out there such as LMDB depends on mmap, and mmap may be a bliss in how it abstracts away the externality of a

Re: mmap:ing /dev/rsdNc fails with EINVAL on all my attempts pages give no hint. Any way around it?

2017-04-05 Thread Tinker
On 2017-04-05 17:24, Theo de Raadt wrote: "ls -l /dev/rsd0c; ls -l /dev/sd0c" shows that sd0c is a block device and rsd0c is a character device, and mmap's man page says that "character special files" are OK. The manual pages will never list all restrictions. /dev/sd* delivers ~120MB/sec

Re: mmap:ing /dev/rsdNc fails with EINVAL on all my attempts pages give no hint. Any way around it?

2017-04-05 Thread Theo de Raadt
> On 2017-04-05 17:36, Theo de Raadt wrote: > >> On 2017-04-05 17:24, Theo de Raadt wrote: > >> >> "ls -l /dev/rsd0c; ls -l /dev/sd0c" shows that sd0c is a block device > >> >> and rsd0c is a character device, and mmap's man page says that > >> >> "character special files" are OK. > >> > > >> >

Re: mmap:ing /dev/rsdNc fails with EINVAL on all my attempts pages give no hint. Any way around it?

2017-04-05 Thread Todd C. Miller
On Wed, 05 Apr 2017 11:24:11 -0600, "Theo de Raadt" wrote: > > "ls -l /dev/rsd0c; ls -l /dev/sd0c" shows that sd0c is a block device > > and rsd0c is a character device, and mmap's man page says that > > "character special files" are OK. > > The manual pages will never list all restrictions. In

Re: [patch] doas(1): use a #define for the environment variable name length limit

2017-04-05 Thread Ted Unangst
bytevolc...@safe-mail.net wrote: > No functional or user-visible changes here. > On that note, where did the "1024" (1023-char) come from? Is there > anyone who has environment variables whose name goes near 1023 chars? Probably not, but there's not much benefit to be artifically limiting here.

Re: mmap:ing /dev/rsdNc fails with EINVAL on all my attempts pages give no hint. Any way around it?

2017-04-05 Thread Tinker
(Not moving to misc@ as I expect this to be the last correspondence round on this topic) On 2017-04-05 17:36, Theo de Raadt wrote: On 2017-04-05 17:24, Theo de Raadt wrote: >> "ls -l /dev/rsd0c; ls -l /dev/sd0c" shows that sd0c is a block device >> and rsd0c is a character device, and mmap's

makefs filename handling

2017-04-05 Thread Martin Natano
Turns out there is no need to have a CD9660MAXPATH define. It is used to construct the path for opening the file, so PATH_MAX makes more sense here. While there I changed the code to do two less allocations per file. Still seems to work fine. Ok? natano Index: cd9660.c

Re: syslogd log_info

2017-04-05 Thread Alexander Bluhm
On Wed, Apr 05, 2017 at 02:29:46PM -0600, Todd C. Miller wrote: > On Wed, 05 Apr 2017 22:23:58 +0200, Alexander Bluhm wrote: > > > The function logmsg() was used to generate local messages and to > > process incomming messages. Split this functionality into log_info() > > and logline(). Sort

Re: syslogd log fatal

2017-04-05 Thread Todd C. Miller
On Wed, 05 Apr 2017 13:58:12 +0200, Alexander Bluhm wrote: > On Fri, Mar 17, 2017 at 02:09:35AM +0100, Alexander Bluhm wrote: > > This is the next step for refactoring internal syslogd(8) logging. > > Replace all combinations of logerror() and die() with log.c fatal(). > Also all err(3) after

wsconsctl(8): mention decrement assignment in man-page

2017-04-05 Thread Anton Lindqvist
Hi, Support for decrementing a variable using the '-=' operator with wsconsctl was added in r1.11 of wsconsctl.c. It never ended up being documented. One might deduce that '-=' works since '+=' does. However, I think adding documentation would be helpful. Index: wsconsctl.8

Re: syslogd log fatal

2017-04-05 Thread Todd C. Miller
On Wed, 05 Apr 2017 16:51:13 +0200, Alexander Bluhm wrote: > Syslogd's fatal() calls die() internally, so there is no change in > behavior. The idea is that you may call fatal() anywhere and die() > will do cleanup if necessary. Ah, right, I missed that. - todd

Re: syslogd log startup

2017-04-05 Thread Alexander Bluhm
On Fri, Mar 17, 2017 at 02:09:35AM +0100, Alexander Bluhm wrote: > This is the next step for refactoring internal syslogd(8) logging. Here is my final diff for now, thanks for all the reviews. The variable Startup is not used anymore and can be deleted. The functionality has moved into

Re: syslogd log startup

2017-04-05 Thread Todd C. Miller
On Thu, 06 Apr 2017 00:03:34 +0200, Alexander Bluhm wrote: > On Fri, Mar 17, 2017 at 02:09:35AM +0100, Alexander Bluhm wrote: > > This is the next step for refactoring internal syslogd(8) logging. > > Here is my final diff for now, thanks for all the reviews. > > The variable Startup is not

Re: Better error output for readlink(1)

2017-04-05 Thread Scott Cheloha
> On Apr 5, 2017, at 2:48 AM, Nicholas Marriott wrote: > >> On Tue, Apr 04, 2017 at 05:03:26PM -0500, Scott Cheloha wrote: >> >> [...] >> >> In the current code, however, you could have insufficient permissions >> for a part of the path (EPERM), or an I/O failure (EIO), but otherwise >> specify

Re: syslogd log_info

2017-04-05 Thread Alexander Bluhm
On Fri, Mar 17, 2017 at 02:09:35AM +0100, Alexander Bluhm wrote: > This is the next step for refactoring internal syslogd(8) logging. The function logmsg() was used to generate local messages and to process incomming messages. Split this functionality into log_info() and logline(). Sort the

Re: syslogd log_info

2017-04-05 Thread Todd C. Miller
On Wed, 05 Apr 2017 22:23:58 +0200, Alexander Bluhm wrote: > The function logmsg() was used to generate local messages and to > process incomming messages. Split this functionality into log_info() > and logline(). Sort the parameters like they appear in the syslog > line. Shouldn't vlogmsg()

Re: wsconsctl(8): mention decrement assignment in man-page

2017-04-05 Thread Jason McIntyre
On Wed, Apr 05, 2017 at 04:37:04PM +0200, Anton Lindqvist wrote: > Hi, > Support for decrementing a variable using the '-=' operator with > wsconsctl was added in r1.11 of wsconsctl.c. It never ended up being > documented. One might deduce that '-=' works since '+=' does. > However, I think adding

Re: syslogd log fatal

2017-04-05 Thread Alexander Bluhm
On Fri, Mar 17, 2017 at 02:09:35AM +0100, Alexander Bluhm wrote: > This is the next step for refactoring internal syslogd(8) logging. Replace all combinations of logerror() and die() with log.c fatal(). Also all err(3) after log_init() are replaced. ok? bluhm Index: usr.sbin/syslogd/syslogd.c

Re: syslogd log_info

2017-04-05 Thread Todd C. Miller
On Wed, 05 Apr 2017 22:36:36 +0200, Alexander Bluhm wrote: > On Wed, Apr 05, 2017 at 02:29:46PM -0600, Todd C. Miller wrote: > > On Wed, 05 Apr 2017 22:23:58 +0200, Alexander Bluhm wrote: > > > > > The function logmsg() was used to generate local messages and to > > > process incomming messages.

Re: [patch] doas(1): use a #define for the environment variable name length limit

2017-04-05 Thread bytevolcano
On Wed, 05 Apr 2017 15:07:40 -0400 "Ted Unangst" wrote: > bytevolc...@safe-mail.net wrote: > > No functional or user-visible changes here. > > On that note, where did the "1024" (1023-char) come from? Is there > > anyone who has environment variables whose name goes near

Re: syslogd log ttymsg

2017-04-05 Thread Todd C. Miller
On Wed, 05 Apr 2017 23:46:45 +0200, Alexander Bluhm wrote: > On Fri, Mar 17, 2017 at 02:09:35AM +0100, Alexander Bluhm wrote: > > This is the next step for refactoring internal syslogd(8) logging. > > As we did not have nice log functions before, ttymsg() had to return > the error string. Log

Re: syslogd log ttymsg

2017-04-05 Thread Alexander Bluhm
On Fri, Mar 17, 2017 at 02:09:35AM +0100, Alexander Bluhm wrote: > This is the next step for refactoring internal syslogd(8) logging. As we did not have nice log functions before, ttymsg() had to return the error string. Log the message where the error happens and make the function void. ok?

Re: syslogd log fatal

2017-04-05 Thread Alexander Bluhm
On Wed, Apr 05, 2017 at 08:18:03AM -0600, Todd C. Miller wrote: > On Wed, 05 Apr 2017 13:58:12 +0200, Alexander Bluhm wrote: > > Replace all combinations of logerror() and die() with log.c fatal(). > > Also all err(3) after log_init() are replaced. > > This is before we start accepting log

Re: libc++abi unwinder fix

2017-04-05 Thread Jonathan Gray
On Wed, Apr 05, 2017 at 02:48:00PM +0200, Mark Kettenis wrote: > The unwinder code is a mix of C and C++, but only the C++ code was > compiled with -funwind-tables. However, the unwinder relies on being > able to unwind through the _Unwind_RaiseException(), which lives in on > of the C files.