Re: ftp: avoid casts in networking functions

2016-08-22 Thread Jeremie Courreges-Anglas
"Todd C. Miller" writes: > On Sun, 21 Aug 2016 14:23:33 -0600, "Todd C. Miller" wrote: > >> We could get rid of struct sockinet entirely but I wasn't sure > it > was worth it. > > Here's a diff that replaces sockunion with the more common > sockaddr_union. ok jca@ --

Re: fgetwln(3) fails to report most encoding errors

2016-08-21 Thread Jeremie Courreges-Anglas
Ingo Schwarze writes: > Hi, > > did i mention already that libc wide character code is buggy as hell? > I looked at another very simple function of only 30 lines of code > and promptly found another bug. > > The fgetwln(3) manual is quite explicit that the "fgetwln() function >

Re: Fix relro coredumps

2016-08-12 Thread Jeremie Courreges-Anglas
Mark Kettenis writes: > With relro, certain bits of a process that were mapped into memory as > writable are revreted back to read-only after making some initial > changes. Since the kernel coredump code only writes out writable > pieces of memory, these relro bits are

Re: jot: use strchr(3) and strspn(3) in getprec()

2016-08-12 Thread Jeremie Courreges-Anglas
Theo Buehler writes: > Here's one final diff I have for jot for now: > > Use strchr(3) and strspn(3) instead of handrolled functions. > > Part of dsl@NetBSD's r1.20. ok jca@ -- jca | PGP: 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE

Don't mention 6bone in sshd_config(5)

2016-08-12 Thread Jeremie Courreges-Anglas
IPv6 provides a dedicated range for documentation, so let's use it. This is consistent with the IPv4 example. ok? Index: sshd_config.5 === RCS file: /cvs/src/usr.bin/ssh/sshd_config.5,v retrieving revision 1.227 diff -u -p -p -u

Re: read(2) on directories

2016-08-08 Thread Jeremie Courreges-Anglas
j...@wxcvbn.org (Jeremie Courreges-Anglas) writes: > "Todd C. Miller" <todd.mil...@courtesan.com> writes: > >> From source inspection, Net and Free appear to allow read(2) of >> dirs to succeed. However, since Linux, Mac OS X and Solaris have >> the EIS

move rusers(1) to poll(2)

2016-08-02 Thread Jeremie Courreges-Anglas
Low priority as there isn't really room for fd_set overflow here, but I think we agree that moving to poll(2) is always a good thing. Seems to work fine in a simple setup. Not checking for POLLHUP since those are UDP sockets. ok? Index: rusers.c

Re: read(2) on directories

2016-08-02 Thread Jeremie Courreges-Anglas
"Todd C. Miller" writes: > From source inspection, Net and Free appear to allow read(2) of > dirs to succeed. However, since Linux, Mac OS X and Solaris have > the EISDIR behavior I think it is probably safe from a portability > standpoint. > > We're long past the

Re: confpars.c patch

2016-08-02 Thread Jeremie Courreges-Anglas
Edgar Pettijohn <ed...@pettijohn-web.com> writes: > Sent from my iPhone > >> On Aug 2, 2016, at 7:00 AM, Jeremie Courreges-Anglas <j...@wxcvbn.org> wrote: >> >> Edgar Pettijohn <ed...@pettijohn-web.com> writes: >> >>> I'm not sure

Re: Alternative control socket location in ripd

2016-08-02 Thread Jeremie Courreges-Anglas
Committed, thanks. -- jca | PGP: 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE

Re: confpars.c patch

2016-08-02 Thread Jeremie Courreges-Anglas
Edgar Pettijohn writes: > I'm not sure if this was intentional or not, but here is a small diff > for usr.sbin/dhcpd/confpars.c. K vs ANSI function definitions. That file contains other occurrences. -- jca | PGP: 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE

Re: libtool -bindir support

2016-08-02 Thread Jeremie Courreges-Anglas
Marc Espie <es...@nerim.net> writes: > On Mon, Aug 01, 2016 at 01:58:24PM +0200, Jeremie Courreges-Anglas wrote: >> j...@wxcvbn.org (Jeremie Courreges-Anglas) writes: >> >> > +cc espie and jasper >> > >> > Antoine Jacoutot <ajacou...@bsdfrog.or

Re: Alternative control socket location in ripd

2016-08-02 Thread Jeremie Courreges-Anglas
Nima GHOTBI <n...@parta.com.tr> writes: > please try the attachments > > On Sun, Jul 31, 2016 at 7:27 PM, Jeremie Courreges-Anglas <j...@wxcvbn.org> > wrote: > >> Nima GHOTBI <n...@parta.com.tr> writes: >> >> > Hi everyone >> > >&

Re: C startup code: make crtbegin code safe for clang

