open-src/xserver/xorg/osaudit.patch
author Niveditha Rau <Niveditha.Rau@Oracle.COM>
Fri, 06 Apr 2012 21:57:14 -0700
changeset 1265 0b5cc5c013e4
parent 1233 1134c9fd2fe6
child 1276 52f85727ce94
permissions -rw-r--r--
7083537 Xorg 1.12 & associated module updates
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1149
e852f51b09cd 7010804 Xorg should audit connections and disconnections.
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
     1
#
e852f51b09cd 7010804 Xorg should audit connections and disconnections.
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
     2
# Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
e852f51b09cd 7010804 Xorg should audit connections and disconnections.
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
     3
#
e852f51b09cd 7010804 Xorg should audit connections and disconnections.
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
     4
# Permission is hereby granted, free of charge, to any person obtaining a
e852f51b09cd 7010804 Xorg should audit connections and disconnections.
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
     5
# copy of this software and associated documentation files (the "Software"),
e852f51b09cd 7010804 Xorg should audit connections and disconnections.
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
     6
# to deal in the Software without restriction, including without limitation
e852f51b09cd 7010804 Xorg should audit connections and disconnections.
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
     7
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
e852f51b09cd 7010804 Xorg should audit connections and disconnections.
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
     8
# and/or sell copies of the Software, and to permit persons to whom the
e852f51b09cd 7010804 Xorg should audit connections and disconnections.
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
     9
# Software is furnished to do so, subject to the following conditions:
e852f51b09cd 7010804 Xorg should audit connections and disconnections.
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    10
#
e852f51b09cd 7010804 Xorg should audit connections and disconnections.
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    11
# The above copyright notice and this permission notice (including the next
e852f51b09cd 7010804 Xorg should audit connections and disconnections.
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    12
# paragraph) shall be included in all copies or substantial portions of the
e852f51b09cd 7010804 Xorg should audit connections and disconnections.
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    13
# Software.
e852f51b09cd 7010804 Xorg should audit connections and disconnections.
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    14
#
e852f51b09cd 7010804 Xorg should audit connections and disconnections.
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    15
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
e852f51b09cd 7010804 Xorg should audit connections and disconnections.
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    16
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
e852f51b09cd 7010804 Xorg should audit connections and disconnections.
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    17
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
e852f51b09cd 7010804 Xorg should audit connections and disconnections.
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    18
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
e852f51b09cd 7010804 Xorg should audit connections and disconnections.
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    19
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
e852f51b09cd 7010804 Xorg should audit connections and disconnections.
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    20
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
e852f51b09cd 7010804 Xorg should audit connections and disconnections.
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    21
# DEALINGS IN THE SOFTWARE.
e852f51b09cd 7010804 Xorg should audit connections and disconnections.
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    22
#
e852f51b09cd 7010804 Xorg should audit connections and disconnections.
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    23
e852f51b09cd 7010804 Xorg should audit connections and disconnections.
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    24
7010804 Xorg should audit connections and disconnections.
e852f51b09cd 7010804 Xorg should audit connections and disconnections.
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    25
e852f51b09cd 7010804 Xorg should audit connections and disconnections.
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    26
diff --git a/configure.ac b/configure.ac
1265
0b5cc5c013e4 7083537 Xorg 1.12 & associated module updates
Niveditha Rau <Niveditha.Rau@Oracle.COM>
parents: 1233
diff changeset
    27
index 6de92b4..c6ce0fc 100644
1149
e852f51b09cd 7010804 Xorg should audit connections and disconnections.
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    28
--- a/configure.ac
e852f51b09cd 7010804 Xorg should audit connections and disconnections.
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    29
+++ b/configure.ac
1265
0b5cc5c013e4 7083537 Xorg 1.12 & associated module updates
Niveditha Rau <Niveditha.Rau@Oracle.COM>
parents: 1233
diff changeset
    30
@@ -306,6 +306,12 @@ AC_CHECK_HEADER([execinfo.h],[
1149
e852f51b09cd 7010804 Xorg should audit connections and disconnections.
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    31
     ])]
e852f51b09cd 7010804 Xorg should audit connections and disconnections.
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    32
 )
e852f51b09cd 7010804 Xorg should audit connections and disconnections.
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    33
 
