Print this page
7849 Disable auditing when building native svc.configd
Reviewed by: Yuri Pankov <yuri.pankov@nexenta.com>
Reviewed by: Robert Mustacchi <rm@joyent.com>
@@ -19,10 +19,11 @@
* CDDL HEADER END
*/
/*
* Copyright (c) 2004, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright 2015 RackTop Systems.
*/
/*
* This is the client layer for svc.configd. All direct protocol interactions
* are handled here.
@@ -733,11 +734,13 @@
free((void *)cp->rc_file);
/*
* End audit session.
*/
+#ifndef NATIVE_BUILD
(void) adt_end_session(cp->rc_adt_session);
+#endif
client_free(cp);
}
/*
@@ -1950,10 +1953,11 @@
(void) pthread_mutex_lock(&cp->rc_annotate_lock);
cp->rc_annotate = 0;
(void) pthread_mutex_unlock(&cp->rc_annotate_lock);
}
+#ifndef NATIVE_BUILD
static void
start_audit_session(repcache_client_t *cp)
{
ucred_t *cred = NULL;
adt_session_data_t *session;
@@ -2006,10 +2010,11 @@
cp->rc_adt_session = session;
adt_get_asid(session, &cp->rc_adt_sessionid);
ucred_free(cred);
}
+#endif
/*
* Handle switch client request
*
* This routine can return:
@@ -2456,11 +2461,13 @@
cp->rc_all_auths = privileged;
cp->rc_pid = pid;
cp->rc_debug = debugflags;
+#ifndef NATIVE_BUILD
start_audit_session(cp);
+#endif
cp->rc_doorfd = door_create(client_switcher, (void *)cp->rc_id,
door_flags);
if (cp->rc_doorfd < 0) {