2016-08-01 Thread Jeremie Courreges-Anglas
Stefan Kempf writes: > The constructor and destructor tables are declared as arrays with one > non-NULL element. Walking those until a NULL element is reached looks > like out-of-bound accesses to newer compilers, and they turn the code > into infinite loops (e.g. clang 3.8),

Re: libtool -bindir support

2016-08-01 Thread Jeremie Courreges-Anglas
j...@wxcvbn.org (Jeremie Courreges-Anglas) writes: > +cc espie and jasper > > Antoine Jacoutot <ajacou...@bsdfrog.org> writes: > >> On Sun, Jul 31, 2016 at 07:21:39PM +0200, Antoine Jacoutot wrote: >>> On July 31, 2016 7:14:21 PM GMT+02:00, j...@wxcvbn.org wrote:

Re: libtool -bindir support

2016-08-01 Thread Jeremie Courreges-Anglas
+cc espie and jasper Antoine Jacoutot writes: > On Sun, Jul 31, 2016 at 07:21:39PM +0200, Antoine Jacoutot wrote: >> On July 31, 2016 7:14:21 PM GMT+02:00, j...@wxcvbn.org wrote: >> > >> >Making read(2) return EISDIR for directories breaks two ports, both >> >because

small ndp(8) fix

2016-07-31 Thread Jeremie Courreges-Anglas
WARNINGS=Yes says: /usr/src/usr.sbin/ndp/ndp.c: In function 'dump': /usr/src/usr.sbin/ndp/ndp.c:564: warning: 'lim' may be used uninitialized in this function The warning looks legitimate, IIUC there's room here for invalid memory accesses (those would probably involve ndp -A). Here's a fix

Re: Use of uninitialized variables in binutils-2.17

2016-07-31 Thread Jeremie Courreges-Anglas
Stefan Kempf writes: > clang errors out about use of undefined variables when building > binutils-2.17. > > In elf.c, do not increment `s' before it is initialized. At the time > of the increment, `s' is otherwise unused anyway. > > In elflink.c, initialize sec_contents and

libtool -bindir support

2016-07-31 Thread Jeremie Courreges-Anglas
Making read(2) return EISDIR for directories breaks two ports, both because they use libtool -bindir. cc(1) gets executed with an unknown option, -bindir, and a path such as /usr/local/bin, which then gets passed to ld(1). ld(1) copes with read(2) returning 0, not with EISDIR. Thanks to Antoine

Re: Alternative control socket location in ripd

2016-07-31 Thread Jeremie Courreges-Anglas
Nima GHOTBI writes: > Hi everyone > > In one of our projects we had to run multiple instances of ripd on > different rdomains so I made a patch to add "-s" argument to ripd and > ripctl to let the user change control socket path from /var/run/ripd.sock Sounds like a valuable

Re: hotplugd restart problem

2016-07-31 Thread Jeremie Courreges-Anglas
Martin Natano writes: > On Mon, Jul 25, 2016 at 02:17:11PM +0300, Alexey Vatchenko wrote: >> Hi! >> If something is running which is started from attach script, restarting of >> hotplugd fails because /dev/hotplug is occupied by child process. >> >> Attached is the patch to

Re: A patch for allowing IPv6-only or IPv4-only bridges

2016-07-18 Thread Jeremie Courreges-Anglas
Landry Breuil writes: > On Mon, Jul 18, 2016 at 11:27:56AM +0200, Quentin Rameau wrote: >> Hi Martin, >> >> > As discussed with landry@ and sthen@ this won't be merged. Your problem >> > could also be solved by using a NDP proxy, that's a solution we would >> > recommend if

read(2) on directories

2016-07-12 Thread Jeremie Courreges-Anglas
Sending this now to get opinions, but I do not plan any change for 6.0. Since I started to use OpenBSD I've always found confusing that cat /directory/ doesn't error out. I initially assumed that it was historical behavior, but, as hinted by Theo, in rev. 1.1 the behavior was actually to

Re: Introduce M_ACAST

2016-07-12 Thread Jeremie Courreges-Anglas
Martin Pieuchot writes: > Turning the IPv6 forwarding path MP-safe implies, in a first step, to > defer local delivery to a context serialized by the KERNEL_LOCK(). This > is the same design as for IPv4. > > In order to keep discarding TCP-over-Anycast I'm using an mbuf(9)

Re: Auto tunnel - RFC4213

2016-07-12 Thread Jeremie Courreges-Anglas
Martin Pieuchot writes: > By default we have a route to reject compatible addresses: > > ::/96 ::1UGRS 0 0 32768 8 lo0 > > But the corresponding check in ip6_input() is still commented because it > is "stronger than RFC1933".

Re: route6d summer cleanup

