"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Omar Polo <op@omarpolo.com>
Subject:
Re: gotd: handle early client disconnections
To:
Stefan Sperling <stsp@stsp.name>
Cc:
gameoftrees@openbsd.org
Date:
Sun, 22 Jan 2023 14:48:20 +0100

Download raw body.

Thread
On 2023/01/22 14:07:40 +0100, Stefan Sperling <stsp@stsp.name> wrote:
> > For last, there's a very simple test case for it.  It first try to hit
> > the limits via `ssh', and then only via nc(1).  It's not committable
> > as-is (and btw needs `permit nopass $yourself as gotdev' in doas.conf)
> > but helps in reproducing the issue at least :)
> > Will probably drop the second part.
> 
> Anyone on the local system can connect to the socket now, so doas
> should actually not be needed?

Yes, but the uid matters for the limit.  The user running the tests is
the local user ("op" in my case) that is different from the one
connecting when cloning via ssh ("gotdev") so the nc "trick" to test
if gotd closes the sockets doesn't work.

> It would be nice to have ways to test such things in the test suite.

maybe we could add a separate test suite that's run as gotdev?

I feel that requiring gotsh as shell for the local user or doas
configured are both too strong requirements for the regress.

I'll commit only the first half of the test and leave out nc for the
moment.