Re: xidle: launching program on timeout without active-area

2018-09-04 Thread Rob Pierce
On Tue, Sep 04, 2018 at 01:54:10PM +0200, Claudio Jeker wrote: > On Mon, Sep 03, 2018 at 03:49:46PM +0200, Sebastien Marie wrote: > > ping > > I like it, OK claudio@ but I'm not really a X person. I also like it and it works well for me. ok rob@ with the same caveat. Rob > > On Tue, Aug 14,

Re: Remove unused variable in usr.bin/openssl/apps.c

2018-08-16 Thread Rob Pierce
On Thu, Aug 16, 2018 at 06:14:06PM +0800, Nan Xiao wrote: > Hi tech@, > > The `free_out' variable seems redundant, so this patch removes it: > > Index: apps.c > === > RCS file: /cvs/src/usr.bin/openssl/apps.c,v > retrieving revision

remove some end-of-content code from ber api

2018-08-12 Thread Rob Pierce
As per X.690, "the end-of-contents octets shall be present if the length is encoded as specified in 8.1.3.6, otherwise they shall not be present", i.e. only used with indefinite length encoding. Since we do not support indefinite length encoding, I thought it may make sense to remove some

change ber_write_elements to return ssize_t

2018-08-11 Thread Rob Pierce
In aldap.c, tls_write(2) and write(2) also return ssize_t, so both error and wrote have been changed accordingly. ok? Index: usr.bin/ldap/aldap.c === RCS file: /cvs/src/usr.bin/ldap/aldap.c,v retrieving revision 1.4 diff -u -p -r1.4

avoid overflow in snmp message id

2018-08-10 Thread Rob Pierce
Prevent server side (snmpd) overflow for message id in the snmp header. ok? Index: snmpclient.c === RCS file: /cvs/src/usr.sbin/snmpctl/snmpclient.c,v retrieving revision 1.16 diff -u -p -r1.16 snmpclient.c --- snmpclient.c8

Re: please test: unveil for ifconfig

2018-08-02 Thread Rob Pierce
- Original Message - > From: "Rob Pierce" > To: "Bryan Steele" > Cc: "tech" > Sent: Thursday, August 2, 2018 1:30:15 PM > Subject: Re: please test: unveil for ifconfig > - Original Message - > > From: "Bryan Steele"

Re: tweaks to namei.9

2018-08-02 Thread Rob Pierce
On Thu, Aug 02, 2018 at 03:15:14PM +0100, Jason McIntyre wrote: > On Thu, Aug 02, 2018 at 01:58:38PM +0000, Rob Pierce wrote: > > A little less wordy when introducing the namieidata structure. > > > > Ok? &g

tweaks to namei.9

2018-08-02 Thread Rob Pierce
A little less wordy when introducing the namieidata structure. Ok? Index: namei.9 === RCS file: /cvs/src/share/man/man9/namei.9,v retrieving revision 1.18 diff -u -p -r1.18 namei.9 --- namei.9 23 Nov 2015 17:53:57 -

relocate some public ber functions

2018-07-30 Thread Rob Pierce
Some public ber functions sneaked in below the internal functions comment. Move them up so the comment regains its former truthiness. Ok? Index: usr.bin/ldap/ber.c === RCS file: /cvs/src/usr.bin/ldap/ber.c,v retrieving revision 1.14

cleanup defunct prototype in snmpe.c

2018-07-23 Thread Rob Pierce
It looks like some code was shuffled around in revision 1.34 in which snmpe_application was renamed to smi_application and this prototype was missed. ok? Index: snmpe.c === RCS file: /cvs/src/usr.sbin/snmpd/snmpe.c,v retrieving

avoid vfprintf NULL errors in ldape.c log_debug()

2018-07-03 Thread Rob Pierce
Running the current ldapd regression tests result in the following (repeated) errors in my /var/log/messages: ... ldapd: vfprintf %s NULL in "current bind dn = %s " This is because regress/usr.sbin/ldapd/run-tests.pl is performing unnecessary unbinds in END { }. Though the regression test

Re: call ber_read() from ber_getc() in ldap, ldapd, and ypldap

2018-07-03 Thread Rob Pierce
On Tue, Jul 03, 2018 at 09:25:06PM +0100, Stuart Henderson wrote: > On 2018/07/03 22:17, Claudio Jeker wrote: > > I have a hard time to understand why this is needed in snmpd. > > For single char reads ber_readbuf(b, c, 1) and ber_read(b, c, 1) should do > > exaclty the same. At least in the old

Re: call ber_read() from ber_getc() in ldap, ldapd, and ypldap

2018-07-03 Thread Rob Pierce
On Sat, Jun 30, 2018 at 02:04:16PM -0400, Rob Pierce wrote: > I recently committed a piece of BER code synchronizing in the wrong direction > (i.e. from the ldap instances to the snmpd instance). sthen@ noticed a break > in SNMPv3 authentication and reverted that part of the change. Than

Re: [PATCH] fix typo in if_aue.c

2018-07-02 Thread Rob Pierce
Ok rob@ > From: "Kevin Lo" > To: "tech" > Sent: Monday, July 2, 2018 10:23:39 AM > Subject: [PATCH] fix typo in if_aue.c > Hi, > I've just noticed a little typo in the if_aue.c (s/read/write). > The diff is below. > Index: sys/dev/usb/if_aue.c >

Re: [PATCH] mos: nuke unused variable

2018-07-02 Thread Rob Pierce
Ok rob@ > From: "Kevin Lo" > To: "tech" > Sent: Monday, July 2, 2018 10:22:58 AM > Subject: [PATCH] mos: nuke unused variable > Ok ? > Index: sys/dev/usb/if_mos.c > === > RCS file: /cvs/src/sys/dev/usb/if_mos.c,v > retrieving

call ber_read() from ber_getc() in ldap, ldapd, and ypldap

2018-06-30 Thread Rob Pierce
I recently committed a piece of BER code synchronizing in the wrong direction (i.e. from the ldap instances to the snmpd instance). sthen@ noticed a break in SNMPv3 authentication and reverted that part of the change. Thanks Stuart! I just fixed some typos in the snmpd regression test which

synchronize ber.c and ber.h across four consumers

2018-06-29 Thread Rob Pierce
This diff is a final synchronization of ber.c and ber.h. It basically takes (2012) ber additions to snmpd and adds them back to ldap, ldapd, and ypldap instances. See usr.sbin/snmpd/ber.c revision 1.24 commit log for a summary of those changes (e.g. SNMPv2 traps, User-based Security Model,

next step in synchronizing ber.c and ber.h

2018-06-27 Thread Rob Pierce
The following diff makes ber.c and ber.h identical across ldap, ldapd, and ypldap, and slightly reduces the diff with snmpd. It covers the evolution of a few scattered enhancements, including: - sync proscription of indefinite length BER encoding - sync consistent presence of

sync calloc call in ber.c

2018-06-27 Thread Rob Pierce
This ber.c change has been in ldapd since rev 1.1 and was applied to snmpd back in 2012. The following diff applies the change to the ldap client and ypldap. Ok? Index: usr.bin/ldap/ber.c === RCS file: /cvs/src/usr.bin/ldap/ber.c,v

ber.c fix for length calculations

2018-06-24 Thread Rob Pierce
It looks like a BER problem found while testing the new ldap client (with an empty password) was already addressed in snmpd back in 2010 by martinh. In LDAP under a CONTEXT class, 0 corresponds to LDAP_AUTH_SIMPLE. This is currently interpreted as an EOC (end-of-content) and causes a

use __func__ in iked util.c log_debug

2018-06-22 Thread Rob Pierce
ok? Index: util.c === RCS file: /cvs/src/sbin/iked/util.c,v retrieving revision 1.35 diff -u -p -r1.35 util.c --- util.c 13 Dec 2017 08:27:06 - 1.35 +++ util.c 22 Jun 2018 12:52:09 - @@ -703,7 +703,7 @@

diff for snmpd agentx.c

2018-06-10 Thread Rob Pierce
This brings snmpd agentx.c closer to relayd agentx.c. In the remaining delta, I am not sure if the pdu context code should be removed from the snmpd version or added to the relayd version. Anyway, this is one step closer. Ok? Rob Index: agentx.c

Re: update ifstated parser

2018-03-05 Thread Rob Pierce
On Mon, Feb 26, 2018 at 05:10:43PM -0600, Michael Graves wrote: > Hello > > I use ifstated(8) to track the state of the the external interface that is > configured via dhcp and based upon the state, (re)configure a VXLAN > interface. > The ifstated.conf currently looks like > > === > exif="em0"

Re: snmpd agentx.c cleanup

2018-02-12 Thread Rob Pierce
On Mon, Feb 12, 2018 at 03:03:07PM -0500, Rob Pierce wrote: > This reduces the diff with relayd/agentx.c. A little bit closer now. ok? Index: agentx.c === RCS file: /cvs/src/usr.sbin/snmpd/agentx.c,v retrieving revision 1.11 d

snmpd agentx.c cleanup

2018-02-12 Thread Rob Pierce
This reduces the diff with relayd/agentx.c. Ok? Index: agentx.c === RCS file: /cvs/src/usr.sbin/snmpd/agentx.c,v retrieving revision 1.11 diff -u -p -r1.11 agentx.c --- agentx.c5 Jan 2018 08:13:32 - 1.11 +++ agentx.c

snmpd trap.c uninitialized variable

2018-01-20 Thread Rob Pierce
The pid_t confused me, but I believe this is correct - i.e. referring to the packet id as oppose to a process id. Comments? Ok? Index: trap.c === RCS file: /cvs/src/usr.sbin/snmpd/trap.c,v retrieving revision 1.29 diff -u -p -r1.29

Re: delaying the start of ifstated in /etc/rc

2017-09-26 Thread Rob Pierce
On Wed, Aug 30, 2017 at 08:30:52PM -0400, Rob Pierce wrote: > Depending on the use case for ifstated, dependencies may exist with other > daemons for performing interface checks and/or external tests. For example, > one might use ifstated to check a dhcpd enabled interface, or con

delaying the start of ifstated in /etc/rc

2017-08-30 Thread Rob Pierce
Depending on the use case for ifstated, dependencies may exist with other daemons for performing interface checks and/or external tests. For example, one might use ifstated to check a dhcpd enabled interface, or connectivity to a vmd virtual machine. Does anyone have any objections with delaying

Re: ksh(1) history lines allocation

2017-08-15 Thread Rob Pierce
On Tue, Aug 15, 2017 at 02:03:43PM -0400, Jeremie Courreges-Anglas wrote: > On Tue, Aug 15 2017, Rob Pierce <r...@2keys.ca> wrote: > > [...] > > > I was able to reproduce the problem with a HISTSIZE of 10 which at > > 125000 > > entries rendered my

Re: ifstated: stop tracking interface indexes

2017-08-15 Thread Rob Pierce
On Tue, Aug 15, 2017 at 02:37:22PM -0400, Jeremie Courreges-Anglas wrote: > On Tue, Aug 15 2017, Rob Pierce <r...@2keys.ca> wrote: > > On Mon, Aug 14, 2017 at 11:26:46PM -0400, Jeremie Courreges-Anglas wrote: > >> On Mon, Aug 14 2017, Rob Pierce <r...@2keys.ca> wr

Re: ifstated: stop tracking interface indexes

2017-08-15 Thread Rob Pierce
On Mon, Aug 14, 2017 at 11:26:46PM -0400, Jeremie Courreges-Anglas wrote: > On Mon, Aug 14 2017, Rob Pierce <r...@2keys.ca> wrote: > > ifstated currently tracks and maintains the index of each monitored > > interface > > and does not maintain interface names. Thi

Re: ksh(1) history lines allocation

2017-08-14 Thread Rob Pierce
On Mon, Aug 14, 2017 at 10:26:48PM -0400, Jeremie Courreges-Anglas wrote: > > So I tinkered with the way ksh(1) tracks memory allocation, trying to > make it faster in the general case. One approach used a RB tree, > I wrote since a simple hash table implementation which seems to work > rather

ifstated: stop tracking interface indexes

2017-08-14 Thread Rob Pierce
ifstated currently tracks and maintains the index of each monitored interface and does not maintain interface names. This means we need to re-index on interface departure and arrival. The following diff moves away from indexes to names. Indexes are still required, but easily obtained dynamically

diff: pledge snmpd

2017-08-11 Thread Rob Pierce
The following diff pledges two of three processes in snmpd: the parent snmpd process and the trap handler. We cannot currently pledge snmpe as snmp requests asking for privileged kernel info are disallowed by pledge. I have included a commented pledge block in snmpe.c below (which will not be

bsd.regress.mk.5 typo fix

2017-08-11 Thread Rob Pierce
I just ran across this. Ok? Index: bsd.regress.mk.5 === RCS file: /cvs/src/share/man/man5/bsd.regress.mk.5,v retrieving revision 1.14 diff -u -p -r1.14 bsd.regress.mk.5 --- bsd.regress.mk.53 Jul 2017 18:19:55 - 1.14 +++

Re: ifstated: add handing of departed interfaces

2017-08-08 Thread Rob Pierce
On Tue, Aug 08, 2017 at 12:12:43AM +0200, Jeremie Courreges-Anglas wrote: > On Sun, Aug 06 2017, Rob Pierce <r...@2keys.ca> wrote: > > The following diff adds support for detecting the state change of a departed > > interface. ifstated is not a very verbose daemon, so t

Re: ifstated: consistent use of log.c

2017-08-07 Thread Rob Pierce
On Sun, Aug 06, 2017 at 06:47:38PM +0200, Jeremie Courreges-Anglas wrote: > On Thu, Aug 03 2017, Rob Pierce <r...@2keys.ca> wrote: > > As a result ifstated.c no longer needs err.h. > > > > Index: ifstated.c > > =

ifstated: add handing of departed interfaces

2017-08-06 Thread Rob Pierce
The following diff adds support for detecting the state change of a departed interface. ifstated is not a very verbose daemon, so this diff quietly does the right thing (i.e. there is no exttra warning about a departing interface). The re-arrival of a departed interface involves re-indexing the

ifstated: improve routing socket error handling

2017-08-05 Thread Rob Pierce
Improve error checking during processing of routing messages. Handling of RTM_DESYNC encouraged by deraadt. Regression tests pass. I have another diff ready to go that handles interface depature, but I thought it best to separate them. Ok? Index: ifstated.c

switchd: no need to include err.h

2017-08-03 Thread Rob Pierce
switchd no longer requires err.h. Index: packet.c === RCS file: /cvs/src/usr.sbin/switchd/packet.c,v retrieving revision 1.4 diff -u -p -r1.4 packet.c --- packet.c26 Sep 2016 08:55:43 - 1.4 +++ packet.c4 Aug 2017

ifstated: consistent use of log.c

2017-08-03 Thread Rob Pierce
As a result ifstated.c no longer needs err.h. Index: ifstated.c === RCS file: /cvs/src/usr.sbin/ifstated/ifstated.c,v retrieving revision 1.56 diff -u -p -r1.56 ifstated.c --- ifstated.c 24 Jul 2017 12:33:59 - 1.56 +++

dhcpd: remove unused structs

2017-08-01 Thread Rob Pierce
I can confirm that the following structs have not been used since at least OpenBSD 4.9. From Edgar Pettijohn. Ok? Index: dhcpd.h === RCS file: /cvs/src/usr.sbin/dhcpd/dhcpd.h,v retrieving revision 1.65 diff -u -p -r1.65 dhcpd.h ---

Re: ifstated diff: handling interface depature/arrival

2017-08-01 Thread Rob Pierce
On Mon, Jul 31, 2017 at 05:59:46PM -0400, Rob Pierce wrote: > Good evening all, > > Currently, ifstated does not detect the removal of an IFT_CARP pseudo device. > As such, you can delete a carp interface and have ifstated happily remain in > the current state without detectin

ifstated diff: handling interface depature/arrival

2017-07-31 Thread Rob Pierce
Good evening all, Currently, ifstated does not detect the removal of an IFT_CARP pseudo device. As such, you can delete a carp interface and have ifstated happily remain in the current state without detecting any interface change. The reasons are two fold: 1. The routing socket is only

ioctl under route promise for pledging snmpd

2017-07-26 Thread Rob Pierce
snmpe calls kif_update on an interface change which performs an ioctl with SIOCGIFDESCR, currently disallowed by pledge. No other network daemons do this. The only other programs that make this call appear to be ifconfig and systat. ifnet.if_description simply contains an optional user defined

pledge snmpctl

2017-07-25 Thread Rob Pierce
snmpclient pledges after calling chroot(2) and requires a dns promise for sendto(2) with non-NULL destination. Rob Index: snmpclient.c === RCS file: /cvs/src/usr.sbin/snmpctl/snmpclient.c,v retrieving revision 1.13 diff -u -p -r1.13

Re: broken base build at src/usr/lib/libpcap?

2017-07-24 Thread Rob Pierce
> From: "Marc Espie" <es...@nerim.net> > To: "Rob Pierce" <r...@2keys.ca> > Cc: "tech" <tech@openbsd.org> > Sent: Sunday, July 23, 2017 7:36:29 PM > Subject: Re: broken base build at src/usr/lib/libpcap? > On Sun, Jul 23, 2017 at 0

Re: broken base build at src/usr/lib/libpcap?

2017-07-23 Thread Rob Pierce
> From: "Rob Pierce" <r...@2keys.ca> > To: "tech" <tech@openbsd.org> > Sent: Sunday, July 23, 2017 5:40:24 PM > Subject: broken base build at src/usr/lib/libpcap? > My build breaks at usr/lib/libpcap: Sorry, I jumped the gun. Works fine after another update.

broken base build at src/usr/lib/libpcap?

2017-07-23 Thread Rob Pierce
My build breaks at usr/lib/libpcap: cc -O2 -pipe -g -I. -I/usr/src/lib/libpcap -Dyylval=pcap_yylval -DHAVE_SYS_IOCCOM_H -DHAVE_SYS_SOCKIO_H -DHAVE_ETHER_HOSTTON -DHAVE_STRERROR -DHAVE_SOCKADDR_SA_LEN -DLBL_ALIGN -DHAVE_IFADDRS_H -DINET6 -DHAVE_BSD_IEEE80211 -c pcap.c -o pcap.o cc -O2 -pipe

unused struct in dhcpd.h

2017-07-23 Thread Rob Pierce
This struct appears to be unused at the moment. Regards, Rob Index: dhcpd.h === RCS file: /cvs/src/usr.sbin/dhcpd/dhcpd.h,v retrieving revision 1.64 diff -u -p -r1.64 dhcpd.h --- dhcpd.h 24 Apr 2017 14:58:36 - 1.64 +++

simple ifstated pledge

2017-07-21 Thread Rob Pierce
With the most recent commit ifstated can now be pledged in a straight forward manner. A better pledge is possible with more work. Does it make sense to get this one in now? Rob Index: ifstated.c === RCS file:

Re: pledge ifstated

2017-07-17 Thread Rob Pierce
On Sun, Jul 16, 2017 at 04:47:07PM -0400, Rob Pierce wrote: > On Thu, Jul 13, 2017 at 09:16:14PM -0400, Rob Pierce wrote: > > On Mon, Jul 10, 2017 at 01:21:58PM -0400, Rob Pierce wrote: > > > The following diff is loosely based on the approach that was taken for > > >

Re: pledge ifstated

2017-07-16 Thread Rob Pierce
On Thu, Jul 13, 2017 at 09:16:14PM -0400, Rob Pierce wrote: > On Mon, Jul 10, 2017 at 01:21:58PM -0400, Rob Pierce wrote: > > The following diff is loosely based on the approach that was taken for > > pledging mountd. Other code/approaches leveraged from various network

ifstated diff cleanup before delegating proc/exec to privchild

2017-07-15 Thread Rob Pierce
This diff should probably be three separate diffs, but changes are colliding (i.e. adjacent lines of code are being modified within different diffs). The diff contains three modifications: - removal of unused logging code (see previous diff); - a cleanup of parse.y, converting it to use log.c;

ifstated regress statemachine whitespace diff

2017-07-14 Thread Rob Pierce
Remove some unwanted whitespace that creeped in. Rob Index: statemachine === RCS file: /cvs/src/regress/usr.sbin/ifstated/statemachine,v retrieving revision 1.1 diff -u -p -r1.1 statemachine --- statemachine14 Jul 2017

Re: pledge ifstated

2017-07-13 Thread Rob Pierce
On Mon, Jul 10, 2017 at 01:21:58PM -0400, Rob Pierce wrote: > The following diff is loosely based on the approach that was taken for > pledging mountd. Other code/approaches leveraged from various networking > daemons. > > This first step moves the ioctl with SIOCGIFDATA call

Re: add simple ifstated regression test script

2017-07-13 Thread Rob Pierce
Sure, no problem. Thank you. Rob From: "Sebastian Benoit" <be...@openbsd.org> To: "Rob Pierce" <r...@2keys.ca> Cc: "tech" <tech@openbsd.org> Sent: Thursday, July 13, 2017 6:12:14 PM Subject: Re: add simple ifstated regression te

pledge ifstated

2017-07-13 Thread Rob Pierce
The following diff is loosely based on the approach that was taken for pledging mountd. Other code/approaches leveraged from various networking daemons. This first step moves the ioctl with SIOCGIFDATA call to a privileged child so we can at least pledge "stdio rpath dns inet proc exec" without

Re: add simple ifstated regression test script

2017-07-06 Thread Rob Pierce
On Sun, Jul 02, 2017 at 06:29:07PM +0200, Sebastian Benoit wrote: > Rob Pierce(r...@2keys.ca) on 2017.07.02 12:06:25 -0400: > > I am currently using this regression script for basic ifstated sanity > > testing. > > > > Still a work in progress. Requesting commit f

ifstated remove unused logging code

2017-07-05 Thread Rob Pierce
This code has been here since version 1.1/1.2, but never used. Rob Index: ifstated.c === RCS file: /cvs/src/usr.sbin/ifstated/ifstated.c,v retrieving revision 1.50 diff -u -p -r1.50 ifstated.c --- ifstated.c 4 Jul 2017 21:09:52

Re: ifstated diff rename variables to avoid state confusion

2017-07-04 Thread Rob Pierce
On Mon, Jul 03, 2017 at 04:24:30PM -0400, Rob Pierce wrote: > ifstated monitors interface state and the return state of invoked commands, > and takes action accordingly, all of which is managed with the help of a > finite state machine. That makes for a lot of "state" ref

ifstated parse.y removed unused tokens

2017-07-04 Thread Rob Pierce
These tokens have existed since version 1.1 but have never been used. Can we delete them? Rob Index: parse.y === RCS file: /cvs/src/usr.sbin/ifstated/parse.y,v retrieving revision 1.43 diff -u -p -r1.43 parse.y --- parse.y 2

ifstated diff rename variables to avoid state confusion

2017-07-03 Thread Rob Pierce
ifstated monitors interface state and the return state of invoked commands, and takes action accordingly, all of which is managed with the help of a finite state machine. That makes for a lot of "state" references in the code. The following diff renames variables to make a distinction between

ifstated whitespace diff

2017-07-03 Thread Rob Pierce
Fix some variable alignment whitespace. Rob Index: ifstated.h === RCS file: /cvs/src/usr.sbin/ifstated/ifstated.h,v retrieving revision 1.15 diff -u -p -r1.15 ifstated.h --- ifstated.h 2 Jul 2017 15:28:26 - 1.15 +++

Re: ifstated readability diff

2017-07-03 Thread Rob Pierce
On Sun, Jul 02, 2017 at 11:50:56PM -0400, Rob Pierce wrote: > Remove obvious clear_config() comments and misleading state_change() comments. > > Also relocate do_action() calls for the init block from change_state() to > occur with the corresponding do_action() calls for the body

ifstated readability diff

2017-07-02 Thread Rob Pierce
Remove obvious clear_config() comments and misleading state_change() comments. Also relocate do_action() calls for the init block from change_state() to occur with the corresponding do_action() calls for the body block within the calling function for improved readability. No functional change.

Re: add simple ifstated regression test script

2017-07-02 Thread Rob Pierce
> From: "Sebastian Benoit" <be...@openbsd.org> > To: "Rob Pierce" <r...@2keys.ca> > Cc: "tech" <tech@openbsd.org> > Sent: Sunday, July 2, 2017 12:29:07 PM > Subject: Re: add simple ifstated regression test script > Rob Pierce(r..

add simple ifstated regression test script

2017-07-02 Thread Rob Pierce
I am currently using this regression script for basic ifstated sanity testing. Still a work in progress. Requesting commit for safe keeping. Regards, Rob Index: usr.sbin/ifstated/ifstated.sh === RCS file:

ifstated ifsd_config variable name change

2017-07-02 Thread Rob Pierce
Second diff to rename additional "always" variable in struct ifsd_config. Requested by stsp@. Rob Index: ifstated.c === RCS file: /cvs/src/usr.sbin/ifstated/ifstated.c,v retrieving revision 1.47 diff -u -p -r1.47 ifstated.c ---

Re: rename variable in ifstated

2017-07-02 Thread Rob Pierce
On Sun, Jul 02, 2017 at 02:56:06PM +0200, Stefan Sperling wrote: > On Sat, Jul 01, 2017 at 05:53:54PM -0400, Rob Pierce wrote: > > never.never say always.always. > > > > Rename one of the "always" variables to "body" for improved readability. >

ifstated unused variable

2017-07-01 Thread Rob Pierce
Remove unused variable from header file. Index: ifstated.h === RCS file: /cvs/src/usr.sbin/ifstated/ifstated.h,v retrieving revision 1.12 diff -u -p -r1.12 ifstated.h --- ifstated.h 28 Jun 2017 11:10:08 - 1.12 +++

ifstated whitespace var assignment diff

2017-07-01 Thread Rob Pierce
Remove variable assignment in declaration and add whitespace to improve readability. No functional change. Rob Index: ifstated.c === RCS file: /cvs/src/usr.sbin/ifstated/ifstated.c,v retrieving revision 1.45 diff -u -p -r1.45

rename variable in ifstated

2017-07-01 Thread Rob Pierce
never.never say always.always. Rename one of the "always" variables to "body" for improved readability. No functional change. >From ifstated.conf(5): "Each state consistes of an init block and a body. The init block is used to initialize the state and is executed each time the state is

remove errant ifstated whitespace

2017-06-27 Thread Rob Pierce
Index: ifstated.c === RCS file: /cvs/src/usr.sbin/ifstated/ifstated.c,v retrieving revision 1.43 diff -u -p -r1.43 ifstated.c --- ifstated.c 27 Jun 2017 20:46:34 - 1.43 +++ ifstated.c 28 Jun 2017 01:30:02 - @@ -151,12

ifstated.c hoist code in prep for future work

2017-06-27 Thread Rob Pierce
Hoist some privileged code in preparation for future work. Is this the correct use of intptr_t? Based on an approach in vmd with mc146818/ns8250. No intended functional change. Rob Index: ifstated.c === RCS file:

minor bgpd.c diff

2017-06-27 Thread Rob Pierce
rfd does not need to be global. Rob Index: bgpd.c === RCS file: /cvs/src/usr.sbin/bgpd/bgpd.c,v retrieving revision 1.189 diff -u -p -r1.189 bgpd.c --- bgpd.c 28 May 2017 15:16:33 - 1.189 +++ bgpd.c 27 Jun 2017

Re: update logging in ifstated

2017-06-13 Thread Rob Pierce
On Tue, Jun 13, 2017 at 08:44:46AM +0200, Sebastian Benoit wrote: > Rob Pierce(r...@2keys.ca) on 2017.06.11 18:04:31 -0400: > > This minimizes differences with the latest log.c. > > > > I was not sure how to handle verbosity, as the current implementation is > > verbo

update logging in ifstated

2017-06-11 Thread Rob Pierce
This minimizes differences with the latest log.c. I was not sure how to handle verbosity, as the current implementation is verbose by default in debug mode. The diff below requires actually requesting (double) verbosity on the command line in order to retain the same behaviour (in debug mode).

ifstated.c diff for __dead usage

2017-03-19 Thread Rob Pierce
Index: ifstated.c === RCS file: /cvs/src/usr.sbin/ifstated/ifstated.c,v retrieving revision 1.41 diff -u -p -r1.41 ifstated.c --- ifstated.c 30 May 2013 19:22:48 - 1.41 +++ ifstated.c 20 Mar 2017 00:19:52 - @@ -50,28

minor diff for switchd.8

2016-11-28 Thread Rob Pierce
Index: switchd.8 === RCS file: /cvs/src/usr.sbin/switchd/switchd.8,v retrieving revision 1.3 diff -u -p -r1.3 switchd.8 --- switchd.8 20 Oct 2016 19:55:29 - 1.3 +++ switchd.8 29 Nov 2016 02:49:53 - @@ -29,7 +29,7 @@

minor typo in aldap.c comment

2016-10-21 Thread Rob Pierce
Index: aldap.c === RCS file: /cvs/src/usr.sbin/ypldap/aldap.c,v retrieving revision 1.32 diff -u -p -r1.32 aldap.c --- aldap.c 27 Apr 2016 10:53:27 - 1.32 +++ aldap.c 22 Oct 2016 02:42:13 - @@ -1198,7 +1198,7 @@

minor diff for ldapd.conf.5

2016-10-16 Thread Rob Pierce
Fix a couple of grammar mistakes, remove a redundant word, and add a FILES reference for the /etc/ldap/certs directory. Rob Index: ldapd.conf.5 === RCS file: /cvs/src/usr.sbin/ldapd/ldapd.conf.5,v retrieving revision 1.19 diff -u -p

remove kern.arand from sysctl.8 and rnd.c (comment)

2016-09-22 Thread Rob Pierce
Index: sysctl.8 === RCS file: /cvs/src/sbin/sysctl/sysctl.8,v retrieving revision 1.205 diff -u -p -r1.205 sysctl.8 --- sysctl.87 Sep 2016 17:30:12 - 1.205 +++ sysctl.823 Sep 2016 02:16:14 - @@ -144,7 +144,6 @@

Re: fix regress in pstat.c

2016-09-17 Thread Rob Pierce
On Sat, Sep 17, 2016 at 09:20:31PM +0200, Theo Buehler wrote: > While this patch avoids the bug, it isn't quite right: pstat -ft should > be equivalent to "pstat -f && pstat -t" but... > > $ pstat -ft > pstat: kvm_openfiles: /dev/mem: Permission denied > > The actual problem is in ttymode(): if

fix regress in pstat.c

2016-09-17 Thread Rob Pierce
ttymode() needs nlist, otherwise "pstat -tf" will fail since kd will not be NULL and the calls from ttymode() to KGET will error as follows: pstat: cannot read ntty: invalid address (0) pstat: cannot read tty_head: invalid address (0) KGET(TTY_NTTY, ntty) and KGET(TTY_TTYLIST, tty_head) both

minor diff for vmctl.8

2016-09-11 Thread Rob Pierce
"host" is not a command argument. Rob Index: vmctl.8 === RCS file: /cvs/src/usr.sbin/vmctl/vmctl.8,v retrieving revision 1.13 diff -u -p -r1.13 vmctl.8 --- vmctl.8 18 Aug 2016 16:12:05 - 1.13 +++ vmctl.8 12 Sep 2016

whitespace in /etc/rc

2016-09-05 Thread Rob Pierce
Index: rc === RCS file: /cvs/src/etc/rc,v retrieving revision 1.486 diff -u -p -r1.486 rc --- rc 10 Jul 2016 09:08:18 - 1.486 +++ rc 5 Sep 2016 15:45:09 - @@ -490,7 +490,6 @@ echo clearing /tmp # rc.securelevel did

mention relayd in faq6.html

2016-09-03 Thread Rob Pierce
Not sure if this is the right place or the right wording, but I think it deserves a mention somewhere in the faq. Regards, Rob Index: faq6.html === RCS file: /cvs/www/faq/faq6.html,v retrieving revision 1.383 diff -u -p -r1.383

minor diff for faq15.html

2016-09-03 Thread Rob Pierce
There is only one result mentioned: ready-to-install binary packages. Rob Index: faq15.html === RCS file: /cvs/www/faq/faq15.html,v retrieving revision 1.141 diff -u -p -r1.141 faq15.html --- faq15.html 1 Sep 2016 12:05:14 -

60.html on ntpd and pledge

2016-08-25 Thread Rob Pierce
ntpd was pledged in 5.9. Rob Index: 60.html === RCS file: /cvs/www/60.html,v retrieving revision 1.70 diff -u -p -r1.70 60.html --- 60.html 24 Aug 2016 20:47:30 - 1.70 +++ 60.html 25 Aug 2016 07:48:55 - @@

Re: syslogd: accept space-deliminated fields

2016-07-05 Thread Rob Pierce
- Original Message - > From: "Todd C. Miller" > To: "tech" > Sent: Friday, July 1, 2016 12:55:11 PM > Subject: syslogd: accept space-deliminated fields > Linux, Net and Free also support space-deliminated fields. Maybe > we should too... > -

intro.2 mention of pledge(2)

2016-04-15 Thread Rob Pierce
Does this make sense? Rob Index: intro.2 === RCS file: /cvs/src/lib/libc/sys/intro.2,v retrieving revision 1.63 diff -u -p -r1.63 intro.2 --- intro.2 6 Mar 2016 22:32:09 - 1.63 +++ intro.2 15 Apr 2016 16:26:24

Re: pledge pstat

2016-04-13 Thread Rob Pierce
On Tue, Apr 12, 2016 at 04:25:01PM -0400, Rob Pierce wrote: > Hoist sysct and kvm calls, and pledge stdio, rpath, vminfo. > > Rob Update diff based on comments from tb@: Changes include the following: - kd is a pointer, so compare with NULL (not 0). - simply nlistf/memf condition

Re: pledge pstat

2016-04-13 Thread Rob Pierce
From: "Mike Belopuhov" <m...@belopuhov.com> To: "Rob Pierce" <r...@2keys.ca> Cc: "tech" <tech@openbsd.org> Sent: Tuesday, April 12, 2016 6:05:19 PM Subject: Re: pledge pstat BQ_BEGIN On 12 April 2016 at 22:25, Rob Pierce <r...@2keys.

pledge pstat

2016-04-12 Thread Rob Pierce
Hoist sysct and kvm calls, and pledge stdio, rpath, vminfo. Rob Index: pstat.c === RCS file: /cvs/src/usr.sbin/pstat/pstat.c,v retrieving revision 1.102 diff -u -p -r1.102 pstat.c --- pstat.c 12 Apr 2016 16:53:42 -

pstat diff fixed segmentation fault

2016-04-11 Thread Rob Pierce
Running pstat with either [-M core] or [-N system] along with the -T option results in a segmentation fault. Make sure kvm access is initialized prior to running kvm_read() when -T is specified. This issue appears to have been introduced when setgid kmem support was removed in revision 1.99. Rob

Re: rcctl ls faulty -> failed

2016-03-29 Thread Rob Pierce
> From: "Antoine Jacoutot" > To: "Ian Darwin" > Cc: "tech" > Sent: Tuesday, March 29, 2016 10:59:54 AM > Subject: Re: rcctl ls faulty -> failed > On Tue, Mar 29, 2016 at 10:48:17AM -0400, Ian Darwin wrote: > > On Tue, Mar 29, 2016 at

prefer memset() over bzero() for ber.c in snmpd and ypldap

2016-03-04 Thread Rob Pierce
A similar change was done to ber.c in ldapd by @mmcc. I just copied those changes for snmpd and ypldap. No binary change. Regards, Index: snmpd/ber.c === RCS file: /cvs/src/usr.sbin/snmpd/ber.c,v retrieving revision 1.30 diff -u

afterboot - ntpd now on by default

2015-11-20 Thread Rob Pierce
Ping. Index: afterboot.8 === RCS file: /cvs/src/share/man/man8/afterboot.8,v retrieving revision 1.149 diff -u -p -r1.149 afterboot.8 --- afterboot.8 24 Sep 2015 15:07:55 - 1.149 +++ afterboot.8 26 Sep 2015 16:22:07 - @@

missing period in pledge.2

2015-11-17 Thread Rob Pierce
Index: pledge.2 === RCS file: /cvs/src/lib/libc/sys/pledge.2,v retrieving revision 1.15 diff -u -p -r1.15 pledge.2 --- pledge.216 Nov 2015 19:26:21 - 1.15 +++ pledge.217 Nov 2015 21:14:08 - @@ -472,7 +472,7 @@

  1   2   >