/*
* 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
*/
/*
*/
/*
* Ruby binding for libbsm used by Puppet to record audit events
*/
#include <ruby.h>
#include <pwd.h>
#include <nss_dbdefs.h>
#include <bsm/adt_event.h>
{
perror("puppet adt_start_session");
exit(1);
}
rb_obj_call_init(data, 0, 0);
return (data);
}
static VALUE
{
char *buffer;
perror("puppet adt_load_hostname");
(void) adt_end_session(ah);
exit(1);
}
exit(1);
/* set "puppet" as user name and preselection */
perror("puppet getpwnam_r(puppet)");
(void) adt_end_session(ah);
exit(1);
}
perror("puppet getpwnam_r(puppet)");
(void) adt_end_session(ah);
exit(1);
}
perror("puppet adt_set_user");
(void) adt_end_session(ah);
exit(1);
}
/* set audit context on this process */
if (adt_set_proc(ah) != 0) {
perror("puppet adt_set_proc");
(void) adt_end_session(ah);
exit(1);
}
return (self);
}
static VALUE
{
perror("adt_alloc_event(ADT_puppet_session_start)");
(void) adt_end_session(ah);
} else {
perror("adt_put_event(ADT_puppet_session_start)");
}
}
return (self);
}
static VALUE
{
perror("adt_alloc_event(ADT_puppet_session_end)");
} else {
perror("adt_put_event(ADT_puppet_session_end)");
}
}
return (self);
}
static VALUE
{
(void) adt_end_session(ah);
return (self);
}
void
{
}