19698098 Xtsol build fails due to removal of cannot_audit from libbsm exported API
--- a/open-src/lib/Makefile Tue Sep 23 20:14:15 2014 -0700
+++ b/open-src/lib/Makefile Fri Sep 26 17:12:53 2014 -0700
@@ -41,8 +41,11 @@
# libpthread-stubs before libdrm and xcb
# libdrm before mesa
+# Additional Solaris requirements:
+# libXtsol before DPS, since libdpstkXm depends indirectly on it via Motif
+
# Dependencies needed for parallel make:
-DPS: libX11 libXt
+DPS: libX11 libXt libXtsol
fontconfig: freetype
libdga: libX11
libdmx: libX11 libXext
--- a/open-src/xserver/xorg/sun-src/tsol/auditwrite.c Tue Sep 23 20:14:15 2014 -0700
+++ b/open-src/xserver/xorg/sun-src/tsol/auditwrite.c Fri Sep 26 17:12:53 2014 -0700
@@ -387,8 +387,6 @@
extern void adt_get_mask(const adt_session_data_t *, au_mask_t *);
extern void adt_get_termid(const adt_session_data_t *, au_tid_addr_t *);
-extern int cannot_audit(int);
-
/*
* a w _ g e t _ a r g s ( )
*
@@ -432,10 +430,6 @@
register int i; /* counter */
int retval; /* return value */
- /* Is auditing even enabled? If not, just exit */
- if (cannot_audit(0) == 1)
- AW_GEN_ERR(AW_ERR_AUDITON_FAIL);
-
/* Grab the lock */
(void) mutex_lock(&mutex_auditwrite);
--- a/open-src/xserver/xorg/sun-src/tsol/tsolextension.c Tue Sep 23 20:14:15 2014 -0700
+++ b/open-src/xserver/xorg/sun-src/tsol/tsolextension.c Fri Sep 26 17:12:53 2014 -0700
@@ -399,8 +399,8 @@
priv_freeset(tsolinfo->privs);
}
/* Audit disconnect */
- if (system_audit_on && (au_preselect(AUE_ClientDisconnect, &(tsolinfo->amask),
- AU_PRS_BOTH, AU_PRS_USECACHE) == 1)) {
+ if (au_preselect(AUE_ClientDisconnect, &(tsolinfo->amask),
+ AU_PRS_BOTH, AU_PRS_USECACHE) == 1) {
auditwrite(AW_PRESELECT, &(tsolinfo->amask),AW_END);
auditwrite(AW_EVENTNUM, AUE_ClientDisconnect,
AW_XCLIENT, client->index,
@@ -1850,9 +1850,8 @@
audit_val = 0;
}
- if (system_audit_on &&
- (au_preselect(AUE_ClientConnect, &(tsolinfo->amask),
- AU_PRS_BOTH, AU_PRS_USECACHE) == 1)) {
+ if (au_preselect(AUE_ClientConnect, &(tsolinfo->amask),
+ AU_PRS_BOTH, AU_PRS_USECACHE) == 1) {
int status;
ushort_t connect_port = 0;
struct in_addr *connect_addr = NULL;
--- a/open-src/xserver/xorg/sun-src/tsol/tsolinfo.h Tue Sep 23 20:14:15 2014 -0700
+++ b/open-src/xserver/xorg/sun-src/tsol/tsolinfo.h Fri Sep 26 17:12:53 2014 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2014, Oracle and/or its affiliates. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -337,7 +337,6 @@
extern int PolySelection(Atom atom);
extern TsolPolyInstInfoRec tsolpolyinstinfo;
extern uid_t OwnerUID; /* Workstation owner uid */
-extern Bool system_audit_on;
/*********************************
*
--- a/open-src/xserver/xorg/sun-src/tsol/tsolprotocol.c Tue Sep 23 20:14:15 2014 -0700
+++ b/open-src/xserver/xorg/sun-src/tsol/tsolprotocol.c Fri Sep 26 17:12:53 2014 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2014, Oracle and/or its affiliates. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -822,8 +822,7 @@
Bool audit_event = FALSE;
TsolInfoPtr tsolinfo = (TsolInfoPtr)NULL;
tsolinfo = GetClientTsolInfo(client);
- if (system_audit_on &&
- (tsolinfo->amask.am_success || tsolinfo->amask.am_failure)) {
+ if (tsolinfo->amask.am_success || tsolinfo->amask.am_failure) {
do_x_audit = TRUE;
auditwrite(AW_PRESELECT, &(tsolinfo->amask), AW_END);
--- a/open-src/xserver/xorg/sun-src/tsol/tsolutils.c Tue Sep 23 20:14:15 2014 -0700
+++ b/open-src/xserver/xorg/sun-src/tsol/tsolutils.c Fri Sep 26 17:12:53 2014 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 2014, Oracle and/or its affiliates. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -62,7 +62,6 @@
( ((b1)->y2 <= (b2)->y1)) || \
( ((b1)->y1 >= (b2)->y2)) ) )
-Bool system_audit_on = FALSE;
Bool priv_win_colormap = FALSE;
Bool priv_win_config = FALSE;
Bool priv_win_devices = FALSE;
@@ -410,8 +409,6 @@
return (0);
}
-extern int cannot_audit(int); /* bsm function */
-
void
init_xtsol(void)
{
@@ -421,11 +418,6 @@
init_TSOL_cached_SL();
init_TSOL_uid_table();
- if (cannot_audit(TRUE))
- system_audit_on = FALSE;
- else
- system_audit_on = TRUE;
-
auditwrite(AW_QUEUE, XAUDIT_Q_SIZE, AW_END);
}