2016-07-09 Thread Jeremie Courreges-Anglas
j...@wxcvbn.org (Jeremie Courreges-Anglas) writes: > j...@wxcvbn.org (Jeremie Courreges-Anglas) writes: > >> j...@wxcvbn.org (Jeremie Courreges-Anglas) writes: >> >>> Nobody cares about route6d, and it shows: runas as root, not chrooted. >>> Also it uses wide p

Re: route6d summer cleanup

2016-07-06 Thread Jeremie Courreges-Anglas
j...@wxcvbn.org (Jeremie Courreges-Anglas) writes: > j...@wxcvbn.org (Jeremie Courreges-Anglas) writes: > >> Nobody cares about route6d, and it shows: runas as root, not chrooted. >> Also it uses wide pledge(2) permissions. >> >> I have diffs to switch the logging

Re: route6d summer cleanup

2016-07-06 Thread Jeremie Courreges-Anglas
j...@wxcvbn.org (Jeremie Courreges-Anglas) writes: > Nobody cares about route6d, and it shows: runas as root, not chrooted. > Also it uses wide pledge(2) permissions. > > I have diffs to switch the logging to log.c and use it to support the -R > option and /var/run/route6d_dump

route6d summer cleanup

2016-07-05 Thread Jeremie Courreges-Anglas
Nobody cares about route6d, and it shows: runas as root, not chrooted. Also it uses wide pledge(2) permissions. I have diffs to switch the logging to log.c and use it to support the -R option and /var/run/route6d_dump. The end goal is to use a tighter pledge(2) call: + if (pledge("stdio

Re: pledge bpf + 32bit arch unbreak

2016-07-05 Thread Jeremie Courreges-Anglas
Martin Pelikan writes: [...] > The uint64_t part still stands. ok jca@ -- jca | PGP: 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE

Re: ypbind: convert from select to poll

2016-07-04 Thread Jeremie Courreges-Anglas
"Todd C. Miller" <todd.mil...@courtesan.com> writes: > On Mon, 04 Jul 2016 14:45:57 +0200, Jeremie Courreges-Anglas wrote: > >> The two sockets we check for are SOCK_DGRAM sockets, I assumed that we >> can't get POLLHUP on such sockets. Wrong assumption? >

Re: Stop mesa W^X violations

2016-07-04 Thread Jeremie Courreges-Anglas
Mark Kettenis <mark.kette...@xs4all.nl> writes: >> From: j...@wxcvbn.org (Jeremie Courreges-Anglas) >> Date: Mon, 27 Jun 2016 23:40:35 +0200 >> >> Mark Kettenis <mark.kette...@xs4all.nl> writes: >> >> > As reported by several people, mes

Re: ypbind: convert from select to poll

2016-07-04 Thread Jeremie Courreges-Anglas
"Todd C. Miller" <todd.mil...@courtesan.com> writes: > On Mon, 04 Jul 2016 12:43:12 +0200, Jeremie Courreges-Anglas wrote: > >> Showing this to a wider audience, >> >> This was initially prompted by a diff to replace calloc with >> reallocar

ypbind: convert from select to poll

2016-07-04 Thread Jeremie Courreges-Anglas
Showing this to a wider audience, This was initially prompted by a diff to replace calloc with reallocarray. As noted by guenther, there is a problem with the comparisons between width, rpcsock and pingsock; this, plus the fd_set allocation inconvenience would be easily fixed by moving from

Re: rcs: support -I

2016-07-03 Thread Jeremie Courreges-Anglas
"Todd C. Miller" writes: > The -I flag is documented but not implemented. This fixes that and > also honors the -I flag from ci/co when prompting as per GNU rcs. Looks correct & works fine here, ok jca@ -- jca | PGP: 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA

Re: convert rtadvd to libevent

2016-07-03 Thread Jeremie Courreges-Anglas
j...@wxcvbn.org (Jeremie Courreges-Anglas) writes: > Custom timers go away, ra_timer_update's signature is simplified. The > diff also includes the ctime changes proposed in a standalone diff. > The rescheduling of the next RA in rs_input() is probably the least > trivial part.

Re: malloc.conf: better docs and impl for J/J

2016-07-02 Thread Jeremie Courreges-Anglas
Otto Moerbeek writes: > Hi, > > J/j is actually a three valued var. So document that and make it > possible to set all three values. Default is still 1. ok -- jca | PGP: 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE

Re: ART/SRP regression

2016-07-02 Thread Jeremie Courreges-Anglas
Martin Pieuchot writes: > Last change reworking art_walk() introduced a regression leading to a > of-by-one in rtable_walk(). You can trigger it by running the route(8) > regress test 5: > > # cd /usr/src/regress/sbin/route && make rttest 5 > # route -T5 -n show > Routing

convert rtadvd to libevent

2016-07-01 Thread Jeremie Courreges-Anglas
Custom timers go away, ra_timer_update's signature is simplified. The diff also includes the ctime changes proposed in a standalone diff. The rescheduling of the next RA in rs_input() is probably the least trivial part. Comments / oks? Index: Makefile

Re: various rtadvd cleanups

2016-06-29 Thread Jeremie Courreges-Anglas
j...@wxcvbn.org (Jeremie Courreges-Anglas) writes: > I have a diff to move rtadvd to libevent, but first there's a bunch of > ugly stuff I'd like to get rid of. Committed with input from Florian, except > - pointless casts, kill caddr_t or replace it with char * > - signed counte

Re: rtadvd(8): fix potential NULL deref

2016-06-29 Thread Jeremie Courreges-Anglas
Florian Obser writes: > rtadvd_check_timer() might return NULL if no timers need to run. > I'm not 100% sure if it can happen in practice though, but still... You can trigger it easily by running rtadvd on a single interface and putting that interface down. set timer to

various rtadvd cleanups

2016-06-28 Thread Jeremie Courreges-Anglas
I have a diff to move rtadvd to libevent, but first there's a bunch of ugly stuff I'd like to get rid of. - pointless casts, kill caddr_t or replace it with char * - signed counters - extra newline due to ctime(3) in rtadvd_dump - simplify if_getmtu, only one method is needed and SIOCGIFMTU is

Re: IPV6_MINHOPCOUNT on UDP sockets

2016-06-28 Thread Jeremie Courreges-Anglas
Alexander Bluhm <alexander.bl...@gmx.net> writes: > On Tue, Jun 28, 2016 at 01:27:59PM +0200, Jeremie Courreges-Anglas wrote: >> IP_MINTTL also benefits from this. Do we want to list SOCK_STREAM and >> SOCK_DRAM here, or use more generic language? > > We should mention

Re: IPV6_MINHOPCOUNT on UDP sockets

2016-06-28 Thread Jeremie Courreges-Anglas
Renato Westphal writes: > 2016-06-27 19:01 GMT-03:00 Alexander Bluhm : >> On Mon, Jun 27, 2016 at 11:57:08PM +0200, J??r??mie Courr??ges-Anglas wrote: >>> Alexander Bluhm writes: >>> > The man page says IPV6_MINHOPCOUNT

Re: IPV6_MINHOPCOUNT on UDP sockets

2016-06-27 Thread Jeremie Courreges-Anglas
Renato Westphal writes: > 2016-06-27 19:01 GMT-03:00 Alexander Bluhm : >> On Mon, Jun 27, 2016 at 11:57:08PM +0200, J??r??mie Courr??ges-Anglas wrote: >>> Alexander Bluhm writes: >>> > The man page says IPV6_MINHOPCOUNT

Re: Stop mesa W^X violations

2016-06-27 Thread Jeremie Courreges-Anglas
Mark Kettenis writes: > As reported by several people, mesa contains code that violates W^X. > As a result glxgears aborts when using the swrast driver. The diff > below disables the offending code. The code seems to deal the absence > of W|X memory just fine. There

IPV6_MINHOPCOUNT on UDP sockets

2016-06-27 Thread Jeremie Courreges-Anglas
Renato would like to implement GTSM in ldpd(8), the first step would be to support IPV6_MINHOPCOUNT on SOCK_DGRAM sockets. The following diff seems to work fine for him. I did not go down all possible *_input() methods, only regular TCP and UDP sockets. Is that enough to deserve the associated

kill(2) and zombie processes

2016-06-27 Thread Jeremie Courreges-Anglas
Some time ago someone reported a wird behavior in the shells/zsh ports. http://marc.info/?l=openbsd-misc=146101806918986=2 The latter relies on kill(zombie, 0) to succeed, instead we return -1. This is because zombie processes aren't looked up in sys_kill(). A potential fix was suggested,

Re: use inp_hops in tcp accept

2016-06-27 Thread Jeremie Courreges-Anglas
Alexander Bluhm <alexander.bl...@gmx.net> writes: > On Mon, Jun 27, 2016 at 01:16:51PM +0200, Jeremie Courreges-Anglas wrote: >> This looks much less confusing indeed. Note that this conflicts with >> your last diff to fix inp_hops. > > Here is a new version of my

Re: tcp syn cache new and old inp variables

2016-06-27 Thread Jeremie Courreges-Anglas
Alexander Bluhm writes: > Hi, > > The variable swapping between inp, newinp and oldinpcb in syn_cache_get() > is overly complicated. Simplify the code without functional change. This looks much less confusing indeed. Note that this conflicts with your last diff to fix

in6_selecthlim() comment

2016-06-27 Thread Jeremie Courreges-Anglas
The comment is not accurate anymore. Since a few months the hop limit that can be specified via RA is ignored. There are two ways to fix the comment: amend it or delete it. Here, I think that the function is trivial enough that a comment isn't needed. ok/nay? Index: in6_src.c

ppp_compressors

2016-06-21 Thread Jeremie Courreges-Anglas
We don't support modules, so no need to reserve space for additional PPP compression methods. ok? Index: if_ppp.c === RCS file: /cvs/src/sys/net/if_ppp.c,v retrieving revision 1.99 diff -u -p -p -u -r1.99 if_ppp.c --- if_ppp.c

Re: Not enough inodes on /usr for ports/xenocara

2016-06-15 Thread Jeremie Courreges-Anglas
Otto Moerbeek <o...@drijf.net> writes: > On Tue, Jun 14, 2016 at 06:14:05PM +0200, Jeremie Courreges-Anglas wrote: > >> Marc Peters <m...@mpeters.org> writes: >> >> > Hi, >> > >> > i just did an installation of a HP DL360 Gen9 to te

Re: Not enough inodes on /usr for ports/xenocara

2016-06-14 Thread Jeremie Courreges-Anglas
Amit Kulkarni writes: > On Tue, Jun 14, 2016 at 8:41 AM, Marc Peters wrote: > >> Hi, >> >> i just did an installation of a HP DL360 Gen9 to test UEFI installations >> with 5.9. I just accepted most of the defaults and did this for the >> disklabels, too. I

Re: IP_SENDSRCADDR [2/2] : add cmsg support

2016-06-14 Thread Jeremie Courreges-Anglas
Martin Pieuchot <m...@openbsd.org> writes: > On 14/06/16(Tue) 13:49, Jeremie Courreges-Anglas wrote: >> Vincent Gross <vgr...@openbsd.org> writes: >> > On Mon, 13 Jun 2016 19:57:15 +0200 >> > Jeremie Courreges-Anglas <j...@wxcvbn.org> wrote: &g

Re: IP_SENDSRCADDR [2/2] : add cmsg support

2016-06-14 Thread Jeremie Courreges-Anglas
Vincent Gross <vgr...@openbsd.org> writes: > On Mon, 13 Jun 2016 19:57:15 +0200 > Jeremie Courreges-Anglas <j...@wxcvbn.org> wrote: > >> Vincent Gross <vgr...@openbsd.org> writes: >> >> > Le Mon, 13 Jun 2016 07:35:16 +0200, >> > j...@wxcvb

Re: IP_SENDSRCADDR [1/2] : move cmsg handling code

2016-06-13 Thread Jeremie Courreges-Anglas
Vincent Gross writes: > On Sun, 12 Jun 2016 15:00:14 +0200 > Vincent Gross wrote: > > Damn you autowrap ! get off my diff ! > > (thanks jca@ for spotting) > >> This diff moves the cmsg handling code on top of udp_output(). I split >> the whole

Re: IP_SENDSRCADDR [2/2] : add cmsg support

2016-06-13 Thread Jeremie Courreges-Anglas
Vincent Gross <vgr...@openbsd.org> writes: > Le Mon, 13 Jun 2016 07:35:16 +0200, > j...@wxcvbn.org (Jeremie Courreges-Anglas) a écrit : > >> j...@wxcvbn.org (Jeremie Courreges-Anglas) writes: >> >> > cc'ing sthen since he also has interest in IP_SENDSRCADDR &

Re: IP_SENDSRCADDR [2/2] : add cmsg support

2016-06-12 Thread Jeremie Courreges-Anglas
Vincent Gross writes: > On Sun, 12 Jun 2016 15:29:32 +0200 (CEST) > Mark Kettenis wrote: > >> > Date: Sun, 12 Jun 2016 14:59:55 +0200 >> > From: Vincent Gross >> > >> > This diff adds support for IP_SENDSRCADDR cmsg on UDP

Kill sysctl net.inet6.ip6.rr_prune

2016-05-31 Thread Jeremie Courreges-Anglas
We don't support Router Renumbering (RFC2894). ok? Index: lib/libc/gen/sysctl.3 === RCS file: /cvs/src/lib/libc/gen/sysctl.3,v retrieving revision 1.259 diff -u -p -r1.259 sysctl.3 --- lib/libc/gen/sysctl.3 29 May 2016

Re: ptrace PT_IO write bug

2016-05-31 Thread Jeremie Courreges-Anglas
Mark Kettenis <mark.kette...@xs4all.nl> writes: >> From: Jeremie Courreges-Anglas <j...@wxcvbn.org> >> Date: Mon, 30 May 2016 19:30:27 +0200 >> >> Mark Kettenis <mark.kette...@xs4all.nl> writes: >> >> > Mathieu - schreef op 2016-05-28 13:

Re: ptrace PT_IO write bug

2016-05-30 Thread Jeremie Courreges-Anglas
Mark Kettenis writes: > Mathieu - schreef op 2016-05-28 13:05: >> Martin Natano wrote: >>> The diff reads fine to me, however it is incomplete. There are some >>> callers of process_domem() in arch/. They will need to be changed too. >>> req seems to be in sync with

Re: rbootd: simplify signal handling

2016-05-28 Thread Jeremie Courreges-Anglas
Philip Guenther writes: > Actually, the signal handling was simplified 14(!) years ago by miod@ when > he changed rbootd to do all processing from its main loop, with signals > just setting flags tested there. This diff just removes the blocking and > unblocking that was

Re: mklocale(1): ignore blanks after VARIABLE

2016-05-28 Thread Jeremie Courreges-Anglas
"Todd C. Miller" writes: > Currently, mklocale only ignores the first blank after the VARIABLE > definition. This means that we store the variable definition along > with the leading blanks. > > The lexer should eat the blanks after VARIABLE before storing the >

Re: rcmdsh(3): use getaddrinfo() not gethostbyname2()

2016-05-28 Thread Jeremie Courreges-Anglas
"Todd C. Miller" writes: > rmcd(3) was converted ages ago but apparently this was missed. ok jca@ Note that the manpage still refers to gethostbyname(3). -- jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE

Re: ptrace PT_IO write bug

2016-05-28 Thread Jeremie Courreges-Anglas
Mathieu - writes: > Martin Natano wrote: >> The diff reads fine to me, however it is incomplete. There are some >> callers of process_domem() in arch/. They will need to be changed too. >> req seems to be in sync with uio_rw in all the cases, so just removing >> the last

Re: ptrace PT_IO write bug

2016-05-27 Thread Jeremie Courreges-Anglas
Mathieu - writes: > Hello everyone, > > While playing a bit with ptrace to do some debugging I stumbled upon > something that looks like a bug. > While trying to write to the ptrace'd process using PT_IO in combinaison > with PIOD_WRITE_D I kept getting EFAULTs. > PIOD_READ_D

Re: replace bpf open loops

2016-05-27 Thread Jeremie Courreges-Anglas
Martin Natano writes: > I think it's time to get rid of all the bpf open() loops in base. > dhclient and libpcap do a plain open("/dev/bpf0", ...) since a couple of > weeks now and the upgrade issue (/dev/bpf vs. /dev/bpf0) has been fixed. > I didn't hear any other complaints

Kill sysctl net.inet6.ip6.v6only

2016-05-18 Thread Jeremie Courreges-Anglas
As noticed by djm it doesn't make much sense to expose this in sysctl(8) output. ok? Index: sbin/sysctl/sysctl.8 === RCS file: /cvs/src/sbin/sysctl/sysctl.8,v retrieving revision 1.193 diff -u -p -r1.193 sysctl.8 ---

Re: [ntpd] Simultaneously listen on IPv4 and IPv6

2016-05-18 Thread Jeremie Courreges-Anglas
Stuart Henderson <s...@spacehopper.org> writes: > On 2016/05/18 14:01, Jeremie Courreges-Anglas wrote: >> Stuart Henderson <s...@spacehopper.org> writes: >> >> > Removing the sysctl should be very pretty safe as far as ports goes (I >> > did wonde

Re: [ntpd] Simultaneously listen on IPv4 and IPv6

2016-05-18 Thread Jeremie Courreges-Anglas
Stuart Henderson writes: > Removing the sysctl should be very pretty safe as far as ports goes (I > did wonder if thing s might read the sysctl and change behaviour but it > seems that's not the case). Looks like only nsh will break from doing > that and it's easily fixed.

Re: opendev and pledge: "privsep" for dumpfs(8)

2016-05-15 Thread Jeremie Courreges-Anglas
Theo de Raadt writes: >> Must say the forking and piping seems to be a bit silly for a program >> like this. Certainly adds alot of complexity. Why not simply call >> opendev up front for each filesystem, creating a list of names and >> filedescriptors before you

Re: cleanup pppd auth

2016-05-15 Thread Jeremie Courreges-Anglas
"Ted Unangst" writes: > While making a small change to pppd, I noticed there is a lot of PAM and > shadow code which is not relevant to us. The aspiring developer may then > switch to bsd auth or even just crypt_checkpass, but first purge the tangly > morass. ok jca@, but

Re: sendbug subject

2016-05-15 Thread Jeremie Courreges-Anglas
"trondd" <tro...@kagu-tsuchi.com> writes: > On Sun, May 15, 2016 1:22 pm, Juan Francisco Cantero Hurtado wrote: >> On Sun, May 15, 2016 at 06:43:16PM +0200, Jeremie Courreges-Anglas wrote: >>> "Ted Unangst" <t...@tedunangst.com> writes: >>&g

Re: sendbug subject

2016-05-15 Thread Jeremie Courreges-Anglas
"Ted Unangst" writes: > i'm tired of seeing bug reports with no subject. i also get a fair bit of spam > with no subject and i am easily confused. something is better than nothing. I fear that after that change all bug reports will only have [bug report] as Subject.

Re: rtadvd.conf.5: document route preference flags

2016-05-07 Thread Jeremie Courreges-Anglas
Martin Pieuchot <m...@openbsd.org> writes: > On 06/05/16(Fri) 21:42, Jeremie Courreges-Anglas wrote: >> >> Also motivated by http://marc.info/?l=openbsd-misc=146239072929264=2 >> >> RFC4191 defines route preference flags not only in Route Information >> op

rtadvd.conf.5: document route preference flags

2016-05-06 Thread Jeremie Courreges-Anglas
Also motivated by http://marc.info/?l=openbsd-misc=146239072929264=2 RFC4191 defines route preference flags not only in Route Information options, but also in Router Advertisement messages. Let's try to make this clear. Also, try to document the possible values in a slightly more useful way...

Re: tcpdump: print router advertisement preference

2016-05-06 Thread Jeremie Courreges-Anglas
j...@wxcvbn.org (Jeremie Courreges-Anglas) writes: > As defined by https://tools.ietf.org/html/rfc4191, prompted by > http://marc.info/?l=openbsd-misc=146239072929264=2 > > "pref" is inspired by upstream tcpdump format. > > Thoughts / ok? Committed, thanks for the r

Re: ip6_input: Double check for mapped v4 addresses

2016-05-06 Thread Jeremie Courreges-Anglas
Stuart Henderson writes: > On 2016/05/06 15:05, Martin Pieuchot wrote: >> This look like a bad merge from 2000s. This check is present twice in >> ip6_input(), so let's remove the late one, ok? >> >> Index: netinet6/ip6_input.c >>

Re: dhclient: use /dev/bpf

2016-05-05 Thread Jeremie Courreges-Anglas
Stuart Henderson writes: > On 2016/05/02 09:34, Martin Natano wrote: >> Diff below simplifies the device open path and removes an explanation >> about bpf device nodes from the manpage. > > There's a problem with this. If someone is doing an "untar sets" > upgrade (which is

Re: Clearing environ

2016-04-25 Thread Jeremie Courreges-Anglas
"Todd C. Miller" writes: > On Mon, 25 Apr 2016 16:56:47 -0400, "Ted Unangst" wrote: > >> compilers will, however, "miscompile" such code. we should avoid it. > > Fair enough. ok jca@ > - todd > > Index: lib/libc/stdlib/setenv.c >

Re: Clearing environ

2016-04-25 Thread Jeremie Courreges-Anglas
"Todd C. Miller" writes: > It is already safe to call getenv() and unsetenv() when environ is > NULL so I think it makes sense for setenv() and putenv() to also > support this. However, I'd prefer that we just wrap the loop that > counts the length of environ in an if

Clearing environ

2016-04-25 Thread Jeremie Courreges-Anglas
A few ports make use of clearenv(3), a GNU extension. This function was rejected by POSIX, so what's left? If all you want to do is clear the environment before exec(), you can construct a new environment and use execve, which is specified by POSIX. Now if a port is not using execve, but

Re: pledge: remove unneeded check in sys_pledge()

2016-04-25 Thread Jeremie Courreges-Anglas
Sebastien Marie writes: > On Sun, Apr 10, 2016 at 01:54:33PM +0200, Sebastien Marie wrote: >> Hi, >> >> The following diff removes an unneeded check on flags. It was used >> historically, when tame(2) promises were passed as bitflags, in order to >> avoid userland to be

Re: rtableid in ip6_input()

2016-04-11 Thread Jeremie Courreges-Anglas
Martin Pieuchot writes: > This variable is also used for route lookups, so it must always be > assigned. > > ok? ok jca@ > Index: netinet6//ip6_input.c > === > RCS file: /cvs/src/sys/netinet6/ip6_input.c,v >

Re: [PATCH] Proposal to remove -f for arp(8) and ndp(8)

2016-03-31 Thread Jeremie Courreges-Anglas
Jeremie Courreges-Anglas <j...@wxcvbn.org> writes: > Mike Belopuhov <m...@belopuhov.com> writes: > >> Good day, Dimitris. >> >> Long time ago in a galaxy far far away I've been using this >> alongside the -F option that I've added. While managed >

Re: [PATCH] Proposal to remove -f for arp(8) and ndp(8)

2016-03-30 Thread Jeremie Courreges-Anglas
Dimitris Papastamos writes: > On Wed, Mar 30, 2016 at 02:49:06PM +0200, Mike Belopuhov wrote: >> Good day, Dimitris. >> >> Long time ago in a galaxy far far away I've been using this >> alongside the -F option that I've added. While managed >> switches are becoming cheaper, I

Re: [PATCH] Proposal to remove -f for arp(8) and ndp(8)

2016-03-30 Thread Jeremie Courreges-Anglas
Mike Belopuhov writes: > Good day, Dimitris. > > Long time ago in a galaxy far far away I've been using this > alongside the -F option that I've added. While managed > switches are becoming cheaper, I don't see a reason for a > working feature to go away, especially since

Re: [PATCH] Proposal to remove -f for arp(8) and ndp(8)

2016-03-30 Thread Jeremie Courreges-Anglas
Dimitris Papastamos writes: > Hi everyone, Hi, > I totally forgot about this patch. At the time it couldn't go in > because the tree was locked. Does it make sense? If so I will check > whether it applies on -current and resubmit. I don't understand the rationale. Using -f

Re: wsdisplay_compat_usl/KDENABIO: no need to specisal case i386

2016-03-28 Thread Jeremie Courreges-Anglas
Matthieu Herrb writes: > Hi, > > OpenBSD has stopped using the SVr4 KDENABIO/KDDISABIO ioctls for at > least 10 years. No need for special treatement on i386. > > ok? yup -- jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE

Re: Remove build machinery for non-UTF-8 charsets

2016-03-20 Thread Jeremie Courreges-Anglas
Stefan Sperling <s...@stsp.name> writes: > On Fri, Mar 18, 2016 at 01:49:05AM +0100, Jeremie Courreges-Anglas wrote: >> >> What's the plan regarding this? libc and locale(1) don't use >> LOCALE_CHARSETS anymore, we only support UTF-8 and I doubt that we'

Remove build machinery for non-UTF-8 charsets

2016-03-19 Thread Jeremie Courreges-Anglas
What's the plan regarding this? libc and locale(1) don't use LOCALE_CHARSETS anymore, we only support UTF-8 and I doubt that we'll change our mind about that. The diff below removes support for non-UTF-8 LC_CTYPE files. It survived make release. Thoughts? Index: lib/libc/locale/Makefile.inc

Re: [PATCH] Fix size of object being freed in atascsi.c

2016-03-15 Thread Jeremie Courreges-Anglas
Jeremie Courreges-Anglas <j...@wxcvbn.org> writes: > Nick Permyakov <nick.permya...@gmail.com> writes: > >> Fixed a boot panic on my machine. >> >> Index: atascsi.c >> === >> RCS file

Re: [PATCH] Fix size of object being freed in atascsi.c

2016-03-15 Thread Jeremie Courreges-Anglas
Nick Permyakov writes: > Fixed a boot panic on my machine. > > Index: atascsi.c > === > RCS file: /cvs/src/sys/dev/ata/atascsi.c,v > retrieving revision 1.127 > diff -u -p -r1.127 atascsi.c > --- atascsi.c

Re: head(1) -c

2016-03-11 Thread Jeremie Courreges-Anglas
Jeremie Courreges-Anglas <j...@wxcvbn.org> writes: > Ingo Schwarze <schwa...@usta.de> writes: > >> Hi, > > Hi Ingo, > >> two general remarks: >> >> 1) The head(1) utility is supposed to handle text files. Our >> manual page doesn't m

Re: head(1) -c

2016-03-10 Thread Jeremie Courreges-Anglas
"Dmitrij D. Czarkoff" <czark...@gmail.com> writes: > Jeremie Courreges-Anglas said: >> To repeat myself, the addition of this rather silly option is supposed >> to reduce differences from other implementations so that we can stop >> wasting time about it.

Re: head(1) -c

2016-03-10 Thread Jeremie Courreges-Anglas
s, > so be it. If the GNU folks ever notice this, we'll very > probably get option inflation here. But we can deal with > that when it happens. > > Dmitrij D. Czarkoff wrote on Thu, Mar 10, 2016 at 09:27:05AM +0100: >> Jeremie Courreges-Anglas said: > >>&

Re: head(1) -c

2016-03-09 Thread Jeremie Courreges-Anglas
Daniel Dickman <didick...@gmail.com> writes: > On Wed, Mar 9, 2016 at 9:35 PM, Michael McConville <mm...@mykolab.com> wrote: >> Jeremie Courreges-Anglas wrote: >>> >> @@ -66,13 +66,18 @@ main(int argc, char *argv[]) >>> >>argv++; &g

Re: head(1) -c

2016-03-09 Thread Jeremie Courreges-Anglas
Theo de Raadt writes: >> >> I don't see any value in being different. Plus, tail(1) already has >> >> support for -c. >> >> >> >> Comments/ok? >> > >> > Makes sense and works for me. I'll leave a few comments inline. Also: >> > >> >> PS: the next diff will remove

Re: head(1) -c

2016-03-09 Thread Jeremie Courreges-Anglas
Michael McConville <mm...@mykolab.com> writes: > Jeremie Courreges-Anglas wrote: >> Today someone bumped into a port that contained head -c calls. While >> upstream could be prodded to care a bit more about portability, support >> for head -c is widespread (GNU

<    3   4   5   6   7   8   9   >