On 2021-01-21, Kevin Chadwick <m8il1i...@gmail.com> wrote:
> I can live without exec promises. However I believe I have stumbled across an
> issue on 6.8 and current.
>
> When I try to exec /bin/sh where promises is a string of all possible promises
> from the man page and the second parameter is exec promises.
>
> unix.Pledge(promises, "")
>
> I get
> sh[97964]: pledge "stdio", syscall 253
>
> unix.Pledge(promises, promises)
>
> results in no execution and no error
>
> If I use unix.PledgePromises that omits the exec promises instead of 
> unix.Pledge
> then it works just fine?
>
> https://github.com/golang/sys/blob/master/unix/pledge_openbsd.go
>
> syscalls.master:
> 253   STD NOLOCK      { int sys_issetugid(void); }
>
>

Run your code under ktrace and see what is actually passed to pledge(),
that might give some clues.


Reply via email to