[openssh-commits] [openssh] 01/01: Add a null implementation of pledge.
git+noreply at mindrot.org
git+noreply at mindrot.org
Mon Nov 30 07:24:31 AEDT 2015
This is an automated email from the git hooks/post-receive script.
dtucker pushed a commit to branch master
in repository openssh.
commit 3ddd15e1b63a4d4f06c8ab16fbdd8a5a61764f16
Author: Darren Tucker <dtucker at zip.com.au>
Date: Mon Nov 30 07:23:53 2015 +1100
Add a null implementation of pledge.
Fixes builds on almost everything.
---
configure.ac | 2 +-
openbsd-compat/bsd-misc.c | 8 ++++++++
openbsd-compat/bsd-misc.h | 4 ++++
3 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 1527a13..85e9843 100644
--- a/configure.ac
+++ b/configure.ac
@@ -854,7 +854,6 @@ mips-sony-bsd|mips-sony-newsos4)
AC_DEFINE([SYSLOG_R_SAFE_IN_SIGHAND], [1],
[syslog_r function is safe to use in in a signal handler])
TEST_MALLOC_OPTIONS="AFGJPRX"
- AC_CHECK_FUNCS([pledge])
;;
*-*-solaris*)
if test "x$withval" != "xno" ; then
@@ -1669,6 +1668,7 @@ AC_CHECK_FUNCS([ \
nsleep \
ogetaddrinfo \
openlog_r \
+ pledge \
poll \
prctl \
pstat \
diff --git a/openbsd-compat/bsd-misc.c b/openbsd-compat/bsd-misc.c
index f7be415..2a788e4 100644
--- a/openbsd-compat/bsd-misc.c
+++ b/openbsd-compat/bsd-misc.c
@@ -276,3 +276,11 @@ getpgid(pid_t pid)
return -1;
}
#endif
+
+#ifndef HAVE_PLEDGE
+int
+pledge(const char *promises, const char *paths[])
+{
+ return 0;
+}
+#endif
diff --git a/openbsd-compat/bsd-misc.h b/openbsd-compat/bsd-misc.h
index ff347a2..0d81d17 100644
--- a/openbsd-compat/bsd-misc.h
+++ b/openbsd-compat/bsd-misc.h
@@ -122,4 +122,8 @@ pid_t getpgid(pid_t);
# define krb5_free_error_message(a,b) do { } while(0)
#endif
+#ifndef HAVE_PLEDGE
+int pledge(const char *promises, const char *paths[]);
+#endif
+
#endif /* _BSD_MISC_H */
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list