e852f51b09cd 7010804 Xorg should audit connections and disconnections.
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    34
+# Solaris auditing
e852f51b09cd 7010804 Xorg should audit connections and disconnections.
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    35
+AC_CHECK_LIB([bsm], [adt_start_session], [HAVE_LIBBSM=yes ; SYS_LIBS=-lbsm ;
e852f51b09cd 7010804 Xorg should audit connections and disconnections.
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    36
+    AC_DEFINE([HAVE_LIBBSM], [],
e852f51b09cd 7010804 Xorg should audit connections and disconnections.
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    37
+        [Define to 1 if you have the Solaris auditing library (-lbsm)])])
e852f51b09cd 7010804 Xorg should audit connections and disconnections.
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    38
+AM_CONDITIONAL([HAVE_LIBBSM], [test "x$HAVE_LIBBSM" = xyes])
e852f51b09cd 7010804 Xorg should audit connections and disconnections.
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    39
+
1179
4ad971e180c3 7073739 Mass minor bugfix update to X.Org upstream release [July 2011 edition]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1149
diff changeset
    40
 dnl ---------------------------------------------------------------------------
4ad971e180c3 7073739 Mass minor bugfix update to X.Org upstream release [July 2011 edition]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1149
diff changeset
    41
 dnl Bus options and CPU capabilities.  Replaces logic in
4ad971e180c3 7073739 Mass minor bugfix update to X.Org upstream release [July 2011 edition]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1149
diff changeset
    42
 dnl hw/xfree86/os-support/bus/Makefile.am, among others.
1149
e852f51b09cd 7010804 Xorg should audit connections and disconnections.
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    43
diff --git a/dix/main.c b/dix/main.c
1265
0b5cc5c013e4 7083537 Xorg 1.12 & associated module updates
Niveditha Rau <Niveditha.Rau@Oracle.COM>
parents: 1233
diff changeset
    44
index 16575ce..94be6a9 100644
1149
e852f51b09cd 7010804 Xorg should audit connections and disconnections.
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    45
--- a/dix/main.c
e852f51b09cd 7010804 Xorg should audit connections and disconnections.
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    46
+++ b/dix/main.c
1265
0b5cc5c013e4 7083537 Xorg 1.12 & associated module updates
Niveditha Rau <Niveditha.Rau@Oracle.COM>
parents: 1233
diff changeset
    47
@@ -201,6 +201,7 @@ int main(int argc, char *argv[], char *envp[])
1149
e852f51b09cd 7010804 Xorg should audit connections and disconnections.
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    48
 	dixResetRegistry();
e852f51b09cd 7010804 Xorg should audit connections and disconnections.
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    49
 	ResetFontPrivateIndex();
e852f51b09cd 7010804 Xorg should audit connections and disconnections.
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    50
 	InitCallbackManager();
e852f51b09cd 7010804 Xorg should audit connections and disconnections.
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    51
+	OSAuditInit(); /* Must be after InitCallbackManager() */
e852f51b09cd 7010804 Xorg should audit connections and disconnections.
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    52
 	InitOutput(&screenInfo, argc, argv);
e852f51b09cd 7010804 Xorg should audit connections and disconnections.
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    53
 
e852f51b09cd 7010804 Xorg should audit connections and disconnections.
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    54
 	if (screenInfo.numScreens < 1)
e852f51b09cd 7010804 Xorg should audit connections and disconnections.
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    55
diff --git a/include/dix-config.h.in b/include/dix-config.h.in
1265
0b5cc5c013e4 7083537 Xorg 1.12 & associated module updates
Niveditha Rau <Niveditha.Rau@Oracle.COM>
parents: 1233
diff changeset
    56
index 3fb6413..93f5ce5 100644
1149
e852f51b09cd 7010804 Xorg should audit connections and disconnections.
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    57
--- a/include/dix-config.h.in
e852f51b09cd 7010804 Xorg should audit connections and disconnections.
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    58
+++ b/include/dix-config.h.in
1265
0b5cc5c013e4 7083537 Xorg 1.12 & associated module updates
Niveditha Rau <Niveditha.Rau@Oracle.COM>
parents: 1233
diff changeset
    59
@@ -115,6 +115,9 @@
1149
e852f51b09cd 7010804 Xorg should audit connections and disconnections.
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    60
 /* Build a standalone xpbproxy */
e852f51b09cd 7010804 Xorg should audit connections and disconnections.
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    61
 #undef STANDALONE_XPBPROXY
e852f51b09cd 7010804 Xorg should audit connections and disconnections.
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    62
 
