summaryrefslogtreecommitdiff
path: root/openbsd-compat
diff options
context:
space:
mode:
Diffstat (limited to 'openbsd-compat')
-rw-r--r--openbsd-compat/bsd-pledge.c14
-rw-r--r--openbsd-compat/openbsd-compat.h4
2 files changed, 18 insertions, 0 deletions
diff --git a/openbsd-compat/bsd-pledge.c b/openbsd-compat/bsd-pledge.c
new file mode 100644
index 000000000..afce3c002
--- /dev/null
+++ b/openbsd-compat/bsd-pledge.c
@@ -0,0 +1,14 @@
1/* Placed in the public domain. */
2
3#include "includes.h"
4
5#ifndef HAVE_PLEDGE
6
7/* Stub; real implementations wanted. */
8int
9pledge(const char *promises, const char *paths[])
10{
11 return 0;
12}
13
14#endif /* HAVE_PLEDGE */
diff --git a/openbsd-compat/openbsd-compat.h b/openbsd-compat/openbsd-compat.h
index 8cc8a11b7..be7b6877e 100644
--- a/openbsd-compat/openbsd-compat.h
+++ b/openbsd-compat/openbsd-compat.h
@@ -264,6 +264,10 @@ int bcrypt_pbkdf(const char *, size_t, const u_int8_t *, size_t,
264void explicit_bzero(void *p, size_t n); 264void explicit_bzero(void *p, size_t n);
265#endif 265#endif
266 266
267#ifndef HAVE_PLEDGE
268int pledge(const char *promises, const char *paths[]);
269#endif /* HAVE_PLEDGE */
270
267void *xmmap(size_t size); 271void *xmmap(size_t size);
268char *xcrypt(const char *password, const char *salt); 272char *xcrypt(const char *password, const char *salt);
269char *shadow_pw(struct passwd *pw); 273char *shadow_pw(struct passwd *pw);