Re: getopt.3 bugs section

2021-01-08 Thread William Ahern
On Fri, Jan 08, 2021 at 05:29:31PM -0600, Edgar Pettijohn wrote: > In the BUGS section for the getopt(3) manual it mentions not using > single digits for options. I know spamd uses -4 and -6 there are > probably others. Should they be changed? Or is the manual mistaken? > That section seems ambig

Re: [PATCH v2] tee: Add -q, --quiet, --silent option to not write to stdout

2021-01-21 Thread William Ahern
On Fri, Jan 22, 2021 at 12:12:58AM +0100, Alejandro Colomar wrote: > This is useful for using tee to just write to a file, > at the end of a pipeline, > without having to redirect to /dev/null. > @@ -93,6 +98,7 @@ Copy standard input to each FILE, and also to standard > output.\n\ > "), stdout);

Re: autopledge

2023-06-02 Thread William Ahern
On Fri, Jun 02, 2023 at 04:24:31PM +0100, Leah Rowe wrote: > > Hi everyone, > > I had an interesting idea for OpenBSD. Haven't tried it yet. I'm > wondering what other people think of it? The idea is, thus: > > 1) Do execution tracing and just run a program. Do everything possible > in it to the

Re: [patch] Sort of fix for game "phantasia"

2023-09-15 Thread William Ahern
On Sat, Sep 16, 2023 at 05:26:26AM +0300, S V wrote: > Maybe I understand you wrong, but I didn't return any setgid to code, > just adding permissions to /var/games/phantasia/* files, or does it > count as "setgid"? I believe he means the SGID bit (S_ISGID in ) on the /usr/games/phantasia executab

Re: [PATCH] sysupgrade

2020-04-30 Thread William Ahern
On Thu, Apr 30, 2020 at 11:19:14AM +, Kevin Chadwick wrote: > I used to avoid installing the X sets and I found that even on e.g. a web > server without X11 running. I would end up installing them in the end as > certain ports would require them. Often there's a no_x11 FLAVOR, but avoiding th

Re: Dead peer detection in iked

2020-05-07 Thread William Ahern
On Thu, May 07, 2020 at 01:54:13PM +0200, Stephan Mending wrote: > Hi *, > I was wondering why there is no dead peer detection implemented for iked ? > > Is it just due to lack of time ? Or are there good reasons to dismiss > directly implemented dpd in iked ? > > Because technically one has the

Re: New EVFILT_EXCEPT for POLLPRI & POLLRDBAND

2020-06-16 Thread William Ahern
On Tue, Jun 16, 2020 at 06:18:13AM -0600, Todd C. Miller wrote: > On Tue, 16 Jun 2020 12:48:58 +0200, Martin Pieuchot wrote: > > > The diff below implements DragonFly's approach of adding a new kind of > > filter, EVFILT_EXCEPT, to report such conditions. This extends the > > existing kqueue inte

Re: POSIX_C_SOURCE 200809L, XOPEN_SOURCE 700 and bsd_locale_fallbacks errors

2021-04-21 Thread William Ahern
On Tue, Apr 13, 2021 at 09:06:12PM +0200, Mark Kettenis wrote: > > Date: Tue, 13 Apr 2021 19:36:26 +0200 > > From: Rafael Sadowski > > > > Based on my cmake pull-request(1) to fix the cmake build on OpenBSD, the > > following question has arisen which is worth analysing? > > > > "It seems OpenBS

Re: sigwaitinfo(2) and sigtimedwait(2)

2021-10-07 Thread William Ahern
On Sun, Sep 26, 2021 at 02:36:02PM +0200, Mark Kettenis wrote: > > Date: Fri, 24 Sep 2021 19:36:21 +0200 > > From: Rafael Sadowski > > > > I'm trying to port the more KDE stuff so my question is from porter > > perspective. > > > > I need sigwaitinfo(2)/sigtimedwait(2) and I found both functions

[PATCH] Folding of Comment Lines in make/lowparse.c

2018-02-23 Thread William Ahern
The routine skip_empty_lines_and_read_char() is an optimization to skip over blocks of comment lines. When it reads an unescaped '#' it uses the helper routine skip_to_end_of_line(). But skip_to_end_of_line() doesn't fold lines as it should and like its parent caller does. (See patch at end of mess

Re: [PATCH] Fix Comment Line Unfolding in make/lowparse.c

2018-02-27 Thread William Ahern
On Fri, Feb 23, 2018 at 12:27:14PM -0800, William Ahern wrote: > The routine skip_empty_lines_and_read_char() is an optimization to skip over > blocks of comment lines. When it reads an unescaped '#' it uses the helper > routine skip_to_end_of_line(). But skip_to_end_of_line()

Re: [patch] spamd-setup.c

