audit_kadmind.c revision dfc7be02c381b7c61998fdb9ecbf069933d62381
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2010 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*
*/
#include <stdio.h>
#include <bsm/audit_record.h>
#include <bsm/audit_uevents.h>
#include <stdlib.h>
#include <string.h>
#include <syslog.h>
#include <tiuser.h>
#include <unistd.h>
#include <generic.h>
#include <note.h>
#ifdef C2_DEBUG2
#else
#define dprintf(x)
#endif
/*
* netbuf2pm()
*
* Given an endpt in netbuf form, return the port and machine.
* kadmind (currently) only works over IPv4, so only handle IPv4 addresses.
*/
static void
{
struct sockaddr_in sin4;
if (!addr) {
return;
}
return;
}
if (machine)
if (port)
} else {
dprintf(("netbuf2pm: unknown caller IP address family %d",
sin4.sin_family));
"netbuf2pm: unknown caller IP address family %d",
}
}
#define AUD_NULL_STR(s) ((s) ? (s) : "(null)")
static void
char *op, /* requested operation */
char *prime_arg, /* argument for op */
char *clnt_name, /* client principal name */
int sorf) /* flag for success or failure */
{
char text_buf[512];
dprintf(("common_audit() start\n"));
/* if auditing turned off, then don't do anything */
if (cannot_audit(0))
return;
(void) aug_save_namask();
/*
* set default values. We will overwrite them if appropriate.
*/
perror("kadmind");
return;
}
AUD_NULL_STR(op));
dprintf(("common_audit(): l_port=%d, r_port=%d,\n",
(void) aug_audit();
}
void
char *op,
char *prime_arg,
char *clnt_name,
int sorf)
{
}
void
char *op,
char *prime_arg,
char *clnt_name)
{
clnt_name, 1);
}