490
491
492
493
494
495
496
497
498
499
500
501
502
503
|
/*
** Interface to pledge() on OpenBSD 5.9 and later.
**
** On platforms that have pledge(), use this routine.
** On all other platforms, this routine does not exist, but instead
** a macro defined in config.h is used to provide a no-op.
*/
void fossil_pledge(const char *promises, const char *execpromises){
if( pledge(promises, execpromises) ){
fossil_fatal("pledge(\"%s\",\"%s\") fails with errno=%d",
promises, execpromises, (int)errno);
}
}
#endif /* defined(HAVE_PLEDGE) */
|
|
|
|
|
|
490
491
492
493
494
495
496
497
498
499
500
501
502
503
|
/*
** Interface to pledge() on OpenBSD 5.9 and later.
**
** On platforms that have pledge(), use this routine.
** On all other platforms, this routine does not exist, but instead
** a macro defined in config.h is used to provide a no-op.
*/
void fossil_pledge(const char *promises){
if( pledge(promises, 0) ){
fossil_fatal("pledge(\"%s\",NULL) fails with errno=%d",
promises, (int)errno);
}
}
#endif /* defined(HAVE_PLEDGE) */
|