2018-03-07 Thread William Ahern
On Wed, Mar 07, 2018 at 05:17:59PM -0600, Edgar Pettijohn wrote: > This looks like a good place for reallocarray. Yes? > > Index: spamd-setup.c > === > RCS file: /cvs/src/libexec/spamd-setup/spamd-setup.c,v > retrieving revision 1.50

Re: binutils: build with LLVM 6.0.0

2018-03-15 Thread William Ahern
On Thu, Mar 15, 2018 at 05:23:24PM +0100, Patrick Wildt wrote: > Hi, > > LLVM 6.0.0 does now complain of code does computation on NULL pointers, > which apparently binutils makes use of. I think we can teach binutils > to stop doing that. > > Is my C foo correct? Feedback? Both (type *)0 - 1 a

Re: Virtio 1.0 for the kernel

2019-01-11 Thread William Ahern
On Fri, Jan 11, 2019 at 10:43:25AM +0100, Stefan Fritsch wrote: > /* only used for sizeof, not actually allocated */ > extern struct virtio_pci_common_cfg ccfg; > #define CREAD(sc, memb) _cread(sc, \ > offsetof(struct virtio_pci_common_cfg, memb), sizeof(ccfg.memb)) > > The compiler shoul

Re: bgpd, protability and sockaddr sa_len

