Conditionally add OpenBSD's pledge(2) call -- but to which library?

Carter Schonwald carter.schonwald at gmail.com
Thu Nov 12 01:27:09 UTC 2015


its not a posix interface ... so it probably doesn't make sense to do.

as best as I understand things, it could be an openbsd only package on
hackage, because its really application specific which priveleges should be
forsworn, and that can only be articulated at the application toplevel
right?

On Wed, Nov 11, 2015 at 4:01 PM, Matthias Kilian <kili at outback.escape.de>
wrote:

> Hi,
>
> I'd like to add the (OpenBSD only) pledge(2) call to some library in
> our (OpenBSD's) ghc port. See
>
>
> http://www.openbsd.org/cgi-bin/man.cgi/OpenBSD-current/man2/pledge.2?query=pledge
>
> and
>
> http://www.openbsd.org/papers/hackfest2015-pledge/index.html
>
> for some information of what this is about (and Linux people, please
> don't feel too offended by that second one ;-))
>
> I'd to this as a patch to ghc in our port, but I'd like to eventually
> submit a patch to include it (conditionally, only on OpenBSD for
> now) upstream. But I need some hints *where* to include it.
>
> At the moment, I'm considering the unix package (bundled with ghc),
> and therein, the module System.Posix.Unistd. Even if pledge(2)
> obviously isn't Posix, it's all about stripping down an API which
> in large parts conforms to Posix to some subset.
>
> Would this be acceptable? Or should I use something like
> System.OpenBSD.Unistd? In any case, client application using it
> would always either need some #ifdef or would get patches local to
> the OpenBSD ports tree.
>
> So, any thoughts about this?
>
> Please note: just writing a separate package for this wouldn't help
> much (for OpenBSD ports), because it would require changing cabal
> dependencies for every client application in addition to other
> source code patches.
>
> Ciao,
>         Kili
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/libraries/attachments/20151111/823998bc/attachment.html>


More information about the Libraries mailing list