Index | Thread | Search

From:
Anthony BOCCI <anthony@abosec.fr>
Subject:
Re: doas: add optional timeout to persist directive
To:
Theo de Raadt <deraadt@openbsd.org>
Cc:
"tech@openbsd.org" <tech@openbsd.org>
Date:
Sat, 01 Aug 2026 20:48:37 +0000

Download raw body.

Thread
> With your diff, what happens if someone does?
> 
> permit persist 329847983274983274983274983274asdfasdfadsflkjdsalkfafds :wheel

329847983274983274983274983274asdfasdfadsflkjdsalkfafds isn't a number,
so it is a syntax error.

> permit persist 30aaaaaa :wheel

Same here, syntax error, which makes sense too.

> +                       yylval.timeout = (int)timeout;
>
> On a 64-bit architecture what happens if someone passes
> a 2147483680

permit persist 2147483680 :wheel

throws a syntax error too, which is a problem. 


To give more context, I don't set "persist" because 5 minutes is too
long for me, I'd like to enable it for a couple of seconds, typically
less than 30. This way I can type my command "doas this && doas that"
without typing my password twice, and without having to remember the
persistance.



Anthony