stub for pledge(2) for systems that lack it

This commit is contained in:
Damien Miller 2015-11-30 09:45:29 +11:00
parent 452c0b6af5
commit 14c887c839
2 changed files with 18 additions and 0 deletions

View File

@ -0,0 +1,14 @@
/* Placed in the public domain. */
#include "includes.h"
#ifndef HAVE_PLEDGE
/* Stub; real implementations wanted. */
int
pledge(const char *promises, const char *paths[])
{
return 0;
}
#endif /* HAVE_PLEDGE */

View File

@ -264,6 +264,10 @@ int bcrypt_pbkdf(const char *, size_t, const u_int8_t *, size_t,
void explicit_bzero(void *p, size_t n);
#endif
#ifndef HAVE_PLEDGE
int pledge(const char *promises, const char *paths[]);
#endif /* HAVE_PLEDGE */
void *xmmap(size_t size);
char *xcrypt(const char *password, const char *salt);
char *shadow_pw(struct passwd *pw);