Jeremy Evans <jer...@openbsd.org> writes:

> This is based on the ruby-tame port I worked on at c2k15, which
> apparently was too early.  Using this, you can access pledge(2)
> from ruby via:
>
>   require 'pledge'
>   Pledge.pledge('rpath') # stdio added automatically, as ruby needs it
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
This bugs me, since "stdio" is needed by pretty much any program.  the
following program dies with SIGABRT:

#include <unistd.h>

int
main(void)
{
        if (pledge("", NULL) == -1)
                return 1;
        return 0;
}

Why would the ruby interface be different?

>
> Source code at https://github.com/jeremyevans/ruby-pledge
>
> OKs for import?
>
> Thanks,
> Jeremy
>
>


-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

Reply via email to