osaudit.patch revision 1179
1149N/A#
1149N/A# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
1149N/A#
1149N/A# Permission is hereby granted, free of charge, to any person obtaining a
1149N/A# copy of this software and associated documentation files (the "Software"),
1149N/A# to deal in the Software without restriction, including without limitation
1149N/A# the rights to use, copy, modify, merge, publish, distribute, sublicense,
1149N/A# and/or sell copies of the Software, and to permit persons to whom the
1149N/A# Software is furnished to do so, subject to the following conditions:
1149N/A#
1149N/A# The above copyright notice and this permission notice (including the next
1149N/A# paragraph) shall be included in all copies or substantial portions of the
1149N/A# Software.
1149N/A#
1149N/A# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1149N/A# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1149N/A# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
1149N/A# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1149N/A# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
1149N/A# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
1149N/A# DEALINGS IN THE SOFTWARE.
1149N/A#
1149N/A
1149N/A7010804 Xorg should audit connections and disconnections.
1149N/A
1149N/Adiff --git a/configure.ac b/configure.ac
1179N/Aindex 122396b..d59ea4a 100644
1149N/A--- a/configure.ac
1149N/A+++ b/configure.ac
1149N/A@@ -312,6 +312,12 @@ AC_CHECK_HEADER([execinfo.h],[
1149N/A ])]
1149N/A )
1149N/A
1149N/A+# Solaris auditing
1149N/A+AC_CHECK_LIB([bsm], [adt_start_session], [HAVE_LIBBSM=yes ; SYS_LIBS=-lbsm ;
1149N/A+ AC_DEFINE([HAVE_LIBBSM], [],
1149N/A+ [Define to 1 if you have the Solaris auditing library (-lbsm)])])
1149N/A+AM_CONDITIONAL([HAVE_LIBBSM], [test "x$HAVE_LIBBSM" = xyes])
1149N/A+
1179N/A dnl ---------------------------------------------------------------------------
1179N/A dnl Bus options and CPU capabilities. Replaces logic in
1179N/A dnl hw/xfree86/os-support/bus/Makefile.am, among others.
1149N/Adiff --git a/dix/main.c b/dix/main.c
1179N/Aindex e20ffd6..f79e861 100644
1149N/A--- a/dix/main.c
1149N/A+++ b/dix/main.c
1149N/A@@ -202,6 +202,7 @@ int main(int argc, char *argv[], char *envp[])
1149N/A dixResetRegistry();
1149N/A ResetFontPrivateIndex();
1149N/A InitCallbackManager();
1149N/A+ OSAuditInit(); /* Must be after InitCallbackManager() */
1149N/A InitOutput(&screenInfo, argc, argv);
1149N/A
1149N/A if (screenInfo.numScreens < 1)
1149N/Adiff --git a/include/dix-config.h.in b/include/dix-config.h.in
1149N/Aindex d81264d..25bedef 100644
1149N/A--- a/include/dix-config.h.in
1149N/A+++ b/include/dix-config.h.in
1149N/A@@ -133,6 +133,9 @@
1149N/A /* Build a standalone xpbproxy */
1149N/A #undef STANDALONE_XPBPROXY
1149N/A
1149N/A+/* Define to 1 if you have the Solaris BSM auditing library (-lbsm) */
1149N/A+#undef HAVE_LIBBSM
1149N/A+
1149N/A /* Define to 1 if you have the `m' library (-lm). */
1149N/A #undef HAVE_LIBM
1149N/A
1149N/Adiff --git a/os/Makefile.am b/os/Makefile.am
1179N/Aindex 66a4a0f..725691d 100644
1149N/A--- a/os/Makefile.am
1149N/A+++ b/os/Makefile.am
1179N/A@@ -15,6 +15,7 @@ libos_la_SOURCES = \
1149N/A connection.c \
1149N/A io.c \
1149N/A mitauth.c \
1149N/A+ osaudit.c \
1149N/A oscolor.c \
1149N/A osdep.h \
1149N/A osinit.c \
1149N/Adiff --git a/os/osdep.h b/os/osdep.h
1149N/Aindex 087e36d..9095aab 100644
1149N/A--- a/os/osdep.h
1149N/A+++ b/os/osdep.h
1149N/A@@ -285,4 +285,7 @@ extern void XdmcpRegisterBroadcastAddress (const struct sockaddr_in *addr);
1149N/A extern void XdmAuthenticationInit (const char *cookie, int cookie_length);
1149N/A #endif
1149N/A
1149N/A+/* in osaudit.c */
1149N/A+extern void OSAuditInit (void);
1149N/A+
1149N/A #endif /* _OSDEP_H_ */