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

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: gotsh: simplify unix_socket_path handling
To:
Omar Polo <op@omarpolo.com>
Cc:
gameoftrees@openbsd.org
Date:
Sun, 22 Jan 2023 16:04:12 +0100

Download raw body.

Thread
On Sun, Jan 22, 2023 at 03:24:03PM +0100, Omar Polo wrote:
> On 2023/01/22 15:17:16 +0100, Omar Polo <op@omarpolo.com> wrote:
> > noticed while was investigating that gotd issue.  there's no need to
> > copy the path to a temporary buffer, and if it's too long we will fail
> > anyway right before connect.

> Actually we can simplify it further.
> 
>  - there's no need to call pledge the second time to remove the
>    `unveil' promise, it's already implicit by the unveil(NULL, NULL)
>    done at the end of apply_unveil.
> 
>  - i may be too paranoic but I'd move the socket unveiling at the
>    start, right after the first pledge call.  it becomes clearer IMHO
>    that unveil is immediately locked.
> 
> Diff on top of previous:

Yes, ok for both diffs. Thanks!