summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@zip.com.au>2016-02-19 09:05:39 +1100
committerDarren Tucker <dtucker@zip.com.au>2016-02-19 09:05:39 +1100
commit907091acb188b1057d50c2158f74c3ecf1c2302b (patch)
tree62f2c59f51e55a3f49c7c173527425eb1b19a876 /configure.ac
parent292a8dee14e5e67dcd1b49ba5c7b9023e8420d59 (diff)
Make Solaris privs code build on older systems.
Not all systems with Solaris privs have priv_basicset so factor that out and provide backward compatibility code. Similarly, not all have PRIV_NET_ACCESS so wrap that in #ifdef. Based on code from alex at cooperi.net and djm@ with help from carson at taltos.org and wieland at purdue.edu.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac12
1 files changed, 6 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac
index b4c0aaab7..e36b04942 100644
--- a/configure.ac
+++ b/configure.ac
@@ -896,11 +896,9 @@ mips-sony-bsd|mips-sony-newsos4)
896 else 896 else
897 AC_MSG_RESULT([no]) 897 AC_MSG_RESULT([no])
898 fi 898 fi
899 AC_CHECK_FUNC([setppriv], 899 AC_CHECK_FUNCS([setppriv])
900 [ AC_CHECK_HEADERS([priv.h], [ 900 AC_CHECK_FUNCS([priv_basicset])
901 SOLARIS_PRIVS="yes" 901 AC_CHECK_HEADERS([priv.h])
902 ])
903 ])
904 AC_ARG_WITH([solaris-contracts], 902 AC_ARG_WITH([solaris-contracts],
905 [ --with-solaris-contracts Enable Solaris process contracts (experimental)], 903 [ --with-solaris-contracts Enable Solaris process contracts (experimental)],
906 [ 904 [
@@ -925,7 +923,9 @@ mips-sony-bsd|mips-sony-newsos4)
925 [ --with-solaris-privs Enable Solaris/Illumos privileges (experimental)], 923 [ --with-solaris-privs Enable Solaris/Illumos privileges (experimental)],
926 [ 924 [
927 AC_MSG_CHECKING([for Solaris/Illumos privilege support]) 925 AC_MSG_CHECKING([for Solaris/Illumos privilege support])
928 if test "x$SOLARIS_PRIVS" = "xyes" ; then 926 if test "x$ac_cv_func_setppriv" = "xyes" -a \
927 "x$ac_cv_header_priv_h" = "xyes" ; then
928 SOLARIS_PRIVS=yes
929 AC_MSG_RESULT([found]) 929 AC_MSG_RESULT([found])
930 AC_DEFINE([NO_UID_RESTORATION_TEST], [1], 930 AC_DEFINE([NO_UID_RESTORATION_TEST], [1],
931 [Define to disable UID restoration test]) 931 [Define to disable UID restoration test])