[openssh-commits] [openssh] 03/03: stub for pledge(2) for systems that lack it
git+noreply at mindrot.org
git+noreply at mindrot.org
Mon Nov 30 09:46:05 AEDT 2015
This is an automated email from the git hooks/post-receive script.
djm pushed a commit to branch master
in repository openssh.
commit 14c887c8393adde2d9fd437d498be30f8c98535c
Author: Damien Miller <djm at mindrot.org>
Date: Mon Nov 30 09:45:29 2015 +1100
stub for pledge(2) for systems that lack it
---
openbsd-compat/bsd-pledge.c | 14 ++++++++++++++
openbsd-compat/openbsd-compat.h | 4 ++++
2 files changed, 18 insertions(+)
diff --git a/openbsd-compat/bsd-pledge.c b/openbsd-compat/bsd-pledge.c
new file mode 100644
index 0000000..afce3c0
--- /dev/null
+++ b/openbsd-compat/bsd-pledge.c
@@ -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 */
diff --git a/openbsd-compat/openbsd-compat.h b/openbsd-compat/openbsd-compat.h
index 8cc8a11..be7b687 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,
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);
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list