Re: autopledge

2023-06-02 Thread Theo de Raadt
g...@oat.com wrote: > Theo de Raadt wrote: > After pledge, 80% of the base programs were converted to pledge-assisted > priv-drop, because it was really obvious that "initialization code" > could > and should be moved earlier in the program, so that pledge (or multiple > p

Re: autopledge

2023-06-02 Thread gwes
Theo de Raadt wrote: After pledge, 80% of the base programs were converted to pledge-assisted priv-drop, because it was really obvious that "initialization code" could and should be moved earlier in the program, so that pledge (or multiple pledge calls dropping pe

Re: autopledge

2023-06-02 Thread Theo de Raadt
William Ahern wrote: > Rather, the point of pledge and unveil is to make that > deliberate refactoring as pleasant and minimal as is practicable. Indeed, after the first 10 programs were converted to use pledge, it became very obvious what would happen next: "priv-drop everything" The firs

Re: autopledge

2023-06-02 Thread Devin Ceartas
a program. Do everything possible in it to the fullest extent feasible and get an entire log of the trace. OpenBSD can do tracing: 2) Write a program that scans for all system calls in the trace, suggesting what pledge promises to use. See: https://man.openbsd.org/pledge.2 I call this idea &

Re: autopledge

2023-06-02 Thread William Ahern
everything possible > in it to the fullest extent feasible and get an entire log of the > trace. OpenBSD can do tracing: > 2) Write a program that scans for all system calls in the trace, > suggesting what pledge promises to use. See: > > https://man.openbsd.org/pledge.2 > &

Re: autopledge

2023-06-02 Thread Steffen Nurpmeso
Theo de Raadt wrote in <93466.1685743...@cvs.openbsd.org>: |We will wait for the demo. ... |Leah Rowe wrote: ... |> Yeah I was kinda thinking, just have it be a tool to *assist* but not |> to automatically pledge the program itself. It wouldn't replace |> human-performed auditing or analys

Re: autopledge

2023-06-02 Thread Theo de Raadt
We will wait for the demo. Leah Rowe wrote: > Hi Theo, > > On Fri, 02 Jun 2023 11:03:40 -0600 > "Theo de Raadt" wrote: > > > Additionally the two outcomes of this will be: > > > > 1. Don't call pledge in the program. > > > > 2. Use pledge("audio bpf chown cpath disklabel dns dpath drm erro

Re: autopledge

2023-06-02 Thread Leah Rowe
Hi Theo, On Fri, 02 Jun 2023 11:03:40 -0600 "Theo de Raadt" wrote: > Additionally the two outcomes of this will be: > > 1. Don't call pledge in the program. > > 2. Use pledge("audio bpf chown cpath disklabel dns dpath drm error > exec fattr flock getpw id inet mcast pf proc prot_exec ps recv

Re: autopledge

2023-06-02 Thread Theo de Raadt
> suggesting what pledge promises to use. See: > > https://man.openbsd.org/pledge.2 > > I call this idea "autopledge". Additionally the two outcomes of this will be: 1. Don't call pledge in the program. 2. Use pledge("audio bpf chown cpath disklabel dns

Re: autopledge

2023-06-02 Thread Theo de Raadt
ledge promises to use. See: > > https://man.openbsd.org/pledge.2 > > I call this idea "autopledge". > > PS: > > I initially proposed this on IRC, but I was told that the IRC channel > is mostly for user support, so I thought it best to discuss here. > > -- > Leah Rowe

Re: autopledge

2023-06-02 Thread Claudio Jeker
am that scans for all system calls in the trace, > suggesting what pledge promises to use. See: > > https://man.openbsd.org/pledge.2 > > I call this idea "autopledge". > > PS: > > I initially proposed this on IRC, but I was told that the IRC channel > is mos

autopledge

2023-06-02 Thread Leah Rowe
this idea "autopledge". PS: I initially proposed this on IRC, but I was told that the IRC channel is mostly for user support, so I thought it best to discuss here. -- Leah Rowe