e852f51b09cd 7010804 Xorg should audit connections and disconnections.
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    63
+/* Define to 1 if you have the Solaris BSM auditing library (-lbsm) */
e852f51b09cd 7010804 Xorg should audit connections and disconnections.
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    64
+#undef HAVE_LIBBSM
e852f51b09cd 7010804 Xorg should audit connections and disconnections.
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    65
+
e852f51b09cd 7010804 Xorg should audit connections and disconnections.
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    66
 /* Define to 1 if you have the `m' library (-lm). */
e852f51b09cd 7010804 Xorg should audit connections and disconnections.
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    67
 #undef HAVE_LIBM
e852f51b09cd 7010804 Xorg should audit connections and disconnections.
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    68
 
1233
1134c9fd2fe6 7125797 Fix crufty code complaints uncovered by xorg-macros new tougher defaults
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1179
diff changeset
    69
diff --git a/include/os.h b/include/os.h
1265
0b5cc5c013e4 7083537 Xorg 1.12 & associated module updates
Niveditha Rau <Niveditha.Rau@Oracle.COM>
parents: 1233
diff changeset
    70
index 48ce329..e0fd97c 100644
1233
1134c9fd2fe6 7125797 Fix crufty code complaints uncovered by xorg-macros new tougher defaults
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1179
diff changeset
    71
--- a/include/os.h
1134c9fd2fe6 7125797 Fix crufty code complaints uncovered by xorg-macros new tougher defaults
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1179
diff changeset
    72
+++ b/include/os.h
1265
0b5cc5c013e4 7083537 Xorg 1.12 & associated module updates
Niveditha Rau <Niveditha.Rau@Oracle.COM>
parents: 1233
diff changeset
    73
@@ -560,4 +560,7 @@ extern _X_EXPORT void LogPrintMarkers(void);
1233
1134c9fd2fe6 7125797 Fix crufty code complaints uncovered by xorg-macros new tougher defaults
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1179
diff changeset
    74
 
1134c9fd2fe6 7125797 Fix crufty code complaints uncovered by xorg-macros new tougher defaults
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1179
diff changeset
    75
 extern _X_EXPORT void xorg_backtrace(void);
1134c9fd2fe6 7125797 Fix crufty code complaints uncovered by xorg-macros new tougher defaults
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1179
diff changeset
    76
 
1134c9fd2fe6 7125797 Fix crufty code complaints uncovered by xorg-macros new tougher defaults
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1179
diff changeset
    77
+/* in osaudit.c */
1134c9fd2fe6 7125797 Fix crufty code complaints uncovered by xorg-macros new tougher defaults
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1179
diff changeset
    78
+extern void OSAuditInit (void);
1134c9fd2fe6 7125797 Fix crufty code complaints uncovered by xorg-macros new tougher defaults
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1179
diff changeset
    79
+
1134c9fd2fe6 7125797 Fix crufty code complaints uncovered by xorg-macros new tougher defaults
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1179
diff changeset
    80
 #endif /* OS_H */
1149
e852f51b09cd 7010804 Xorg should audit connections and disconnections.
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    81
diff --git a/os/Makefile.am b/os/Makefile.am
1265
0b5cc5c013e4 7083537 Xorg 1.12 & associated module updates
Niveditha Rau <Niveditha.Rau@Oracle.COM>
parents: 1233
diff changeset
    82
index 8891485..c4825ad 100644
1149
e852f51b09cd 7010804 Xorg should audit connections and disconnections.
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    83
--- a/os/Makefile.am
e852f51b09cd 7010804 Xorg should audit connections and disconnections.
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    84
+++ b/os/Makefile.am
1179
4ad971e180c3 7073739 Mass minor bugfix update to X.Org upstream release [July 2011 edition]
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents: 1149
diff changeset
    85
@@ -15,6 +15,7 @@ libos_la_SOURCES = 	\
1149
e852f51b09cd 7010804 Xorg should audit connections and disconnections.
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    86
 	connection.c	\
e852f51b09cd 7010804 Xorg should audit connections and disconnections.
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    87
 	io.c		\
e852f51b09cd 7010804 Xorg should audit connections and disconnections.
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    88
 	mitauth.c	\
e852f51b09cd 7010804 Xorg should audit connections and disconnections.
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    89
+	osaudit.c	\
e852f51b09cd 7010804 Xorg should audit connections and disconnections.
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    90
 	oscolor.c	\
e852f51b09cd 7010804 Xorg should audit connections and disconnections.
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    91
 	osdep.h		\
e852f51b09cd 7010804 Xorg should audit connections and disconnections.
Alan Coopersmith <Alan.Coopersmith@Oracle.COM>
parents:
diff changeset
    92
 	osinit.c	\