Re: Documenting library promises.

2018-04-07 Thread Ingo Schwarze
HI, Remco wrote on Sat, Apr 07, 2018 at 09:23:53AM +0200: > What about having some sort of function yourlib_pledge_set_promises() > that sets up these requirements ? I think this also has the advantage of > automatically separating pledge specific code (and a man page) from > generic code as w

Re: Documenting library promises.

2018-04-07 Thread Remco
Op 04/06/18 om 16:57 schreef Kristaps Dzonsons: Hi folks, Short: what do you recommend for documenting an external library's pledge(2) requirements? Longer: https://bsd.network/@florian/99802355448571943 The question raised in this... um... toot?... is which promises are required by an externa

Re: Documenting library promises.

2018-04-06 Thread Theo de Raadt
Ingo Schwarze wrote: > Hi Kristaps, > > Kristaps Dzonsons BSD.LV wrote on Sat, Apr 07, 2018 at 01:37:32AM +0700: > > > The only reason I suggest a standalone section is that it's easier > > to standardise across manpages. > > For that goal, using ".Ss Pledge promises" > at the end of the DESCR

Re: Documenting library promises.

2018-04-06 Thread Ingo Schwarze
Hi Kristaps, Kristaps Dzonsons BSD.LV wrote on Sat, Apr 07, 2018 at 01:37:32AM +0700: > The only reason I suggest a standalone section is that it's easier > to standardise across manpages. For that goal, using ".Ss Pledge promises" at the end of the DESCRIPTION might work. For now, such consist

Re: Documenting library promises.

2018-04-06 Thread Theo de Raadt
Kristaps Dzonsons wrote: > The only reason I suggest a standalone section is that it's easier to > standardise across manpages. I do not see a way to do this in libc. So standardise isn't really required. You are talking about doing this in a port library, not a base library. I don't know how

Re: Documenting library promises.

2018-04-06 Thread Kristaps Dzonsons
>> .Sh SANDBOXING >> On >> .Ox , >> the >> .Fn khttp_parse >> function requires the >> .Qq stdio proc >> promises to >> .Xr pledge 2 . > > As long as it is only a single sentence, that could easily go right > after the description of the individual function in the DESCRIPTION, > or alternatively a

Re: Documenting library promises.

2018-04-06 Thread Theo de Raadt
> .Sh SANDBOXING And please stop using that word. It has been misused so many times, by now it is misleads. pledge is not a sandbox (whatever the hell a sandbox is)

Re: Documenting library promises.

2018-04-06 Thread Ingo Schwarze
Hi Kristaps, Kristaps Dzonsons BSD.LV wrote on Fri, Apr 06, 2018 at 09:57:09PM +0700: > Short: what do you recommend for documenting an external library's > pledge(2) requirements? That is an interesting question indeed. I never considered it before, so i will think about it in some detail. Fo