Re: doas and args matching

2022-07-29 Thread Alexander Hall
On July 28, 2022 9:06:51 PM GMT+02:00, Chris Narkiewicz wrote: >On Thu, Jul 28, 2022 at 03:08:19PM +0200, Alexander Hall wrote: >> Just leaving out the "args ..." from the config should accomplish that. > >It would allow the user to set any wscons parameters, which is not optimal. > >But eith

Re: doas and args matching

2022-07-29 Thread Alexis
Maksim Rodin writes: $ /sbin/wsconsctl display.brightness=50 wsconsctl: /dev/ttyC0: Permission denied Did you forget to type "doas" before your command? Gah, apparently so. :-/ i try to be thorough when i check these things, but then i do something like this. Thank you. Chris: There yo

Re: doas and args matching

2022-07-29 Thread Maksim Rodin
> $ /sbin/wsconsctl display.brightness=50 wsconsctl: /dev/ttyC0: Permission > denied > Did you forget to type "doas" before your command? On Пт 29 июл 2022 15:38:37, Alexis wrote: > > Alexander Hall writes: > > > > There's a good chance i'm misunderstanding, but doesn't this run > > > into > >

Re: doas and args matching

2022-07-28 Thread Alexis
Alexander Hall writes: There's a good chance i'm misunderstanding, but doesn't this run into the same issue? Namely, that (as far as i'm aware) it's not possible to specify that a doas-permitted command be allowed to run with arbitrary arguments (or range of arguments), rather than only th

Re: doas and args matching

2022-07-28 Thread Alexander Hall
On July 28, 2022 5:09:54 AM GMT+02:00, Alexis wrote: > >Alexander Hall writes: > >> Better yet, the wrapper could be allowed with no argument restrictions >> and just do >> >> wsconsctl "display.brightness=$1" >> >> or even (maybe; untested) >> >> wsconsctl "display.brightness${1%%[!+-]

Re: doas and args matching

2022-07-27 Thread Alexis
Alexander Hall writes: Better yet, the wrapper could be allowed with no argument restrictions and just do wsconsctl "display.brightness=$1" or even (maybe; untested) wsconsctl "display.brightness${1%%[!+-]*}=${1#[+-]}" for moar fanziness. There's a good chance i'm misunderstanding,

Re: doas and args matching

2022-07-27 Thread Alexander Hall
On July 26, 2022 1:48:24 PM GMT+02:00, Alexis wrote: > >Chris Narkiewicz writes: > >> Is it possible to match command arguments against an expression in >> doas.conf? >> >> I'd like to allow user to run wsconsctl display.brightness=<0-100> and >> the only solution i found so far is to explici

Re: doas and args matching

2022-07-26 Thread Alexis
Chris Narkiewicz writes: Is it possible to match command arguments against an expression in doas.conf? I'd like to allow user to run wsconsctl display.brightness=<0-100> and the only solution i found so far is to explicitly put all values in doas.conf. Since no-one has yet offered any