Re: pledging a portable program

2017-01-20 Thread Ingo Schwarze
Hi, Jordon wrote on Fri, Jan 20, 2017 at 11:01:25PM -0600: > I need to learn about the config process > and I'm not sure where to start. If you want to learn about automatic build configuration, i'd recommend to *NOT* look at the GNU autotools - and at none of the other monster systems like cmak

Re: pledging a portable program

2017-01-20 Thread Jordon
> OpenSSH Portable checks for the presence of pledge in configure > (https://anongit.mindrot.org/openssh.git/tree/configure.ac#n1715) and > if not found defines a no-op pledge function > (https://anongit.mindrot.org/openssh.git/tree/openbsd-compat/bsd-misc.c#n282) I finally took some time to look

Re: pledging a portable program

2017-01-16 Thread Jordon
> On Jan 16, 2017, at 4:31 PM, Darren Tucker wrote: > > On Tue, Jan 17, 2017 at 6:05 AM, Jordon wrote: >> What is the “official" way to pledge(2) a portable program? > > OpenSSH Portable checks for the presence of pledge in configure > (https://anongit.mindrot.org/openssh.git/tree/configure.ac#n1

Re: pledging a portable program

2017-01-16 Thread Darren Tucker
On Tue, Jan 17, 2017 at 6:05 AM, Jordon wrote: > What is the “official" way to pledge(2) a portable program? OpenSSH Portable checks for the presence of pledge in configure (https://anongit.mindrot.org/openssh.git/tree/configure.ac#n1715) and if not found defines a no-op pledge function (https://

Re: pledging a portable program

2017-01-16 Thread Bryan Steele
On Mon, Jan 16, 2017 at 01:05:36PM -0600, Jordon wrote: > What is the ???official" way to pledge(2) a portable program? > > Put #ifdef __OpenBSD__ around the pledge call? > > Make an #ifndef __OpenBSD__ block that defined the function to always return > 0? > > Something better? pledge() itself

Re: pledging a portable program

2017-01-16 Thread Jeremie Courreges-Anglas
Jordon writes: > What is the “official" way to pledge(2) a portable program? > > Put #ifdef __OpenBSD__ around the pledge call? > > Make an #ifndef __OpenBSD__ block that defined the function to always return > 0? This kind of tests harm portability in the long run. > Something better? How abo

pledging a portable program

2017-01-16 Thread Jordon
What is the “official" way to pledge(2) a portable program? Put #ifdef __OpenBSD__ around the pledge call? Make an #ifndef __OpenBSD__ block that defined the function to always return 0? Something better?