2019-02-15 Thread William Ahern
On Fri, Feb 15, 2019 at 03:07:15PM +0100, Claudio Jeker wrote: > Another diff to ease portability of bgpd. The sa_len field in struct > sockaddr does not exist on Linux so instead of using it pass a length to > the function (e.g. like bind(2) and connect(2) and do the same when > passing around str

dhcpd domain-search patch

2019-02-26 Thread William Ahern
systemd's dhcp client doesn't accept the hack of putting multiple, space-separated search domains in the domain-name option. The following patch parses option domain-search as a list of host names and uses dn_comp(3) from libc to compress the list for the on-wire option value. Example dhcpd.conf u

Re: make kevent(2) (a bit) mpsafe

2019-05-01 Thread William Ahern
On Wed, May 01, 2019 at 04:35:02PM +1000, David Gwynne wrote: > i originally came at this from the other side, where i wanted to run > kqueue_enqueue and _dequeue without the KERNEL_LOCK, but that implied > making kqueue_scan use the mutex too, which allowed the syscall to > become less locked. >

Re: posix_openpt: allow O_CLOEXEC

2020-02-05 Thread William Ahern
On Wed, Feb 05, 2020 at 05:48:41PM -0700, Todd C. Miller wrote: > On Wed, 05 Feb 2020 15:47:37 -0600, joshua stein wrote: > > > The spec says the behavior of anything other than O_RDWR and > > O_NOCTTY is unspecified, but FreeBSD allows passing O_CLOEXEC. > > OK, but the manual needs to specify

Re: enum unsigned or not?

2017-08-31 Thread William Ahern
On Thu, Aug 31, 2017 at 02:08:07PM +0200, Otto Moerbeek wrote: > Hi, > > /usr/src/usr.sbin/sasyncd/carp.c:157:12: warning: comparison of > unsigned enum expression < 0 is always false [-Wtautological-compare] > if (state < 0 || state > FAIL) > ~ ^ ~ > /usr/src/usr.sbin/sasy

OpenIKED Keepalive Broken

2016-08-05 Thread William Ahern
The logic of ikev2_ike_sa_alive presumes too much, and breaks NAT traversal when the _actual_ initiator of real traffic (as opposed to merely being the SA initiator) is behind NAT. Background: I currently have an IPSec tunnel configured to provide access to a corporate network from a remote office

Re: OpenIKED Keepalive Broken

2016-08-12 Thread William Ahern
On Fri, Aug 12, 2016 at 09:56:41PM +0200, fRANz wrote: > On Sat, Aug 6, 2016 at 2:18 AM, William Ahern > wrote: > > isakmpd unconditionally sends NAT-T keepalive messages every 30 seconds, > > whereas iked's ikev2_ike_sa_alive only sends a keepalive message iff > >

Re: Why the executable file type is also "DYN", not "EXEC"?

2017-10-05 Thread William Ahern
On Wed, Oct 04, 2017 at 04:17:32PM +0800, Nan Xiao wrote: > Hi all, > > I find the type of executable file format on OpenBSD is "DYN", not > "EXEC": > Is there any special consideration for it? Thanks very much in advance! > Because it was built as a position-independent executable (PIE). See h

Re: httpd/libtls: TLS client certificate revocation checking

2017-03-31 Thread William Ahern
On Thu, Mar 30, 2017 at 10:31:06PM +1030, Jack Burton wrote: > Personally, I'm leaning towards either local CRL file checking in > httpd (with minimal changes to libtls), or passing through enough data > to the let the fastcgi responders take whichever approach they want. In all my experience wit

Re: httpd/libtls: TLS client certificate revocation checking

2017-04-04 Thread William Ahern
On Sat, Apr 01, 2017 at 07:10:35PM +1030, Jack Burton wrote: > On Fri, 31 Mar 2017 13:03:44 -0700 > William Ahern wrote: > > Basically, anything short of passing through the entire certificate > > is going to be severely limiting and frustrating, to the point of > &g

Re: cleanup vmm_start_vm, simplifying fd cleanup

2023-04-10 Thread William Ahern
On Fri, Apr 07, 2023 at 11:45:41PM -0700, Philip Guenther wrote: > On Fri, Apr 7, 2023 at 9:44 AM Dave Voutila wrote: > ... > > > Touch longer, but won't generate ktrace noise by blind calls to close(2) > > and also accounts for the other error conditions (EINTR, EIO). > > > > For EIO, not sure y

Re: Request for Funding our Electricity

2014-01-17 Thread William Ahern
On Fri, Jan 17, 2014 at 11:32:41PM +, Miod Vallat wrote: > >And it's not full emulator if it doesn't emulate the > > bugs. > > It's almost bedtime in Europe. Do you mind if I tell you a bedtime > story? > > Years ago, a (back then) successful company selling high-end Unix-base

Re: Request for Funding our Electricity

2014-01-17 Thread William Ahern
On Fri, Jan 17, 2014 at 07:33:01PM -0700, Theo de Raadt wrote: > > > You may argue that, since the kernel has a workaround for this issue, > > > this is a moot point. But if some developer has a better idea for the > > > kernel heuristic, how can the new code be tested, if not on the real > > > har

Re: Request for Funding our Electricity

2014-01-17 Thread William Ahern
On Fri, Jan 17, 2014 at 08:38:05PM -0700, Theo de Raadt wrote: > > I do use emulators, specifically for ARM, because it's just easier for me. > > And one of my co-workers is a contributor to the Hercules emulator. > > Then you know it is not sufficient for our needs, yet we keep getting > the same

SIIG 4S PCIe 4-port Serial Card

2012-10-19 Thread William Ahern
The puc(4) man page lists the SIIG Cyber 4S PCI as supported. I just inserted a SIIG Cyber 4S PCIe. I figured it would look the same as the PCI card, considering that the new chip is named OXPCIe954, similar to the old OXPCI954. But obviously that was hopelessly naive. Instead I get: vend

Re: Goodbye to you my file descriptor

2012-10-30 Thread William Ahern
On Tue, Oct 30, 2012 at 11:57:05AM -0400, Okan Demirmen wrote: > On Tue, Oct 30, 2012 at 11:53 AM, Christiano F. Haesbaert > wrote: > > On 30 October 2012 16:52, Christiano F. Haesbaert > > wrote: > >> On 30 October 2012 16:45, Okan Demirmen wrote: > >>> On Tue, Oct 30, 2012 at 10:32 AM, Christi

Re: SIIG 4S PCIe 4-port Serial Card

2012-10-30 Thread William Ahern
On Fri, Oct 19, 2012 at 10:54:33PM +0100, Stuart Henderson wrote: > My original mail about the chip (including diff) is at > http://marc.info/?l=openbsd-tech&m=126446213208560&w=2, there is > some problem I was unable to track down which prevents things from > working when the port is set to the c

Re: upstream vendors and why they can be really harmful

2012-11-07 Thread William Ahern
On Tue, Nov 06, 2012 at 06:24:58PM -0200, Daniel Bolgheroni wrote: > On Tue, Nov 06, 2012 at 01:38:32PM +0100, Marc Espie wrote: > > > > It's also quickly turning Posix and Unix into a travesty: either you have > > the linux goodies, or you don't. And if you don't, you can forget anything > > moder

Re: upstream vendors and why they can be really harmful

2012-11-24 Thread William Ahern
On Thu, Nov 22, 2012 at 01:27:46PM -0430, Andres Perera wrote: > On Thu, Nov 22, 2012 at 11:58 AM, Kevin Chadwick > wrote: > > On Thu, 22 Nov 2012 09:30:41 -0430 > > Andres Perera wrote: > > > >> i'm not sure how using js for configuration files, as opposed to using > >> a language commonly deplo

Re: mandoc strlcat

2013-05-23 Thread William Ahern
On Thu, May 23, 2013 at 05:05:45PM -0400, Ted Unangst wrote: > I was looking at mandoc and noticed it has too many strlcats (a common > affliction affecting quite a few programs.) It's faster and simpler to > use snprintf. In glibc snprintf has a memory allocation failure mode. I'm curious: is Ope