/* Define to 1 if you have the `auth_challenge' function. */
#undef HAVE_AUTH_CHALLENGE
+/* Define to 1 if the `au_close' functions takes 4 arguments like Solaris 11.
+ */
+#undef HAVE_AU_CLOSE_SOLARIS11
+
/* Define to 1 if you have the `bigcrypt' function. */
#undef HAVE_BIGCRYPT
fi
fi
+if test X"$with_bsm_audit" = X"yes"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether au_close() takes 4 arguments" >&5
+$as_echo_n "checking whether au_close() takes 4 arguments... " >&6; }
+if ${sudo_cv_func_au_close_solaris11+:} false; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+#include <bsm/audit.h>
+#include <bsm/libbsm.h>
+#include <bsm/audit_uevents.h>
+
+int au_close(int d, int keep, au_event_t event, au_emod_t emod) {return 0;}
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ sudo_cv_func_au_close_solaris11=yes
+else
+ sudo_cv_func_au_close_solaris11=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $sudo_cv_func_au_close_solaris11" >&5
+$as_echo "$sudo_cv_func_au_close_solaris11" >&6; }
+ if test $sudo_cv_func_au_close_solaris11 = yes; then
+
+$as_echo "#define HAVE_AU_CLOSE_SOLARIS11 1" >>confdefs.h
+
+ fi
+
+fi
+
if test X"$enable_poll" = X""; then
for ac_func in ppoll poll
do :
fi
fi
+dnl
+dnl Solaris 11 added a 4th argument to the au_close() function
+dnl
+if test X"$with_bsm_audit" = X"yes"; then
+ SUDO_FUNC_AU_CLOSE_SOLARIS11
+fi
+
dnl
dnl Choose event subsystem backend: poll or select
dnl
fi
])
+dnl
+dnl check whether au_close() takes 3 or 4 arguments
+dnl
+AC_DEFUN([SUDO_FUNC_AU_CLOSE_SOLARIS11],
+[AC_CACHE_CHECK([whether au_close() takes 4 arguments],
+sudo_cv_func_au_close_solaris11,
+[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT
+#include <bsm/audit.h>
+#include <bsm/libbsm.h>
+#include <bsm/audit_uevents.h>
+
+int au_close(int d, int keep, au_event_t event, au_emod_t emod) {return 0;}], [])],
+ [sudo_cv_func_au_close_solaris11=yes],
+ [sudo_cv_func_au_close_solaris11=no])
+ ])
+ if test $sudo_cv_func_au_close_solaris11 = yes; then
+ AC_DEFINE(HAVE_AU_CLOSE_SOLARIS11, 1, [Define to 1 if the `au_close' functions takes 4 arguments like Solaris 11.])
+ fi
+])
+
dnl
dnl Check if the data argument for the sha2 functions is void * or u_char *
dnl
debug_return_int(-1);
}
au_write(aufd, tok);
-#ifdef __sun
+#ifdef HAVE_AU_CLOSE_SOLARIS11
if (au_close(aufd, 1, sudo_audit_event, 0) == -1)
#else
if (au_close(aufd, 1, sudo_audit_event) == -1)
debug_return_int(-1);
}
au_write(aufd, tok);
-#ifdef __sun
+#ifdef HAVE_AU_CLOSE_SOLARIS11
if (au_close(aufd, 1, sudo_audit_event, PAD_FAILURE) == -1)
#else
if (au_close(aufd, 1, sudo_audit_event) == -1)