summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authortz204579 <none@none>2007-05-07 05:51:14 -0700
committertz204579 <none@none>2007-05-07 05:51:14 -0700
commitc0c79a3f09914f35651895ffc111883455b7f62d (patch)
tree0cbfca30316a033852c34f1d64939c85725b3536 /usr/src
parent640a330583804996bba2cbf92f092a1685320031 (diff)
downloadillumos-joyent-c0c79a3f09914f35651895ffc111883455b7f62d.tar.gz
6522311 adt_ interfaces need automated build process
--HG-- rename : usr/src/lib/libadt_jni/com/sun/audit/AuditEvent.java => deleted_files/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent.java rename : usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_admin_authenticate.java => deleted_files/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_admin_authenticate.java rename : usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_filesystem_add.java => deleted_files/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_filesystem_add.java rename : usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_filesystem_delete.java => deleted_files/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_filesystem_delete.java rename : usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_filesystem_modify.java => deleted_files/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_filesystem_modify.java rename : usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_login.java => deleted_files/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_login.java rename : usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_logout.java => deleted_files/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_logout.java rename : usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_network_add.java => deleted_files/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_network_add.java rename : usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_network_delete.java => deleted_files/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_network_delete.java rename : usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_network_modify.java => deleted_files/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_network_modify.java rename : usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_passwd.java => deleted_files/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_passwd.java rename : usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_printer_add.java => deleted_files/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_printer_add.java rename : usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_printer_delete.java => deleted_files/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_printer_delete.java rename : usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_printer_modify.java => deleted_files/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_printer_modify.java rename : usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_rlogin.java => deleted_files/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_rlogin.java rename : usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_role_login.java => deleted_files/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_role_login.java rename : usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_scheduledjob_add.java => deleted_files/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_scheduledjob_add.java rename : usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_scheduledjob_delete.java => deleted_files/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_scheduledjob_delete.java rename : usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_scheduledjob_modify.java => deleted_files/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_scheduledjob_modify.java rename : usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_screenlock.java => deleted_files/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_screenlock.java rename : usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_serialport_add.java => deleted_files/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_serialport_add.java rename : usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_serialport_delete.java => deleted_files/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_serialport_delete.java rename : usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_serialport_modify.java => deleted_files/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_serialport_modify.java rename : usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_ssh.java => deleted_files/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_ssh.java rename : usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_su.java => deleted_files/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_su.java rename : usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_telnet.java => deleted_files/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_telnet.java rename : usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_uauth.java => deleted_files/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_uauth.java rename : usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_usermgr_add.java => deleted_files/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_usermgr_add.java rename : usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_usermgr_delete.java => deleted_files/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_usermgr_delete.java rename : usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_usermgr_modify.java => deleted_files/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_usermgr_modify.java rename : usr/src/lib/libadt_jni/common/adt_jni_event.c => deleted_files/usr/src/lib/libadt_jni/common/adt_jni_event.c rename : usr/src/lib/libadt_jni/common/mapfile-vers => deleted_files/usr/src/lib/libadt_jni/common/mapfile-vers rename : usr/src/lib/libbsm/common/adt_event.h => deleted_files/usr/src/lib/libbsm/common/adt_event.h rename : usr/src/lib/libbsm/common/adt_xlate.c => deleted_files/usr/src/lib/libbsm/common/adt_xlate.c rename : usr/src/lib/libbsm/common/adt_xml.txt => usr/src/lib/libbsm/common/adt.xml
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/cmd/bsmrecord/Makefile8
-rw-r--r--usr/src/cmd/bsmrecord/audit_record_attr.txt419
-rw-r--r--usr/src/cmd/bsmrecord/audit_record_xml113
-rw-r--r--usr/src/lib/libadt_jni/Makefile16
-rw-r--r--usr/src/lib/libadt_jni/auditxml_jni1134
-rw-r--r--usr/src/lib/libadt_jni/com/sun/audit/AuditEvent.java125
-rw-r--r--usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_admin_authenticate.java57
-rw-r--r--usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_filesystem_add.java84
-rw-r--r--usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_filesystem_delete.java84
-rw-r--r--usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_filesystem_modify.java84
-rw-r--r--usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_login.java60
-rw-r--r--usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_logout.java56
-rw-r--r--usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_network_add.java84
-rw-r--r--usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_network_delete.java84
-rw-r--r--usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_network_modify.java84
-rw-r--r--usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_passwd.java59
-rw-r--r--usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_printer_add.java84
-rw-r--r--usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_printer_delete.java84
-rw-r--r--usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_printer_modify.java84
-rw-r--r--usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_rlogin.java60
-rw-r--r--usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_role_login.java57
-rw-r--r--usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_scheduledjob_add.java84
-rw-r--r--usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_scheduledjob_delete.java84
-rw-r--r--usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_scheduledjob_modify.java84
-rw-r--r--usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_screenlock.java51
-rw-r--r--usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_serialport_add.java84
-rw-r--r--usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_serialport_delete.java84
-rw-r--r--usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_serialport_modify.java84
-rw-r--r--usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_ssh.java57
-rw-r--r--usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_su.java59
-rw-r--r--usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_telnet.java60
-rw-r--r--usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_uauth.java63
-rw-r--r--usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_usermgr_add.java84
-rw-r--r--usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_usermgr_delete.java84
-rw-r--r--usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_usermgr_modify.java84
-rw-r--r--usr/src/lib/libadt_jni/com/sun/audit/Makefile4
-rw-r--r--usr/src/lib/libadt_jni/common/adt_jni_event.c2686
-rw-r--r--usr/src/lib/libadt_jni/common/mapfile-vers71
-rw-r--r--usr/src/lib/libbsm/Makefile26
-rw-r--r--usr/src/lib/libbsm/auditxml1060
-rw-r--r--usr/src/lib/libbsm/auditxml.pm861
-rw-r--r--usr/src/lib/libbsm/common/adt.xml (renamed from usr/src/lib/libbsm/common/adt_xml.txt)173
-rw-r--r--usr/src/lib/libbsm/common/adt.xsd151
-rw-r--r--usr/src/lib/libbsm/common/adt_event.h598
-rw-r--r--usr/src/lib/libbsm/common/adt_xlate.c1186
-rw-r--r--usr/src/lib/libbsm/xmlHandlers.pm323
46 files changed, 3858 insertions, 7247 deletions
diff --git a/usr/src/cmd/bsmrecord/Makefile b/usr/src/cmd/bsmrecord/Makefile
index 7884efb39f..244990b44d 100644
--- a/usr/src/cmd/bsmrecord/Makefile
+++ b/usr/src/cmd/bsmrecord/Makefile
@@ -19,7 +19,7 @@
# CDDL HEADER END
#
#
-# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# ident "%Z%%M% %I% %E% SMI"
@@ -37,6 +37,9 @@ PROG = bsmrecord
AGETTEXT = mkmsg
STRIPTEXT = filter_txt
+ATTRPROC = audit_record_xml
+LIBBSMDIR = ../../lib/libbsm
+ADTXMLFILE = $(LIBBSMDIR)/common/adt.xml
.KEEP_STATE:
@@ -61,8 +64,9 @@ clean:
$(SED) -e "s@TEXT_DOMAIN@\"$(TEXT_DOMAIN)\"@" $< > $@
$(CHMOD) 755 $@
-$(ATTR): $(STRIPTEXT) $(ATTR).txt
+$(ATTR): $(STRIPTEXT) $(ATTRPROC) $(ADTXMLFILE) $(ATTR).txt
./$(STRIPTEXT) < $(ATTR).txt > $(ATTR)
+ $(PERL) -I $(LIBBSMDIR) ./$(ATTRPROC) $(ADTXMLFILE) >> $(ATTR)
$(ROOTUSRSBINPROG): $(PROG)
$(INS.file) $(PROG)
diff --git a/usr/src/cmd/bsmrecord/audit_record_attr.txt b/usr/src/cmd/bsmrecord/audit_record_attr.txt
index 7e2b89b953..838a2a0ec2 100644
--- a/usr/src/cmd/bsmrecord/audit_record_attr.txt
+++ b/usr/src/cmd/bsmrecord/audit_record_attr.txt
@@ -1956,17 +1956,6 @@ label=AUE_XMKNOD
label=AUE_XSTAT
skip=Not Used. xstat() generates AUE_STAT.
-label=AUE_admin_authenticate
- program=admin (various)
- see=SMC, WBEM, or AdminSuite
- title=Admin Server Authentication
- format=[text]1
- comment="successful login" or error message
-# see aue_mgrs.c
-# header,61,2,admin login,,Tue Oct 23 12:45:22 2001, + 187 msec
-# subject,tuser1,tuser1,emacs,tuser1,emacs,23400,3451581082,24 7 tmach2
-# return,success,0
-
label=AUE_allocate_fail
program=/usr/sbin/allocate
title=allocate: allocate-device failure
@@ -2099,77 +2088,12 @@ label=AUE_ftpd_logout
format=text
# See audit_ftpd
-label=AUE_filesystem_add
- program=SMC server
- see=
- title=SMC: filesystem add
- format=text1:[text]2:text3:uauth4:text5
- comment=object name:
- comment=domain:
- comment=name_service:
- comment=authorization used:
- comment=initial values
-
-label=AUE_filesystem_modify
- program=SMC server
- see=
- title=SMC: filesystem modify
- format=text1:[text]2:text3:uauth4:text5
- comment=object name:
- comment=domain:
- comment=name_service:
- comment=authorization used:
- comment=changed values
-
-label=AUE_filesystem_delete
- program=SMC server
- see=
- title=SMC: filesystem delete
- format=text1:[text]2:text3:uauth4:text5
- comment=object name:
- comment=domain:
- comment=name_service:
- comment=authorization used:
- comment=deleted values
-
label=AUE_halt_solaris
program=/usr/sbin/halt
title=halt
format=user
# See audit_halt.c
-label=AUE_inetd_connect
- program=/usr/sbin/inetd
- title=inetd
- format=text1:tid2:cmd3:privset
- comment=service name:client address:inetd command
-
-label=AUE_inetd_ratelimit
- program=/usr/sbin/inetd
- title=inetd
- format=text1:text2
- comment=service name:limit value
-
-label=AUE_inetd_copylimit
- program=/usr/sbin/inetd
- title=inetd
- format=text1:text2
- comment=service name:limit value
-
-label=AUE_inetd_failrate
- program=/usr/sbin/inetd
- title=inetd
- format=text1:text2
- comment=service name:limit value, interval
-
-label=AUE_init_solaris
- title=init
- see=init(1M)
- program=/sbin/init;/usr/sbin/init;/usr/sbin/shutdown
- format=text1
- comment=init level or zone name
-# See cmd/init/init.c
-
label=AUE_kadmind_auth
format=text1:text2:text3
comment=Op&colon; <requested information>:
@@ -2222,20 +2146,6 @@ label=AUE_listdevice_succ
comment=command line arguments
# See audit_allocate.c
-label=AUE_login
- title=terminal login
- program=/usr/sbin/login;/usr/dt/bin/dtlogin
- see=login(1);dtlogin
- format=text1
- comment=error message or "successful login"
-
-label=AUE_logout
- title=login: logout
- program=various
- see=login(1)
- format=text1
- comment="logout" username
-
label=AUE_modify_user
program=administration: modify user
format=text1:text2:text3:text4:text5:text6:text7:text8:text9:text10:text11:text12:text13:text14
@@ -2270,109 +2180,12 @@ label=AUE_mountd_umount
comment=mount dir
# See audit_mountd.c; old BSM manual is way off
-label=AUE_network_add
- program=SMC server
- see=
- title=SMC: network add
- format=text1:[text]2:text3:uauth4:text5
- comment=object name:
- comment=domain:
- comment=name_service:
- comment=authorization used:
- comment=initial values
-
-label=AUE_network_modify
- program=SMC server
- see=
- title=SMC: network modify
- format=text1:[text]2:text3:uauth4:text5
- comment=object name:
- comment=domain:
- comment=name_service:
- comment=authorization used:
- comment=changed values
-
-label=AUE_network_delete
- program=SMC server
- see=
- title=SMC: network delete
- format=text1:[text]2:text3:uauth4:text5
- comment=object name:
- comment=domain:
- comment=name_service:
- comment=authorization used:
- comment=deleted values
-
-label=AUE_newgrp_login
- program=newgrp
- format=text1
- comment=Group id
-
-label=AUE_passwd
- program=/usr/bin/passwd
- title=passwd
- format=text1
- comment=success/fail message
-# See audit_passwd.c
-
-label=AUE_printer_add
- see=
- program=SMC server
- title=SMC: printer add
- format=text1:[text]2:text3:uauth4:text5
- comment=object name:
- comment=domain:
- comment=name_service:
- comment=authorization used:
- comment=initial values
-
-label=AUE_printer_modify
- see=
- program=SMC server
- title=SMC: printer modify
- format=text1:[text]2:text3:uauth4:text5
- comment=object name:
- comment=domain:
- comment=name_service:
- comment=authorization used:
- comment=changed values
-
-label=AUE_printer_delete
- program=SMC server
- see=
- title=SMC: printer delete
- format=text1:[text]2:text3:uauth4:text5
- comment=object name:
- comment=domain:
- comment=name_service:
- comment=authorization used:
- comment=deleted values
-
label=AUE_poweroff_solaris
program=/usr/sbin/poweroff
title=poweroff
format=user
# See audit_halt.c
-label=AUE_prof_cmd
- program=/usr/bin/pfexec
- see=pfexec(1)
- title=pfexec
- format=[newgroup]:path1:path2:cmd:process:[privset]:[privset]
- comment=working directory:
- comment=command pathname
-#header,164,2,profile command,,tmach1,Thu Oct 2 13:22:12 PDT 2003, + 914 msec
-#subject,testuser1,root,staff,testuser1,staff,2821,3890428265,0 25 tmach2
-#path,/usr/include/security
-#path,/usr/sbin
-#cmd,argcnt,0,envcnt,0,
-#process,root,root,root,root,root,2821,3890428265,0 25 tmach2
-#privilege,Limit,none
-#return,success,0
-#sequence,16972
-#trailer,164
-
-
label=AUE_reboot_solaris
program=/usr/sbin/reboot
title=reboot
@@ -2403,25 +2216,6 @@ label=AUE_rexecd
comment="Command line&colon;" command attempted
# See audit_rexecd.c
-label=AUE_rlogin
- title=rlogin
- program=/usr/sbin/login
- see=login(1) - rlogin
- format=[text]1
- comment=success/fail message
-
-label=AUE_role_login
- program=SMC server;/usr/bin/su
- title=RBAC: role login
- format=[text]1
- comment=error message
-
-label=AUE_role_logout
- program=/usr/bin/su
- title=su
- see=su(1M)
- format=user
-
label=AUE_rshd
program=/usr/sbin/in.rshd
title=in.rshd
@@ -2432,80 +2226,6 @@ label=AUE_rshd
comment=failure message
# See audit_rshd.c
-label=AUE_scheduledjob_add
- program=SMC server
- see=
- title=SMC: scheduled job add
- format=text1:[text]2:text3:uauth4:text5
- comment=object name:
- comment=domain:
- comment=name_service:
- comment=authorization used:
- comment=initial values
-
-label=AUE_scheduledjob_modify
- see=
- program=SMC server
- title=SMC: scheduled job modify
- format=text1:[text]2:text3:uauth4:text5
- comment=object name:
- comment=domain:
- comment=name_service:
- comment=authorization used:
- comment=changed values
-
-label=AUE_scheduledjob_delete
- program=SMC server
- see=
- title=SMC: scheduled job delete
- format=text1:[text]2:text3:uauth4:text5
- comment=object name:
- comment=domain:
- comment=name_service:
- comment=authorization used:
- comment=deleted values
-
-label=AUE_screenlock
- program=desktop screen lock
- format=user
-
-label=AUE_screenunlock
- program=desktop screen unlock
- format=user
-
-label=AUE_serialport_add
- program=SMC server
- see=
- title=SMC: serial port add
- format=text1:[text]2:text3:uauth4:text5
- comment=object name:
- comment=domain:
- comment=name_service:
- comment=authorization used:
- comment=initial values
-
-label=AUE_serialport_modify
- program=SMC server
- see=
- title=SMC: serial port modify
- format=text1:[text]2:text3:uauth4:text5
- comment=object name:
- comment=domain:
- comment=name_service:
- comment=authorization used:
- comment=changed values
-
-label=AUE_serialport_delete
- program=SMC server
- see=
- title=SMC: serial port add
- format=text1:[text]2:text3:uauth4:text5
- comment=object name:
- comment=domain:
- comment=name_service:
- comment=authorization used:
- comment=deleted values
-
label=AUE_shutdown_solaris
title=shutdown
program=/usr/ucb/shutdown
@@ -2520,34 +2240,6 @@ label=AUE_smserverd
# see usr/src/cmd/smserverd
# code shows a third token, path, but it isn't implemented.
-label=AUE_ssh
- program=/usr/lib/ssh/sshd
- format=[text]1
- comment=error message
-# header,61,2,login - ssh,,Tue Oct 23 12:45:30 2001, + 143 msec
-# subject,tuser57,tuser57,staff,tuser57,staff,23408,296727403,0 0 0.0.0.0
-# return,success,0
-
-label=AUE_su
- program=/usr/bin/su
- title=su
- see=su(1M)
- format=[text]1
- comment="user name" of failed new user/role
-
-label=AUE_su_logout
- program=/usr/bin/su
- title=su
- see=su(1M)
- format=user
-
-label=AUE_telnet
- title=telnet login
- program=/usr/sbin/login
- see=login(1) - telnet
- format=[text]1
- comment=success/fail message
-
label=AUE_uadmin_solaris
title=uadmin
program=/sbin/uadmin;/usr/sbin/uadmin
@@ -2555,114 +2247,3 @@ label=AUE_uadmin_solaris
comment=function code:argument code
# See audit_uadmin.c
-label=AUE_uauth
- program=SMC server
- see=
- title=SMC: Use of Authorization
- format=uauth1:text2
- comment=authorization used:
- comment=object name
-
-label=AUE_usermgr_add
- see=
- program=SMC server
- title=SMC: User Manager add
- format=text1:[text]2:text3:uauth4:text5
- comment=object name:
- comment=domain:
- comment=name_service:
- comment=authorization used:
- comment=initial values
-# header,137,2,add user/user attributes,,Tue Oct 23 12:45:26 2001, + 725 msec
-# subject,tuser1,tuser1,emacs,tuser1,emacs,23404,2926062642,0 0 0.0.0.0
-# text,passwd.h
-# text,NIS-
-# use of authorization,phony role
-# text,A long list of attribute / value pairs
-# return,success,0
-
-label=AUE_usermgr_modify
- program=SMC server
- see=
- title=SMC: User Manager modify
- format=text1:[text]2:text3:uauth4:text5
- comment=object name:
- comment=domain:
- comment=name_service:
- comment=authorization used:
- comment=changed values
-
-label=AUE_usermgr_delete
- program=SMC server
- see=
- title=SMC: User Manager delete
- format=text1:[text]2:text3:uauth4:text5
- comment=object name:
- comment=domain:
- comment=name_service:
- comment=authorization used:
- comment=deleted values
-
-label=AUE_zone_state
- format=text1:zone2
- comment=New zone state:zone name
-
-label=AUE_attach
- program=hald
- format=uauth1:text2:text3:[text4]
- comment=authorization used:mount point:device:options
-label=AUE_detach
- program=hald
- format=uauth1:text2:text3:[text4]
- comment=authorization used:mount point:device:options
-label=AUE_remove
- program=hald
- format=uauth1:[text2]:text3
- comment=authorization used:mount point:device
-label=AUE_pool_import
- program=hald
- format=uauth1:text2:text3
- comment=authorization used:pool:device
-label=AUE_pool_export
- program=hald
- format=uauth1:text2:text3
- comment=authorization used:pool:device
-
-label=AUE_dladm_create_secobj
- program=/usr/sbin/dladm
- title=create wifi security object
- see=dladm(1M)
- format=uauth1:text2:text3
- comment=authorization used:
- comment=object class name:
- comment=object name
-
-label=AUE_dladm_delete_secobj
- program=/usr/sbin/dladm
- title=delete wifi security object
- see=dladm(1M)
- format=uauth1:text2:text3
- comment=authorization used:
- comment=object class name:
- comment=object name
-
-label=AUE_file_relabel
- title=relabel file from one zone to another
- program=setlabel(1)
- see=setflabel(3TSOL)
- format=uauth1:text2:label3:label4
- comment=authorization used:
- comment=file relabeled:
- comment=original label:
- comment=new label
-
-label=AUE_file_copy
- title=copy file to another zone
- program=dtfile(1X)
- see=
- format=uauth1:text2:label3:text4:label5
- comment=authorization used:
- comment=source file:
- comment=source label:
- comment=destination directory:
- comment=destination label
diff --git a/usr/src/cmd/bsmrecord/audit_record_xml b/usr/src/cmd/bsmrecord/audit_record_xml
new file mode 100644
index 0000000000..26ab83297b
--- /dev/null
+++ b/usr/src/cmd/bsmrecord/audit_record_xml
@@ -0,0 +1,113 @@
+#!/usr/perl5/bin/perl -w
+#
+# 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
+# or http://www.opensolaris.org/os/licensing.
+# 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 2007 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "%Z%%M% %I% %E% SMI"
+#
+
+# audit_record_xml [-d] <xml input file>
+
+# audit_record_xml takes the audit record description (.xml file) and
+# generates adt_ part of audit_record_attr on stdout.
+
+use auditxml;
+use Getopt::Std;
+use vars qw($opt_d);
+use strict;
+
+
+our $debug = 0; # normal use is to set via the file being parsed.
+ # <debug set="on"/> or <debug set="off"/> or <debug/>
+ # if the set attribute is omitted, debug state is toggled
+ # Override with appDebug, but toggle won't do what you
+ # want.
+my $appDebug = 0; # used after return from "new auditxml";
+
+my $prog = $0; $prog =~ s|.*/||g;
+my $usage = "usage: $prog [-d] file.xml\n";
+
+getopts('d');
+
+$appDebug = $opt_d;
+
+die $usage if ($#ARGV < 0);
+
+my $doc = new auditxml ($ARGV[0]); # input XML file
+
+$debug = $appDebug;
+
+foreach my $eventId ($doc->getEventIds) {
+ my $event = $doc->getEvent($eventId);
+ next if ($event->getOmit eq 'always');
+ print "label=$eventId\n";
+ my $title = $event->getTitle;
+ print " title=$title\n" if (defined $title && length($title));
+ my $program = $event->getProgram;
+ if (defined $program && scalar @$program) {
+ print " program=";
+ print join(";", @$program);
+ print "\n";
+ }
+ my $see = $event->getSee;
+ if (defined $see && scalar @$see) {
+ print " see=";
+ print join(";", @$see);
+ print "\n";
+ }
+ my $format = [];
+ my $comments = [];
+ my $idx = 0;
+ my $superClass = $event->getSuperClass;
+ $event = $superClass if (defined $superClass && ref($superClass));
+ foreach my $entryId ($event->getExternal->getEntryIds) {
+ next if $entryId eq 'subject';
+ next if $entryId eq 'return';
+ my @entry = $event->getExternal->getEntry($entryId);
+ my $token = $entry[2];
+ my $comment = $entry[4];
+ my $opt = $entry[0]->getAttr('opt');
+ $token = "[$token]" if ($opt eq 'optional');
+ if (defined $comment && ($comment ne '')) {
+ $idx++;
+ $token .= $idx;
+ push @$comments, $comment;
+ }
+ push @$format, $token;
+ }
+ if (scalar @$format) {
+ print " format=".join(":", @$format)."\n";
+ } else {
+ print " format=user\n";
+ }
+ my $commentStr = '';
+ foreach (@$comments) {
+ $commentStr .= " comment=$_:\n";
+ }
+ $commentStr =~ s/:\n$/\n/s;
+ print $commentStr;
+ print "\n";
+}
+
+exit (0);
+
diff --git a/usr/src/lib/libadt_jni/Makefile b/usr/src/lib/libadt_jni/Makefile
index ea3e23e818..ef277af6a0 100644
--- a/usr/src/lib/libadt_jni/Makefile
+++ b/usr/src/lib/libadt_jni/Makefile
@@ -19,7 +19,7 @@
# CDDL HEADER END
#
#
-# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# ident "%Z%%M% %I% %E% SMI"
@@ -29,6 +29,10 @@ include ../Makefile.lib
POFILE = libadt_jni.po
MSGFILES= `$(GREP) -l gettext */*.[ch]`
+GENSRCS = common/adt_jni_event.c common/mapfile-vers com/sun/audit/AuditEvent.java
+LIBBSMDIR = ../libbsm
+ADTXMLFILE = $(LIBBSMDIR)/common/adt.xml
+AUDITXML = ./auditxml_jni
SUBDIRS = $(MACH)
$(BUILD64)SUBDIRS += $(MACH64)
@@ -41,11 +45,19 @@ lint := TARGET= lint
.KEEP_STATE:
-all install clean clobber lint: com/sun .WAIT $(SUBDIRS)
+CLEANFILES += $(GENSRCS)
+
+all install lint: $(GENSRCS) com/sun .WAIT $(SUBDIRS)
com/sun $(SUBDIRS): FRC
@cd $@; pwd; $(MAKE) $(TARGET)
+$(GENSRCS): $(AUDITXML) $(ADTXMLFILE)
+ $(PERL) -I $(LIBBSMDIR) $(AUDITXML) $(ADTXMLFILE)
+
+clean clobber: com/sun $(SUBDIRS)
+ -$(RM) $(CLEANFILES)
+
$(POFILE): pofile_MSGFILES
_msg: $(MSGDOMAINPOFILE)
diff --git a/usr/src/lib/libadt_jni/auditxml_jni b/usr/src/lib/libadt_jni/auditxml_jni
new file mode 100644
index 0000000000..614219110d
--- /dev/null
+++ b/usr/src/lib/libadt_jni/auditxml_jni
@@ -0,0 +1,1134 @@
+#!/usr/perl5/bin/perl -w
+#
+# 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
+# or http://www.opensolaris.org/os/licensing.
+# 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 2007 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "%Z%%M% %I% %E% SMI"
+#
+
+# auditxml_jni [-d] <xml input file>
+
+# auditxml takes the audit record description (.xml file) and
+# generates the files needed for the Java
+
+use auditxml;
+use Getopt::Std;
+use vars qw($opt_d);
+use strict;
+
+
+our $debug = 0; # normal use is to set via the file being parsed.
+ # <debug set="on"/> or <debug set="off"/> or <debug/>
+ # if the set attribute is omitted, debug state is toggled
+ # Override with appDebug, but toggle won't do what you
+ # want.
+my $appDebug = 0; # used after return from "new auditxml";
+
+my $genNotice = "
+DO NOT EDIT. This file is auto generated by the Solaris Audit
+system from adt.xml.
+
+See http://opensolaris.org/os/project/audit/
+";
+
+# trim leading/trailing newlines
+$genNotice =~ s/^\n//s;
+$genNotice =~ s/\n$//s;
+my $prog = $0; $prog =~ s|.*/||g;
+my $usage = "usage: $prog [-d] file.xml\n";
+
+getopts('d');
+
+$appDebug = $opt_d;
+
+my $uniLabel = "adr";
+my $xlateUniLabelInc = 0;
+
+die $usage if ($#ARGV < 0);
+
+# where everything comes from and where it goes:
+
+my $templatePath = './';
+my $javaPath = $templatePath;
+my $bsmBuildPath = "../libbsm";
+
+my $jniBuildPath = "$javaPath";
+
+my $buildPathJ = "$jniBuildPath/com/sun/audit";
+my $buildPathJNI = "$jniBuildPath/common";
+
+my $auditEventJ = "$buildPathJ/AuditEvent.java";
+my $jniC = "$buildPathJNI/adt_jni_event.c";
+my $mapFile = "$jniBuildPath/common/mapfile-vers";
+
+my $doc = new auditxml ($ARGV[0]); # input XML file
+
+$debug = $appDebug;
+
+my %jniEventTable = ();
+my %externalIdNo = ();
+my %msg_list = ();
+my %eventCode = ();
+
+readAuditEventFile("$bsmBuildPath/audit_event.txt");
+
+my $event;
+while ($event = $doc->getNextEvent()) {
+ my $eventId = $event->getId();
+ my $idNo = $event->getIdNo();
+ $externalIdNo{$eventId} = $idNo;
+ my $super;
+ my $omit = $event->getOmit();
+ my $eventType = '';
+ if ($super = $event->getSuperClass()) {
+ $event = $super;
+ $eventType = 'instance';
+ } else {
+ $eventType = $event->getType();
+ }
+
+ # c file table for translation
+ generateTableC($event, $eventId, $eventType, undef, $omit);
+}
+
+while (my $textList = $doc->getNextMsgId()) {
+ generateMsgLists($textList); # enum -> text mappings
+}
+
+printJavaFiles($jniC, $auditEventJ, $buildPathJ, $mapFile);
+
+exit 0;
+
+
+
+sub printJavaFiles {
+ my $jniFile = shift;
+ my $javaFile = shift;
+ my $subclassPath = shift;
+ my $mapFile = shift;
+
+ # warning: time_t is equated to jlong since there is no
+ # way to use sys/types.h in Java code.
+ # java long is C long long, 64 bits.
+ # java int is 32 bits.
+
+ my %java_jni = ('ADT_DATE' => ['long', 'jlong'],
+ 'ADT_UINT' => ['int', 'jint'],
+ 'ADT_INT' => ['int', 'jint'],
+ 'ADT_INT32' => ['int', 'jint'],
+ 'ADT_UID' => ['int', 'jint'],
+ 'ADT_GID' => ['int', 'jint'],
+ 'ADT_UIDSTAR' => ['int[]', 'jintArray'],
+ 'ADT_GIDSTAR' => ['int[]', 'jintArray'],
+ 'ADT_CHAR' => ['String', 'jchar'],
+ 'ADT_CHARSTAR' => ['String', 'jstring'],
+ 'ADT_CHAR2STAR' => ['String[]', 'jstring'],
+ 'ADT_MSG' => ['int', 'jint'],
+ 'ADT_PID' => ['int', 'jint'],
+# ADT_PRIVSTAR omitted -- not implemented and the audit records that
+# use it must be coded to emit no java. We'll cross that bridge
+# when someone in Java land needs to generate a priv token.
+ 'ADT_LONG' => ['int', 'jint'],
+ 'ADT_TERMIDSTAR' => ['String', 'jstring'], # hostname -> termid
+ 'ADT_ULONG' => ['int', 'jint'],
+ 'ADT_UINT16' => ['int', 'jint'],
+ 'ADT_UINT32' => ['int', 'jint'],
+ 'ADT_UINT32STAR' => ['int[]', 'jintArray'],
+# ADT_UINT32ARRAY omitted; no Java implementation yet
+ 'ADT_UINT64' => ['long', 'jlong'],
+ 'ADT_UINT64STAR' => ['long[]', 'jlongArray']
+ );
+ my $noMemory = 'gettext("Out of memory")';
+
+ # open output files
+ open (Cfile, ">$jniFile") or
+ die "can't open output file ($jniFile): $!\n";
+ open (Jfile, ">$javaFile") or
+ die "can't open output file ($javaFile): $!\n";
+ open (MapFile, ">$mapFile") or
+ die "can't open output file ($mapFile): $!\n";
+
+ # write headers
+ my $notice = $genNotice;
+ $notice =~ s/\n/\n * /gs;
+ $notice =~ s/\s+\n/\n/gs;
+ print Cfile <<EOF;
+/*
+ * $notice
+ */
+
+#include "../../libbsm/common/adt_xlate.h"
+#include <jni.h>
+#include "../com/sun/audit/AuditSession.h" /* javah output */
+#include "adt_jni.h"
+#include <stdlib.h>
+#include <string.h>
+
+static char *except_class = "java/lang/Exception";
+
+EOF
+ print Jfile <<EOF;
+/*
+ * $notice
+ */
+
+package com.sun.audit;
+
+public class AuditEvent {
+ protected AuditSession sh; // associated session object
+
+ public AuditEvent(AuditSession auSession)
+ throws Error
+ {
+
+ sh = auSession;
+ }
+
+ // See the subclasses of AuditEvent for mapping message codes
+ // to events
+EOF
+
+ my $notice_map = $genNotice;
+ $notice_map =~ s/\n/\n# /gs;
+ $notice_map =~ s/\s+\n/\n/gs;
+ print MapFile <<EOF;
+#
+# $notice_map
+#
+
+SUNWprivate_1.1 {
+ global:
+ c2j_pointer;
+ j2c_pointer;
+ Java_com_sun_audit_AuditSession_bsmAuditOn;
+ Java_com_sun_audit_AuditSession_startSession;
+ Java_com_sun_audit_AuditSession_endSession;
+ Java_com_sun_audit_AuditSession_dupSession;
+ Java_com_sun_audit_AuditSession_getSessionId;
+ Java_com_sun_audit_AuditSession_exportSessionData;
+
+# One subclass of AuditEvent per audit record...
+EOF
+
+ # generate java final int classes to line up with string/enums
+
+ foreach my $listName (sort keys %msg_list) {
+ my $shortName = uc $listName;
+ $shortName =~ s/_TEXT//;
+ my ($listRef, $headref) = @{$msg_list{$listName}};
+ my @listValue = @$listRef;
+ my ($header, $enumValue, $public, $deprecated) = @$headref;
+ my $listValue;
+
+ print Jfile "\n\t// adt_$listName" . "\n\n";
+ print Jfile "\tpublic static final int ADT_$shortName",
+ " = $enumValue;\n" if $enumValue;
+
+ next unless ($#listValue >= 0);
+ print Jfile "\t// Deprecated message list\n" if $deprecated;
+ foreach $listValue (@listValue) {
+ my ($id, $text) = split(/\s*::\s*/, $listValue);
+ print Jfile "\t// $text\n";
+ print Jfile "\tpublic static final int ADT_$shortName";
+ print Jfile "_$id = $enumValue;\n";
+ $enumValue++;
+ }
+ }
+
+ # generate event creation and access functions and event
+ # generation for both Java and JNI
+ # com.sun.audit.AuditEvent_xxx.java
+ foreach my $eventId (sort keys %jniEventTable) {
+ my ($ref1, $eventType, $allowedIds, $header) = @{$jniEventTable{$eventId}};
+ $eventCode{$eventId} = -1 if ($eventType eq 'generic');
+ my @entries = @$ref1;
+ my $entries = $#entries;
+ my $root = $eventId;
+ $root =~ s/AUE_//;
+ my $javaPutEvent = 'putEvent';
+ my $putMethod = "_$root";
+ $putMethod =~ s/_/_1/g;
+
+ my $jniPutEvent = "Java_com_sun_audit_AuditEvent$putMethod" . "_$javaPutEvent";
+
+ # the subclass file template isn't used; it may be needed to get
+ # the right file header stuff in place. The subclassPath is
+ # the directory that contains 'em.
+
+ my $validSfile = 1;
+ unless (open(Sfile, ">$subclassPath/AuditEvent_$root.java")) {
+ print STDERR "can't open class file AuditEvent_$root.java: $!\n";
+ $validSfile = 0;
+ }
+ if ($eventCode{"AUE_$root"}) {
+ if ($validSfile) {
+ print Sfile <<EOF;
+/*
+ * $notice
+ */
+
+package com.sun.audit;
+
+// audit event: $eventId = $eventCode{"AUE_$root"}
+
+public class AuditEvent_$root extends AuditEvent {
+
+EOF
+ }
+ } else {
+ print STDERR "no event code for $eventId. Is audit_event current?\n";
+ }
+ my $nativeParameterList = '';
+ my $jniParameterList = '';
+ my $specParameterList = '';
+ my $jniStorageList = '';
+ my $needCleanupTarget = 0;
+ my $jniFreeList = '';
+
+ my $haveStringDef = 0;
+ my $haveCDef = 0;
+ my $haveLengthDef = 0;
+ my $haveStringArrayDef = 0;
+ my $cntTermidDef = 0;
+ my $jniDefine;
+ my $needLocaleDefined = 0;
+ my $jniADTalloc;
+ if (defined $header && ($header > 0) ) {
+ $jniDefine = "union union_of_events *event;\n" .
+ "\tadt_session_data_t *session;\n";
+ $jniADTalloc = '(union union_of_events *)adt_alloc_event';
+ } else {
+ $jniDefine = "adt_event_data_t *event;\n" .
+ "\tadt_session_data_t *session;\n";
+ $jniADTalloc = 'adt_alloc_event';
+ }
+ my $ref2;
+ foreach $ref2 (@entries) {
+ my ($id, $type) = @$ref2;
+ my $jniRoot = $root . $id;
+ $jniRoot =~ s/_/_1/g; # escape unicode "_"
+
+ my $p_event;
+ if (defined $header && ($header > 0) ) {
+ $p_event = "event->d$header.adt_$root.$id";
+ } else {
+ $p_event = "event->adt_$root.$id";
+ }
+
+ if ($type eq 'ADT_UINT32STAR') { # int array
+ $needLocaleDefined = 1;
+
+
+ $jniStorageList .= <<EOF;
+ /* $id */
+ length = (*env)->GetArrayLength(env, $id);
+ $p_event =
+ (int *)malloc(length * sizeof (int));
+ if ($p_event == NULL) {
+ locale = I18N_SETUP;
+ local_throw(env, except_class,
+ $noMemory);
+ (void) setlocale(LC_MESSAGES, locale);
+ goto cleanup;
+ }
+ (*env)->GetIntArrayRegion(env, $id, 0, length,
+ (int *)$p_event);
+EOF
+
+
+ $jniFreeList .= "\n\tif ($p_event != NULL)\n" .
+ "\t\tfree($p_event);\n";
+ unless ($haveLengthDef) {
+ $haveLengthDef = 1;
+ $jniDefine .= "\tint\t\t\tlength;\n";
+ }
+ $nativeParameterList .= ",\n\t int[]\t$id";
+ $jniParameterList .= ",\n jintArray\t$id";
+ $specParameterList .= ", jintArray";
+ $needCleanupTarget = 1;
+ } elsif (($type eq 'ADT_UIDSTAR') ||
+ ($type eq 'ADT_GIDSTAR')) { # gid_t array
+ my $cType = 'uid_t';
+ $cType = 'gid_t' if ($type eq 'ADT_GIDSTAR');
+ $needLocaleDefined = 1;
+
+
+ $jniStorageList .= <<EOF;
+ /* $id */
+ length = (*env)->GetArrayLength(env, $id);
+ $p_event =
+ ($cType *)malloc(length * sizeof ($cType));
+ if ($p_event == NULL) {
+ locale = I18N_SETUP;
+ local_throw(env, except_class,
+ $noMemory);
+ (void) setlocale(LC_MESSAGES, locale);
+ goto cleanup;
+ }
+ (*env)->GetIntArrayRegion(env, $id, 0, length,
+ (int *)$p_event);
+EOF
+
+
+ $jniFreeList .=
+ "\n\tif ($p_event != NULL)\n" .
+ "\t\tfree($p_event);\n";
+ unless ($haveLengthDef) {
+ $haveLengthDef = 1;
+ $jniDefine .= "\tint\t\t\tlength;\n";
+ }
+ $nativeParameterList .= ",\n\t int[]\t$id";
+ $jniParameterList .= ",\n jintArray\t$id";
+ $specParameterList .= ", jintArray";
+ $needCleanupTarget = 1;
+ } elsif ($type eq 'ADT_UINT64STAR') { # long array
+ $needLocaleDefined = 1;
+ $jniStorageList .= <<EOF;
+ /* $id */
+ length = (*env)->GetArrayLength(env, $id);
+ $p_event =
+ (long *)malloc(length * sizeof (long long));
+ if ($p_event == NULL) {
+ locale = I18N_SETUP;
+ local_throw(env, except_class,
+ $noMemory);
+ (void) setlocale(LC_MESSAGES, locale);
+ goto cleanup;
+ }
+ (*env)->GetLongArrayRegion(env, $id, 0, length,
+ $p_event);
+EOF
+ $jniFreeList .= "\n\tif ($p_event != NULL)\n" .
+ "\t\tfree($p_event);\n";
+ unless ($haveLengthDef) {
+ $haveLengthDef = 1;
+ $jniDefine .= "\tint\t\t\tlength;\n";
+ }
+ $nativeParameterList .= ",\n\t long[]\t$id";
+ $jniParameterList .= ",\n jlongArray\t$id";
+ $specParameterList .= ", jlongArray";
+ $needCleanupTarget = 1;
+ } elsif ($type eq 'ADT_CHAR') { # string in Java, char in C
+ $jniStorageList .= <<EOF;
+
+ /* $id */
+ c = (char *)(*env)->GetStringUTFChars(env, $id, NULL);
+ if (c == NULL)
+ goto cleanup; /* exception thrown */
+ $p_event = *c;
+ (*env)->ReleaseStringUTFChars(env, $id, c);
+EOF
+ # no need to free anything
+ unless ($haveCDef) {
+ $haveCDef = 1;
+ $jniDefine .= "\tchar\t\t\t*c\n";
+ }
+ $nativeParameterList .= ",\n\t String\t$id";
+ $jniParameterList .= ",\n jstring\t$id";
+ $specParameterList .= ", jstring";
+ } elsif ($type eq 'ADT_CHARSTAR') {
+ $needLocaleDefined = 1;
+ $jniStorageList .= <<EOF;
+ /* $id */
+ if ($id != NULL) {
+ string = (char *)(*env)->GetStringUTFChars(
+ env, $id, NULL);
+ if (string == NULL)
+ goto cleanup; /* exception thrown */
+ $p_event = strdup(string);
+ (*env)->ReleaseStringUTFChars(env, $id, string);
+ if ($p_event == NULL) {
+ locale = I18N_SETUP;
+ local_throw(env, except_class,
+ $noMemory);
+ (void) setlocale(LC_MESSAGES, locale);
+ goto cleanup;
+ }
+ }
+EOF
+ $jniFreeList .= "\n\tif ($p_event != NULL)\n" .
+ "\t\tfree($p_event);\n";
+ unless ($haveStringDef) {
+ $haveStringDef = 1;
+ $jniDefine .= "\tchar\t\t\t*string;\n";
+ }
+ $nativeParameterList .= ",\n\t String\t$id";
+ $jniParameterList .= ",\n jstring\t$id";
+ $specParameterList .= ", jstring";
+ $needCleanupTarget = 1;
+ } elsif ($type eq 'ADT_CHAR2STAR') { # array of string
+ $needLocaleDefined = 1;
+ $jniStorageList .= <<EOF;
+ /* $id */
+ length = (*env)->GetArrayLength(env, $id);
+ $p_event = (char **)malloc(length
+ * sizeof (char *));
+ if ($p_event == NULL) {
+ locale = I18N_SETUP;
+ local_throw(env, except_class,
+ $noMemory);
+ (void) setlocale(LC_MESSAGES, locale);
+ goto cleanup;
+ }
+ p = $p_event;
+ for (i = 0; i < length; i++) {
+ jString = (*env)->GetObjectArrayElement(env, $id, i);
+ string = (char *)(*env)->GetStringUTFChars(
+ env, jString, NULL);
+ if (string == NULL)
+ goto cleanup; /* exception thrown */
+ *p = strdup(string);
+ (*env)->ReleaseStringUTFChars(env, jString, string);
+ if (*p == NULL) {
+ locale = I18N_SETUP;
+ local_throw(env, except_class,
+ $noMemory);
+ (void) setlocale(LC_MESSAGES, locale);
+ while (p >= $p_event)
+ free(*p--);
+ goto cleanup;
+ }
+ p++;
+ }
+EOF
+ $jniFreeList .=
+ "\n\tif ($p_event != NULL)\n" .
+ "\t\tfree($p_event);\n";
+ unless ($haveStringArrayDef) {
+ unless ($haveStringDef) {
+ $haveStringDef = 1;
+ $jniDefine .= <<EOF;
+ char *string;
+EOF
+ }
+ unless ($haveLengthDef) {
+ $haveLengthDef = 1;
+ $jniDefine .= <<EOF;
+ int length;
+EOF
+ }
+ $haveStringArrayDef = 1;
+ $jniDefine .= <<EOF;
+ int i;
+ char **p;
+ jstring jString;
+EOF
+ }
+ $nativeParameterList .= ",\n\t String[]\t$id";
+ $jniParameterList .= ",\n jstring\t$id";
+ $specParameterList .= ", jstring";
+ $needCleanupTarget = 1;
+ } elsif ($type eq 'ADT_TERMIDSTAR') {
+ $needLocaleDefined = 1;
+
+ $jniStorageList .= <<EOF;
+ /* $id */
+ hostname$cntTermidDef = (char *)(*env)->GetStringUTFChars(env, $id, NULL);
+
+ if (adt_load_hostname((const char *)hostname$cntTermidDef, &termid$cntTermidDef)) {
+ local_throw(env, except_class,
+ gettext("hostname lookup failed"));
+ }
+ $p_event = termid$cntTermidDef;
+
+ (*env)->ReleaseStringUTFChars(env, $id, hostname$cntTermidDef);
+EOF
+
+ $jniFreeList .= "\n\tif (hostname$cntTermidDef != NULL)\n" .
+ "\t\tfree(hostname$cntTermidDef);\n";
+ $jniFreeList .= "\n\tif (termid$cntTermidDef != NULL)\n" .
+ "\t\tfree(termid$cntTermidDef);\n";
+
+ $jniDefine .= "\tchar\t\t\t*hostname$cntTermidDef;\n";
+ $jniDefine .= "\tadt_termid_t\t\t*termid$cntTermidDef;\n"; #djdj
+
+ $cntTermidDef++;
+
+ my ($nativeParameter, $jniParameter) = @{$java_jni{$type}};
+ $nativeParameterList .= ",\n\t $nativeParameter\t$id";
+ $jniParameterList .= ",\n $jniParameter\t$id";
+ $specParameterList .= ", $jniParameter";
+ $needCleanupTarget = 1;
+ } else { # all others are primitive types
+ $jniStorageList .= "\n\t$p_event = $id;\n";
+ my ($nativeParameter, $jniParameter) = @{$java_jni{$type}};
+ $nativeParameter = "$nativeParameter\t"
+ if length $nativeParameter < 4; # why?
+ $nativeParameterList .= ",\n\t $nativeParameter\t$id";
+ $jniParameterList .= ",\n $jniParameter\t$id";
+ $specParameterList .= ", $jniParameter";
+ }
+ }
+ if ($needLocaleDefined) {
+ $jniDefine .= <<EOF
+ char *locale;
+EOF
+ }
+ my $genericOverride = '';
+ my $idParameter = $eventId;
+ $idParameter =~ s/AUE_/ADT_/;
+ if ($eventType eq 'generic') {
+ $genericOverride = ', jint eventId';
+ $idParameter = 'eventId';
+ }
+ $jniFreeList = "\tcleanup:\n" . $jniFreeList if $needCleanupTarget;
+
+ print Cfile qq{/* ARGSUSED */
+JNIEXPORT void JNICALL
+$jniPutEvent(
+ JNIEnv *env,
+ jobject self,
+ jbyteArray jsession$genericOverride,
+ jint status,
+ jint ret_val$jniParameterList)
+{
+ $jniDefine
+ (void) j2c_pointer(env, jsession, (char **)&session);
+
+ event = $jniADTalloc(session, $idParameter);
+
+$jniStorageList
+ (void) adt_put_event((adt_event_data_t *)event, status, ret_val);
+
+$jniFreeList
+ adt_free_event((adt_event_data_t *)event);
+}
+};
+ print MapFile qq{
+ $jniPutEvent; };
+ my $overrideParameter = '';
+ if ($eventType eq 'generic') {
+ $overrideParameter = 'int eventId,';
+ my @allowed = @$allowedIds;
+ if (@allowed) {
+ my $i;
+ if ($validSfile) {
+ print Sfile "\t// Allowed values for eventId in putEvent:\n";
+ for ($i = 0; $i <= $#allowed; $i++) {
+ my $idNo = $externalIdNo{$allowed[$i]};
+ $allowed[$i] =~ s/AUE_/ADT_/;
+ print Sfile "\tstatic final int $allowed[$i] = ",
+ "$idNo;\n";
+ }
+ print Sfile "\n";
+ }
+ } else {
+ print STDERR "Generic event with no allowed instances: $eventId\n";
+ }
+ }
+ if ($validSfile) {
+ print Sfile <<EOF;
+ private native void $javaPutEvent(byte[]session, $overrideParameter
+ int status, int ret_val$nativeParameterList);
+
+ public AuditEvent_$root(AuditSession session)
+ throws Exception
+ {
+ super(session);
+ }
+
+EOF
+ my $javaParameterList = '';
+ foreach $ref2 (@entries) {
+ my ($id, $type, $format, $jComment, $required) = @$ref2;
+
+ # generate java native method prototypes
+ # and the corresponding C method implementation
+
+ my $javaMethodName = "$id";
+ my $javaStorageName = $javaMethodName . '_val';
+ my $jniMethodName = $root . $id;
+ my $storage;
+ my $enumUsage = '';
+ my $jParam = @{$java_jni{$type}}[0];
+ my $comment = '';
+ if ($required) {
+ if ($format ne 'NULL') {
+ $comment = "\t// (required) formatted: $format";
+ } else {
+ $comment = "\t// required";
+ }
+ } else {
+ if ($format ne 'NULL') {
+ $comment = "\t// (optional) formatted: $format";
+ } else {
+ $comment = "\t// optional";
+ }
+ }
+ if (($type eq 'ADT_UINT32STAR') ||
+ ($type eq 'ADT_UIDSTAR') ||
+ ($type eq 'ADT_GIDSTAR')) { # int array
+ $storage = "int[] $javaStorageName" . ($required ?
+ ' = {}' : '');
+ $javaParameterList .= ",\n\t\t\t $javaStorageName";
+ } elsif ($type eq 'ADT_UINT64STAR') { # long array
+ $storage = "long[] $javaStorageName" . ($required ?
+ ' = {}' : '');
+ $javaParameterList .= ",\n\t\t\t $javaStorageName";
+ } elsif (($type eq 'ADT_CHARSTAR') ||
+ ($type eq 'ADT_CHAR')) { # string
+ $storage = "String $javaStorageName" . ($required ?
+ ' = ""' : '');
+ $javaParameterList .= ",\n\t\t\t $javaStorageName";
+ } elsif ($type eq 'ADT_CHAR2STAR') { # array of string
+ $storage = "String[] $javaStorageName" . ($required ?
+ ' = {}' : '');
+ $javaParameterList .= ",\n\t\t\t $javaStorageName";
+ } elsif ($type eq 'ADT_TERMIDSTAR') { # array of string
+ $storage = "String $javaStorageName" . ($required ?
+ ' = ""' : '');
+ $javaParameterList .= ",\n\t\t\t $javaStorageName";
+ } else { # all others are primitive types
+ $storage = "$jParam $javaStorageName = 0";
+ $javaParameterList .= ",\n\t\t\t $javaStorageName";
+ $enumUsage = "\n\t// See $jComment in AuditEvent.java for valid values"
+ if $jComment;
+ }
+ print Sfile <<EOF;
+$enumUsage
+ private $storage;$comment
+ public void $javaMethodName($jParam setTo)
+ {
+ $javaStorageName = setTo;
+ }
+EOF
+ } # end foreach (@entries)
+ if ($eventType eq 'generic') {
+ print Sfile <<EOF;
+
+ public void putEvent(int status, int ret_val, int eventId)
+ {
+ byte[] session = super.sh.getSession();
+
+ if ((super.sh.AuditIsOn) && (super.sh.ValidSession))
+ $javaPutEvent(session, eventId,
+ status, ret_val$javaParameterList);
+ }
+}
+EOF
+ } else {
+ print Sfile <<EOF;
+
+ public void putEvent(int status, int ret_val)
+ {
+ byte[] session = super.sh.getSession();
+
+ if ((super.sh.AuditIsOn) && (super.sh.ValidSession))
+ $javaPutEvent(session, status, ret_val$javaParameterList);
+ }
+}
+EOF
+ }
+ close Sfile;
+ } # end if ($validSfile);
+ }
+
+ # write trailers
+ print Jfile <<EOF;
+
+}
+EOF
+ print MapFile <<EOF;
+
+ local:
+ *;
+};
+EOF
+ close Cfile;
+ close Jfile;
+ close MapFile;
+}
+
+sub generateTableC {
+ my $event = shift;
+ my $eventId = shift;
+ my $eventType = shift;
+ my $eventHeader = shift;
+ my $omit = shift;
+
+ my %tokenType = (
+ 'acl' => 'AUT_ACL',
+ 'arbitrary' => 'AUT_ARBITRARY',
+ 'arg' => 'AUT_ARG',
+ 'attr' => 'AUT_ATTR',
+ 'command' => 'AUT_CMD',
+ 'command_1' => 'ADT_CMD_ALT', # dummy token id
+ 'date' => 'AUT_TEXT',
+ 'exec_args' => 'AUT_EXEC_ARGS',
+ 'exec_env' => 'AUT_EXEC_ENV',
+ 'exit' => 'AUT_EXIT',
+ 'file' => 'AUT_FILE',
+ 'fmri' => 'AUT_FMRI',
+ 'groups' => 'AUT_GROUPS',
+ # 'header' => 'AUT_HEADER', # not used
+ 'in_addr' => 'AUT_IN_ADDR',
+ 'tid' => 'AUT_TID',
+ 'ipc' => 'AUT_IPC',
+ 'ipc_perm' => 'AUT_IPC_PERM',
+ 'iport' => 'AUT_IPORT',
+ 'label' => 'AUT_LABEL',
+ 'newgroups' => 'AUT_NEWGROUPS',
+ 'opaque' => 'AUT_OPAQUE',
+ 'path' => 'AUT_PATH',
+ 'path_list' => '-AUT_PATH', # dummy token id
+ 'process' => 'AUT_PROCESS',
+ 'priv_effective' => 'ADT_AUT_PRIV_E', # dummy token id
+ 'priv_limit' => 'ADT_AUT_PRIV_L', # dummy token id
+ 'priv_inherit' => 'ADT_AUT_PRIV_I', # dummy token id
+ 'return' => 'AUT_RETURN',
+ 'seq' => 'AUT_SEQ',
+ 'socket' => 'AUT_SOCKET',
+ 'socket-inet' => 'AUT_SOCKET_INET',
+ 'subject' => 'AUT_SUBJECT',
+ 'text' => 'AUT_TEXT',
+ # 'trailer' => 'AUT_TRAILER', # not used
+ 'uauth' => 'AUT_UAUTH',
+ 'zonename' => 'AUT_ZONENAME'
+ );
+
+ my @xlateEntryList = ();
+ my @jniEntryList = ();
+
+ my $external = $event->getExternal();
+ my $internal = $event->getInternal();
+
+ unless ($external) {
+ print STDERR "No external object captured for event $eventId\n";
+ return;
+ }
+ unless ($internal) {
+ print STDERR "No internal object captured for event $eventId\n";
+ return;
+ }
+ my @entryRef = $internal->getEntries();
+ my $entryRef;
+ my @tokenOrder = ();
+ my $firstTokenIndex = 0; # djdj not used yet, djdj BUG!
+ # needs to be used by translate table
+
+ if ($internal->isReorder()) { # prescan the entry list to get the token order
+ my @inputOrder;
+ foreach $entryRef (@entryRef) {
+ my ($intEntry, $entry) = @$entryRef;
+ push (@inputOrder, $intEntry->getAttr('order'));
+ }
+
+ my $i; # walk down the inputOrder list once
+ my $k = 1; # discover next in line
+ my $l = 0; # who should point to next in line
+ for ($i = 0; $i <= $#inputOrder; $i++) {
+ my $j;
+ for ($j = 0; $j <= $#inputOrder; $j++) {
+ if ($k == $inputOrder[$j]) {
+ if ($k == 1) {
+ $firstTokenIndex = $j;
+ } else {
+ $tokenOrder[$l] = "&(selfReference[$j])";
+ }
+ $l = $j;
+ last;
+ }
+ }
+ $k++;
+ }
+ $tokenOrder[$l] = 'NULL';
+ }
+ else { # default order -- input order same as output
+ my $i;
+ my $j;
+ for ($i = 0; $i < $#entryRef; $i++) {
+ my $j = $i + 1;
+ $tokenOrder[$i] = "&(selfReference[$j])";
+ }
+ $tokenOrder[$#entryRef] = 'NULL';
+ }
+
+ my $sequence = 0;
+ foreach $entryRef (@entryRef) {
+ my ($intEntry, $entry) = @$entryRef;
+ my $entryId = $entry->getAttr('id');
+
+ my ($extEntry, $unusedEntry, $tokenId) =
+ $external->getEntry($entryId);
+ my $opt = $extEntry->getAttr('opt');
+
+ if ($opt eq 'none') {
+ if (defined ($doc->getToken($tokenId))) {
+ if (defined ($tokenType{$tokenId})) {
+ $tokenId = $tokenType{$tokenId};
+ }
+ else {
+ print STDERR "token id $tokenId not implemented\n";
+ }
+ }
+ else {
+ print STDERR "token = $tokenId is undefined\n";
+ $tokenId = 'error';
+ }
+ my ($xlate, $jni) =
+ formatTableEntry ('', $tokenId, $eventId, '', 0, 0, $tokenOrder[$sequence],
+ 'NULL', '');
+ push (@xlateEntryList, $xlate);
+ push (@jniEntryList, @$jni);
+ }
+ else {
+ my $dataType = $extEntry->getAttr('type');
+ $dataType =~ s/\s+//g; # remove blanks (char * => char*)
+
+ my $enumGroup = '';
+ if ($dataType =~ /^msg/i) {
+ $enumGroup = $dataType;
+ $enumGroup =~ s/^msg\s*//i;
+ $enumGroup = 'adt_' . $enumGroup;
+ }
+ my $required = ($opt eq 'required') ? 1 : 0;
+ my $tsol = 0;
+ my $tokenId = $intEntry->getAttr('token');
+ my $token;
+ my $tokenName;
+ my $tokenFormat = $intEntry->getAttr('format');
+ if (defined ($tokenFormat)) {
+ $tokenFormat = "\"$tokenFormat\"";
+ }
+ else {
+ $tokenFormat = 'NULL';
+ }
+
+ if (defined ($token = $doc->getToken($tokenId))) {
+ $tsol = (lc $token->getUsage() eq 'tsol') ? 1 : 0;
+ if (defined ($tokenType{$tokenId})) {
+ $tokenName = $tokenType{$tokenId};
+ }
+ else {
+ print STDERR "token id $tokenId not implemented\n";
+ }
+ }
+ else {
+ print STDERR
+ "$tokenId is an unimplemented token ($entryId in $eventId)\n";
+ $tokenName = 'AUT_TEXT';
+ }
+ my ($xlate, $jni) =
+ formatTableEntry($entryId, $tokenName, $eventId, $dataType, $required,
+ $tsol, $tokenOrder[$sequence], $tokenFormat,
+ $enumGroup, (uc $omit eq 'JNI'));
+ push (@xlateEntryList, $xlate);
+ push (@jniEntryList, @$jni);
+ }
+ $sequence++;
+ }
+ $jniEventTable{$eventId} = [\@jniEntryList, $eventType,
+ $external->getAllowedTypes(), $eventHeader]
+ unless (uc $omit eq 'JNI') || ($omit eq 'always');
+}
+
+sub formatTableEntry {
+ my ($id, $token, $eventId, $type, $required, $tsol, $sequence, $format, $enumGroup,
+ $omitJNI) = @_;
+
+
+ # does this map belong in the xml source? (at least the defaults?)
+ # fill in the default value only if it is other than zero.
+ # base type adt name, default value
+ my %entryDef = ( 'au_asid_t' => ['ADT_UINT32', ''],
+ 'uint_t' => ['ADT_UINT32', ''],
+ 'int' => ['ADT_INT', ''],
+ 'int32_t' => ['ADT_INT32', ''],
+ 'uid_t' => ['ADT_UID', 'AU_NOAUDITID'],
+ 'gid_t' => ['ADT_GID', 'AU_NOAUDITID'],
+ 'uid_t*' => ['ADT_UIDSTAR', ''],
+ 'gid_t*' => ['ADT_GIDSTAR', ''],
+ 'char' => ['ADT_CHAR', ''],
+ 'char*' => ['ADT_CHARSTAR', ''],
+ 'char**' => ['ADT_CHAR2STAR', ''],
+ 'long' => ['ADT_LONG', ''],
+ 'pid_t' => ['ADT_PID', ''],
+ 'priv_set_t*' => ['ADT_PRIVSTAR', ''],
+ 'ulong_t' => ['ADT_ULONG', ''],
+ 'uint16_t', => ['ADT_UINT16', ''],
+ 'uint32_t' => ['ADT_UINT32', ''],
+ 'uint32_t*' => ['ADT_UINT32STAR', ''],
+ 'uint32_t[]' => ['ADT_UINT32ARRAY', ''],
+ 'uint64_t' => ['ADT_UINT64', ''],
+ 'uint64_t*' => ['ADT_UINT64STAR', ''],
+ 'm_label_t*' => ['ADT_MLABELSTAR', ''],
+ );
+ my $xlateLabel = $uniLabel.$xlateUniLabelInc;
+ my $xlateLabelInc = 0;
+ my $xlateLine = '';
+ my @jniLine = ();
+
+ # the list handling should be a simple loop with a loop of one
+ # falling out naturally.
+
+ unless ($type =~ /,/) { # if list, then generate sequence of entries
+ my $dataType;
+ my $dataSize;
+ my $xlateLabelRef = '';
+
+ my $arraySize = '';
+ $arraySize = $1 if ($type =~ s/\[(\d+)\]/[]/);
+
+ my $entryType = ${$entryDef{$type}}[0];
+
+ my @xlateType = (); # for adt_xlate.c
+ my $typeCount = 1;
+
+ if ($entryType) {
+ $dataType = $entryType;
+ $type =~ s/([^*]+)\s*(\*+)/$1 $2/;
+ $type =~ s/\[\]//;
+ $dataSize = "sizeof ($type)";
+ if ($arraySize) {
+ $dataSize = "$arraySize * " . $dataSize;
+ }
+ $xlateLine = "{{$dataType, $dataSize}}";
+ push (@jniLine, [$id, $dataType, $format, $enumGroup, $required]);
+ } elsif ($type eq '') {
+ $xlateLabelRef = 'NULL';
+ } elsif ($type =~ /^msg/i) {
+ $type =~ s/^msg//i;
+ $dataType = 'ADT_MSG';
+ my $dataEnum = 'ADT_LIST_' . uc $type;
+ $xlateLine = "{{$dataType, $dataEnum}}";
+ push (@jniLine, [$id, $dataType, $format, $enumGroup, $required]);
+ } elsif ($type =~ /time_t/i) {
+ $dataType = 'ADT_DATE';
+ $dataSize = "sizeof (time_t)";
+ $xlateLine = "{{$dataType, $dataSize}}";
+ push (@jniLine, [$id, $dataType, $format, $enumGroup, $required]);
+ } elsif ($type =~ /termid/i) {
+ $dataType = 'ADT_TERMIDSTAR';
+ $dataSize = "sizeof (au_tid_addr_t *)";
+ $xlateLine = "{{$dataType, $dataSize}}";
+ push (@jniLine, [$id, $dataType, $format, $enumGroup, $required]);
+ } elsif ($omitJNI) {
+ $xlateLabelRef = 'NULL';
+ } else {
+ print STDERR "$type is not an implemented data type\n";
+ $xlateLabelRef = 'NULL';
+ }
+ $xlateLabelRef = '&' . $xlateLabel . '[0]'
+ unless $xlateLabelRef eq 'NULL';
+
+ # "EOL" is where a comma should go unless end of list
+ $xlateLine = "{$token,\t1,\t$xlateLabelRef,\t$sequence,\n" .
+ "\t\t0,\t$required,\t$tsol,\t$format}EOL";
+
+ } else { # is a list
+ my @type = split(/,/, $type);
+ my @arraySize = ();
+ my @id = split(/,/, $id);
+ my @jniId = @id;
+ my $dataType;
+ my $typeCount = ($#type + 1);
+ my @xlateType = ();
+ my @default = ();
+
+ foreach my $dtype (@type) {
+ my $jniId = shift @jniId;
+ my $id = shift @id;
+ my $arraySize = '';
+ $arraySize = $1 if ($dtype =~ s/\[(\d+)\]/[]/);
+
+ my $entryType = ${$entryDef{$dtype}}[0];
+ if ($entryType) {
+ my $type = $dtype;
+ $type =~ s/([^*]+)\s*(\*+)/$1 $2/;
+ $type =~ s/\[\]//;
+
+ my $sizeString = "sizeof";
+ $sizeString = "$arraySize * " . $sizeString if $arraySize;
+ push (@xlateType, "\{$entryType, $sizeString ($type)\}");
+ push (@jniLine, [$jniId, $entryType, $format, $enumGroup, $required]);
+ } elsif ($type =~ /^msg/i) {
+ $type =~ s/^msg//i;
+ $dataType = 'ADT_MSG';
+ my $dataEnum = 'ADT_LIST_' . uc $type;
+ push (@xlateType, "\{$dataType, $dataEnum\}};");
+ push (@jniLine, [$jniId, $dataType, $format, $enumGroup, $required]);
+ } elsif ($type =~ /time_t/i) {
+ $dataType = 'ADT_DATE';
+ push (@xlateType, "\{$entryType, sizeof ($type)\}");
+ push (@jniLine, [$jniId, $entryType, $format, $enumGroup, $required]);
+ } elsif ($type =~ /termid/i) {
+ $dataType = 'ADT_TERMIDSTAR';
+ push (@xlateType, "\{$dataType, sizeof (au_tid_addr_t *)\}");
+ push (@jniLine, [$jniId, $dataType, $format, $enumGroup, $required]);
+ } elsif ($omitJNI) {
+ # nothing to do.
+ } else {
+ print STDERR "$dtype is not an implemented data type\n";
+ }
+ if (${$entryDef{$dtype}}[1]) {
+ push (@default, $id, ${$entryDef{$dtype}}[1]);
+ }
+ }
+ my $xlateArray = "\[$typeCount\] =\t{" . join(",\n\t\t\t\t", @xlateType) . "};";
+
+ $xlateLine =
+ "{$token,\t$typeCount,\t&$xlateLabel\[0\],\t$sequence,\n" .
+ "\t\t0,\t$required,\t$tsol,\t$format}EOL";
+ }
+ $xlateUniLabelInc++ if $xlateLabelInc;
+ return ($xlateLine, \@jniLine);
+}
+
+sub generateMsgLists {
+ my $textList = shift;
+
+ my $textName = $textList->getId();
+ my $header = $textList->getHeader();
+ my $start = $textList->getMsgStart();
+ my $public = $textList->getMsgPublic();
+ my $deprecated = $textList->getDeprecated();
+
+ print "$textName starts at $start\n" if $debug;
+
+ my $entry;
+ my @entry;
+ while ($entry = $textList->getNextMsg()) {
+ if ($debug) {
+ my ($id, $text) = split(/\s*::\s*/, $entry);
+ print " $id = $text\n";
+ }
+ unshift (@entry, $entry);
+ }
+ $msg_list{$textName} =
+ [\@entry, [$header, $start, $public, $deprecated]];
+}
+sub readAuditEventFile {
+ my $eventListFile = shift;
+
+ open(Event, $eventListFile)
+ or die "can't open $eventListFile: $!\n";
+ while(<Event>) {
+ next if /^\s*#/;
+ next if /^\s*$/;
+ my ($value, $name) = split(/\s*:\s*/);
+ next if $value < 6000;
+ $eventCode{$name} = $value;
+ }
+ close Event;
+}
+
diff --git a/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent.java b/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent.java
deleted file mode 100644
index 468a40b0b8..0000000000
--- a/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent.java
+++ /dev/null
@@ -1,125 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2004 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- *
- * ident "%Z%%M% %I% %E% SMI"
- *
- * Automatically generated code; do not edit
- */
-package com.sun.audit;
-
-public class AuditEvent {
- protected AuditSession sh; // associated session object
-
- public AuditEvent(AuditSession auSession)
- throws Error
- {
-
- sh = auSession;
- }
-
- // See the subclasses of AuditEvent for mapping message codes
- // to events
-
- // adt_fail_pam
-
- public static final int ADT_FAIL_PAM = 2000;
-
- // adt_fail_value
-
- public static final int ADT_FAIL_VALUE = 1000;
- // Attribute update
- public static final int ADT_FAIL_VALUE_PW_ATTR = 1000;
- // Password update
- public static final int ADT_FAIL_VALUE_PW = 1001;
- // bad username
- public static final int ADT_FAIL_VALUE_USERNAME = 1002;
- // bad auth.
- public static final int ADT_FAIL_VALUE_AUTH = 1003;
- // bad uid
- public static final int ADT_FAIL_VALUE_UID = 1004;
- // unknown failure
- public static final int ADT_FAIL_VALUE_UNKNOWN = 1005;
- // password expired
- public static final int ADT_FAIL_VALUE_EXPIRED = 1006;
- // Account is locked
- public static final int ADT_FAIL_VALUE_ACCOUNT_LOCKED = 1007;
- // Bad dial up
- public static final int ADT_FAIL_VALUE_BAD_DIALUP = 1008;
- // Invalid ID
- public static final int ADT_FAIL_VALUE_BAD_ID = 1009;
- // Invalid password
- public static final int ADT_FAIL_VALUE_BAD_PW = 1010;
- // Not on console
- public static final int ADT_FAIL_VALUE_CONSOLE = 1011;
- // Too many failed attempts
- public static final int ADT_FAIL_VALUE_MAX_TRIES = 1012;
- // Protocol failure
- public static final int ADT_FAIL_VALUE_PROTOCOL_FAILURE = 1013;
- // Excluded user
- public static final int ADT_FAIL_VALUE_EXCLUDED_USER = 1014;
- // No anonymous
- public static final int ADT_FAIL_VALUE_ANON_USER = 1015;
- // Invalid command
- public static final int ADT_FAIL_VALUE_BAD_CMD = 1016;
- // Standard input not a tty line
- public static final int ADT_FAIL_VALUE_BAD_TTY = 1017;
- // Program failure
- public static final int ADT_FAIL_VALUE_PROGRAM = 1018;
- // chdir to home directory
- public static final int ADT_FAIL_VALUE_CHDIR_FAILED = 1019;
- // Input line too long.
- public static final int ADT_FAIL_VALUE_INPUT_OVERFLOW = 1020;
- // login device override
- public static final int ADT_FAIL_VALUE_DEVICE_PERM = 1021;
- // authorization bypass
- public static final int ADT_FAIL_VALUE_AUTH_BYPASS = 1022;
- // login disabled
- public static final int ADT_FAIL_VALUE_LOGIN_DISABLED = 1023;
-
- // adt_login_text
-
- // Deprecated message list
- //
- public static final int ADT_LOGIN_NO_MSG = 0;
- // Account is locked
- public static final int ADT_LOGIN_ACCOUNT_LOCKED = 1;
- // Bad dial up
- public static final int ADT_LOGIN_BAD_DIALUP = 2;
- // Invalid ID
- public static final int ADT_LOGIN_BAD_ID = 3;
- // Invalid password
- public static final int ADT_LOGIN_BAD_PW = 4;
- // Not on console
- public static final int ADT_LOGIN_CONSOLE = 5;
- // Too many failed attempts
- public static final int ADT_LOGIN_MAX_TRIES = 6;
- // Protocol failure
- public static final int ADT_LOGIN_PROTOCOL_FAILURE = 7;
- // Excluded user
- public static final int ADT_LOGIN_EXCLUDED_USER = 8;
- // No anonymous
- public static final int ADT_LOGIN_ANON_USER = 9;
-
-}
diff --git a/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_admin_authenticate.java b/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_admin_authenticate.java
deleted file mode 100644
index 5919426647..0000000000
--- a/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_admin_authenticate.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (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
- * or http://www.opensolaris.org/os/licensing.
- * 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 (c) 2001-2002 by Sun Microsystems, Inc.
- * All rights reserved.
- *
- * ident "%Z%%M% %I% %E% SMI"
- */
-package com.sun.audit;
-
-// audit event: AUE_admin_authenticate = 6213
-
-public class AuditEvent_admin_authenticate extends AuditEvent {
-
- private native void putEvent(byte[]session,
- int status, int ret_val,
- int message);
-
- public AuditEvent_admin_authenticate(AuditSession session)
- throws Exception {
- super(session);
- }
-
-
- // See adt_login_text in AuditEvent.java for valid values
- private int message_val = 0; // optional
- public void message(int setTo) {
- message_val = setTo;
- }
-
- public void putEvent(int status, int ret_val) {
- byte[] session = super.sh.getSession();
-
- if ((super.sh.AuditIsOn) && (super.sh.ValidSession))
- putEvent(session, status, ret_val,
- message_val);
- }
-}
diff --git a/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_filesystem_add.java b/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_filesystem_add.java
deleted file mode 100644
index af260e0d16..0000000000
--- a/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_filesystem_add.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (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
- * or http://www.opensolaris.org/os/licensing.
- * 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 (c) 2001-2002 by Sun Microsystems, Inc.
- * All rights reserved.
- *
- * ident "%Z%%M% %I% %E% SMI"
- */
-package com.sun.audit;
-
-// audit event: AUE_filesystem_add = 6181
-
-public class AuditEvent_filesystem_add extends AuditEvent {
-
- private native void putEvent(byte[]session,
- int status, int ret_val,
- String object_name,
- String domain,
- String name_service,
- String auth_used,
- String initial_values);
-
- public AuditEvent_filesystem_add(AuditSession session)
- throws Exception {
- super(session);
- }
-
-
- private String object_name_val = ""; // required
- public void object_name(String setTo) {
- object_name_val = setTo;
- }
-
- private String domain_val; // optional
- public void domain(String setTo) {
- domain_val = setTo;
- }
-
- private String name_service_val = ""; // required
- public void name_service(String setTo) {
- name_service_val = setTo;
- }
-
- private String auth_used_val; // optional
- public void auth_used(String setTo) {
- auth_used_val = setTo;
- }
-
- private String initial_values_val = ""; // required
- public void initial_values(String setTo) {
- initial_values_val = setTo;
- }
-
- public void putEvent(int status, int ret_val) {
- byte[] session = super.sh.getSession();
-
- if ((super.sh.AuditIsOn) && (super.sh.ValidSession))
- putEvent(session, status, ret_val,
- object_name_val,
- domain_val,
- name_service_val,
- auth_used_val,
- initial_values_val);
- }
-}
diff --git a/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_filesystem_delete.java b/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_filesystem_delete.java
deleted file mode 100644
index 41ca5cdca7..0000000000
--- a/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_filesystem_delete.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (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
- * or http://www.opensolaris.org/os/licensing.
- * 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 (c) 2001-2002 by Sun Microsystems, Inc.
- * All rights reserved.
- *
- * ident "%Z%%M% %I% %E% SMI"
- */
-package com.sun.audit;
-
-// audit event: AUE_filesystem_delete = 6182
-
-public class AuditEvent_filesystem_delete extends AuditEvent {
-
- private native void putEvent(byte[]session,
- int status, int ret_val,
- String object_name,
- String domain,
- String name_service,
- String auth_used,
- String delete_values);
-
- public AuditEvent_filesystem_delete(AuditSession session)
- throws Exception {
- super(session);
- }
-
-
- private String object_name_val = ""; // required
- public void object_name(String setTo) {
- object_name_val = setTo;
- }
-
- private String domain_val; // optional
- public void domain(String setTo) {
- domain_val = setTo;
- }
-
- private String name_service_val = ""; // required
- public void name_service(String setTo) {
- name_service_val = setTo;
- }
-
- private String auth_used_val; // optional
- public void auth_used(String setTo) {
- auth_used_val = setTo;
- }
-
- private String delete_values_val = ""; // required
- public void delete_values(String setTo) {
- delete_values_val = setTo;
- }
-
- public void putEvent(int status, int ret_val) {
- byte[] session = super.sh.getSession();
-
- if ((super.sh.AuditIsOn) && (super.sh.ValidSession))
- putEvent(session, status, ret_val,
- object_name_val,
- domain_val,
- name_service_val,
- auth_used_val,
- delete_values_val);
- }
-}
diff --git a/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_filesystem_modify.java b/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_filesystem_modify.java
deleted file mode 100644
index 9a1d10da75..0000000000
--- a/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_filesystem_modify.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (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
- * or http://www.opensolaris.org/os/licensing.
- * 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 (c) 2001-2002 by Sun Microsystems, Inc.
- * All rights reserved.
- *
- * ident "%Z%%M% %I% %E% SMI"
- */
-package com.sun.audit;
-
-// audit event: AUE_filesystem_modify = 6183
-
-public class AuditEvent_filesystem_modify extends AuditEvent {
-
- private native void putEvent(byte[]session,
- int status, int ret_val,
- String object_name,
- String domain,
- String name_service,
- String auth_used,
- String changed_values);
-
- public AuditEvent_filesystem_modify(AuditSession session)
- throws Exception {
- super(session);
- }
-
-
- private String object_name_val = ""; // required
- public void object_name(String setTo) {
- object_name_val = setTo;
- }
-
- private String domain_val; // optional
- public void domain(String setTo) {
- domain_val = setTo;
- }
-
- private String name_service_val = ""; // required
- public void name_service(String setTo) {
- name_service_val = setTo;
- }
-
- private String auth_used_val; // optional
- public void auth_used(String setTo) {
- auth_used_val = setTo;
- }
-
- private String changed_values_val = ""; // required
- public void changed_values(String setTo) {
- changed_values_val = setTo;
- }
-
- public void putEvent(int status, int ret_val) {
- byte[] session = super.sh.getSession();
-
- if ((super.sh.AuditIsOn) && (super.sh.ValidSession))
- putEvent(session, status, ret_val,
- object_name_val,
- domain_val,
- name_service_val,
- auth_used_val,
- changed_values_val);
- }
-}
diff --git a/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_login.java b/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_login.java
deleted file mode 100644
index f82b9de743..0000000000
--- a/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_login.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2001-2003 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- *
- * ident "%Z%%M% %I% %E% SMI"
- */
-package com.sun.audit;
-
-// audit event: AUE_login = 6152
-
-public class AuditEvent_login extends AuditEvent {
-
- private native void putEvent(byte[]session,
- int status, int ret_val,
- int message);
-
- public AuditEvent_login(AuditSession session)
- throws Exception
- {
- super(session);
- }
-
-
- // See adt_login_text in AuditEvent.java for valid values
- private int message_val = 0; // optional
- public void message(int setTo)
- {
- message_val = setTo;
- }
-
- public void putEvent(int status, int ret_val)
- {
- byte[] session = super.sh.getSession();
-
- if ((super.sh.AuditIsOn) && (super.sh.ValidSession))
- putEvent(session, status, ret_val,
- message_val);
- }
-}
diff --git a/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_logout.java b/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_logout.java
deleted file mode 100644
index bac06773e3..0000000000
--- a/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_logout.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (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
- * or http://www.opensolaris.org/os/licensing.
- * 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 (c) 2001-2002 by Sun Microsystems, Inc.
- * All rights reserved.
- *
- * ident "%Z%%M% %I% %E% SMI"
- */
-package com.sun.audit;
-
-// audit event: AUE_logout = 6153
-
-public class AuditEvent_logout extends AuditEvent {
-
- private native void putEvent(byte[]session,
- int status, int ret_val,
- String user_name);
-
- public AuditEvent_logout(AuditSession session)
- throws Exception {
- super(session);
- }
-
-
- private String user_name_val; // (optional) formatted: "logout %s"
- public void user_name(String setTo) {
- user_name_val = setTo;
- }
-
- public void putEvent(int status, int ret_val) {
- byte[] session = super.sh.getSession();
-
- if ((super.sh.AuditIsOn) && (super.sh.ValidSession))
- putEvent(session, status, ret_val,
- user_name_val);
- }
-}
diff --git a/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_network_add.java b/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_network_add.java
deleted file mode 100644
index e411b5aef2..0000000000
--- a/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_network_add.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (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
- * or http://www.opensolaris.org/os/licensing.
- * 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 (c) 2001-2002 by Sun Microsystems, Inc.
- * All rights reserved.
- *
- * ident "%Z%%M% %I% %E% SMI"
- */
-package com.sun.audit;
-
-// audit event: AUE_network_add = 6184
-
-public class AuditEvent_network_add extends AuditEvent {
-
- private native void putEvent(byte[]session,
- int status, int ret_val,
- String object_name,
- String domain,
- String name_service,
- String auth_used,
- String initial_values);
-
- public AuditEvent_network_add(AuditSession session)
- throws Exception {
- super(session);
- }
-
-
- private String object_name_val = ""; // required
- public void object_name(String setTo) {
- object_name_val = setTo;
- }
-
- private String domain_val; // optional
- public void domain(String setTo) {
- domain_val = setTo;
- }
-
- private String name_service_val = ""; // required
- public void name_service(String setTo) {
- name_service_val = setTo;
- }
-
- private String auth_used_val; // optional
- public void auth_used(String setTo) {
- auth_used_val = setTo;
- }
-
- private String initial_values_val = ""; // required
- public void initial_values(String setTo) {
- initial_values_val = setTo;
- }
-
- public void putEvent(int status, int ret_val) {
- byte[] session = super.sh.getSession();
-
- if ((super.sh.AuditIsOn) && (super.sh.ValidSession))
- putEvent(session, status, ret_val,
- object_name_val,
- domain_val,
- name_service_val,
- auth_used_val,
- initial_values_val);
- }
-}
diff --git a/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_network_delete.java b/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_network_delete.java
deleted file mode 100644
index b43454da9b..0000000000
--- a/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_network_delete.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (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
- * or http://www.opensolaris.org/os/licensing.
- * 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 (c) 2001-2002 by Sun Microsystems, Inc.
- * All rights reserved.
- *
- * ident "%Z%%M% %I% %E% SMI"
- */
-package com.sun.audit;
-
-// audit event: AUE_network_delete = 6185
-
-public class AuditEvent_network_delete extends AuditEvent {
-
- private native void putEvent(byte[]session,
- int status, int ret_val,
- String object_name,
- String domain,
- String name_service,
- String auth_used,
- String delete_values);
-
- public AuditEvent_network_delete(AuditSession session)
- throws Exception {
- super(session);
- }
-
-
- private String object_name_val = ""; // required
- public void object_name(String setTo) {
- object_name_val = setTo;
- }
-
- private String domain_val; // optional
- public void domain(String setTo) {
- domain_val = setTo;
- }
-
- private String name_service_val = ""; // required
- public void name_service(String setTo) {
- name_service_val = setTo;
- }
-
- private String auth_used_val; // optional
- public void auth_used(String setTo) {
- auth_used_val = setTo;
- }
-
- private String delete_values_val = ""; // required
- public void delete_values(String setTo) {
- delete_values_val = setTo;
- }
-
- public void putEvent(int status, int ret_val) {
- byte[] session = super.sh.getSession();
-
- if ((super.sh.AuditIsOn) && (super.sh.ValidSession))
- putEvent(session, status, ret_val,
- object_name_val,
- domain_val,
- name_service_val,
- auth_used_val,
- delete_values_val);
- }
-}
diff --git a/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_network_modify.java b/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_network_modify.java
deleted file mode 100644
index 68db23483a..0000000000
--- a/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_network_modify.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (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
- * or http://www.opensolaris.org/os/licensing.
- * 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 (c) 2001-2002 by Sun Microsystems, Inc.
- * All rights reserved.
- *
- * ident "%Z%%M% %I% %E% SMI"
- */
-package com.sun.audit;
-
-// audit event: AUE_network_modify = 6186
-
-public class AuditEvent_network_modify extends AuditEvent {
-
- private native void putEvent(byte[]session,
- int status, int ret_val,
- String object_name,
- String domain,
- String name_service,
- String auth_used,
- String changed_values);
-
- public AuditEvent_network_modify(AuditSession session)
- throws Exception {
- super(session);
- }
-
-
- private String object_name_val = ""; // required
- public void object_name(String setTo) {
- object_name_val = setTo;
- }
-
- private String domain_val; // optional
- public void domain(String setTo) {
- domain_val = setTo;
- }
-
- private String name_service_val = ""; // required
- public void name_service(String setTo) {
- name_service_val = setTo;
- }
-
- private String auth_used_val; // optional
- public void auth_used(String setTo) {
- auth_used_val = setTo;
- }
-
- private String changed_values_val = ""; // required
- public void changed_values(String setTo) {
- changed_values_val = setTo;
- }
-
- public void putEvent(int status, int ret_val) {
- byte[] session = super.sh.getSession();
-
- if ((super.sh.AuditIsOn) && (super.sh.ValidSession))
- putEvent(session, status, ret_val,
- object_name_val,
- domain_val,
- name_service_val,
- auth_used_val,
- changed_values_val);
- }
-}
diff --git a/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_passwd.java b/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_passwd.java
deleted file mode 100644
index 3e30afac31..0000000000
--- a/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_passwd.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2001-2003 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- *
- * ident "%Z%%M% %I% %E% SMI"
- */
-package com.sun.audit;
-
-// audit event: AUE_passwd = 6163
-
-public class AuditEvent_passwd extends AuditEvent {
-
- private native void putEvent(byte[]session,
- int status, int ret_val,
- String username);
-
- public AuditEvent_passwd(AuditSession session)
- throws Exception
- {
- super(session);
- }
-
-
- private String username_val; // optional
- public void username(String setTo)
- {
- username_val = setTo;
- }
-
- public void putEvent(int status, int ret_val)
- {
- byte[] session = super.sh.getSession();
-
- if ((super.sh.AuditIsOn) && (super.sh.ValidSession))
- putEvent(session, status, ret_val,
- username_val);
- }
-}
diff --git a/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_printer_add.java b/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_printer_add.java
deleted file mode 100644
index 70a45e2419..0000000000
--- a/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_printer_add.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (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
- * or http://www.opensolaris.org/os/licensing.
- * 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 (c) 2001-2002 by Sun Microsystems, Inc.
- * All rights reserved.
- *
- * ident "%Z%%M% %I% %E% SMI"
- */
-package com.sun.audit;
-
-// audit event: AUE_printer_add = 6187
-
-public class AuditEvent_printer_add extends AuditEvent {
-
- private native void putEvent(byte[]session,
- int status, int ret_val,
- String object_name,
- String domain,
- String name_service,
- String auth_used,
- String initial_values);
-
- public AuditEvent_printer_add(AuditSession session)
- throws Exception {
- super(session);
- }
-
-
- private String object_name_val = ""; // required
- public void object_name(String setTo) {
- object_name_val = setTo;
- }
-
- private String domain_val; // optional
- public void domain(String setTo) {
- domain_val = setTo;
- }
-
- private String name_service_val = ""; // required
- public void name_service(String setTo) {
- name_service_val = setTo;
- }
-
- private String auth_used_val; // optional
- public void auth_used(String setTo) {
- auth_used_val = setTo;
- }
-
- private String initial_values_val = ""; // required
- public void initial_values(String setTo) {
- initial_values_val = setTo;
- }
-
- public void putEvent(int status, int ret_val) {
- byte[] session = super.sh.getSession();
-
- if ((super.sh.AuditIsOn) && (super.sh.ValidSession))
- putEvent(session, status, ret_val,
- object_name_val,
- domain_val,
- name_service_val,
- auth_used_val,
- initial_values_val);
- }
-}
diff --git a/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_printer_delete.java b/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_printer_delete.java
deleted file mode 100644
index 1d54173715..0000000000
--- a/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_printer_delete.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (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
- * or http://www.opensolaris.org/os/licensing.
- * 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 (c) 2001-2002 by Sun Microsystems, Inc.
- * All rights reserved.
- *
- * ident "%Z%%M% %I% %E% SMI"
- */
-package com.sun.audit;
-
-// audit event: AUE_printer_delete = 6188
-
-public class AuditEvent_printer_delete extends AuditEvent {
-
- private native void putEvent(byte[]session,
- int status, int ret_val,
- String object_name,
- String domain,
- String name_service,
- String auth_used,
- String delete_values);
-
- public AuditEvent_printer_delete(AuditSession session)
- throws Exception {
- super(session);
- }
-
-
- private String object_name_val = ""; // required
- public void object_name(String setTo) {
- object_name_val = setTo;
- }
-
- private String domain_val; // optional
- public void domain(String setTo) {
- domain_val = setTo;
- }
-
- private String name_service_val = ""; // required
- public void name_service(String setTo) {
- name_service_val = setTo;
- }
-
- private String auth_used_val; // optional
- public void auth_used(String setTo) {
- auth_used_val = setTo;
- }
-
- private String delete_values_val = ""; // required
- public void delete_values(String setTo) {
- delete_values_val = setTo;
- }
-
- public void putEvent(int status, int ret_val) {
- byte[] session = super.sh.getSession();
-
- if ((super.sh.AuditIsOn) && (super.sh.ValidSession))
- putEvent(session, status, ret_val,
- object_name_val,
- domain_val,
- name_service_val,
- auth_used_val,
- delete_values_val);
- }
-}
diff --git a/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_printer_modify.java b/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_printer_modify.java
deleted file mode 100644
index f2170ac09d..0000000000
--- a/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_printer_modify.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (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
- * or http://www.opensolaris.org/os/licensing.
- * 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 (c) 2001-2002 by Sun Microsystems, Inc.
- * All rights reserved.
- *
- * ident "%Z%%M% %I% %E% SMI"
- */
-package com.sun.audit;
-
-// audit event: AUE_printer_modify = 6189
-
-public class AuditEvent_printer_modify extends AuditEvent {
-
- private native void putEvent(byte[]session,
- int status, int ret_val,
- String object_name,
- String domain,
- String name_service,
- String auth_used,
- String changed_values);
-
- public AuditEvent_printer_modify(AuditSession session)
- throws Exception {
- super(session);
- }
-
-
- private String object_name_val = ""; // required
- public void object_name(String setTo) {
- object_name_val = setTo;
- }
-
- private String domain_val; // optional
- public void domain(String setTo) {
- domain_val = setTo;
- }
-
- private String name_service_val = ""; // required
- public void name_service(String setTo) {
- name_service_val = setTo;
- }
-
- private String auth_used_val; // optional
- public void auth_used(String setTo) {
- auth_used_val = setTo;
- }
-
- private String changed_values_val = ""; // required
- public void changed_values(String setTo) {
- changed_values_val = setTo;
- }
-
- public void putEvent(int status, int ret_val) {
- byte[] session = super.sh.getSession();
-
- if ((super.sh.AuditIsOn) && (super.sh.ValidSession))
- putEvent(session, status, ret_val,
- object_name_val,
- domain_val,
- name_service_val,
- auth_used_val,
- changed_values_val);
- }
-}
diff --git a/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_rlogin.java b/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_rlogin.java
deleted file mode 100644
index 74adbfd575..0000000000
--- a/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_rlogin.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2001-2003 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- *
- * ident "%Z%%M% %I% %E% SMI"
- */
-package com.sun.audit;
-
-// audit event: AUE_rlogin = 6155
-
-public class AuditEvent_rlogin extends AuditEvent {
-
- private native void putEvent(byte[]session,
- int status, int ret_val,
- int message);
-
- public AuditEvent_rlogin(AuditSession session)
- throws Exception
- {
- super(session);
- }
-
-
- // See adt_login_text in AuditEvent.java for valid values
- private int message_val = 0; // optional
- public void message(int setTo)
- {
- message_val = setTo;
- }
-
- public void putEvent(int status, int ret_val)
- {
- byte[] session = super.sh.getSession();
-
- if ((super.sh.AuditIsOn) && (super.sh.ValidSession))
- putEvent(session, status, ret_val,
- message_val);
- }
-}
diff --git a/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_role_login.java b/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_role_login.java
deleted file mode 100644
index db549b4dec..0000000000
--- a/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_role_login.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (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
- * or http://www.opensolaris.org/os/licensing.
- * 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 (c) 2001-2002 by Sun Microsystems, Inc.
- * All rights reserved.
- *
- * ident "%Z%%M% %I% %E% SMI"
- */
-package com.sun.audit;
-
-// audit event: AUE_role_login = 6173
-
-public class AuditEvent_role_login extends AuditEvent {
-
- private native void putEvent(byte[]session,
- int status, int ret_val,
- int message);
-
- public AuditEvent_role_login(AuditSession session)
- throws Exception {
- super(session);
- }
-
-
- // See adt_login_text in AuditEvent.java for valid values
- private int message_val = 0; // optional
- public void message(int setTo) {
- message_val = setTo;
- }
-
- public void putEvent(int status, int ret_val) {
- byte[] session = super.sh.getSession();
-
- if ((super.sh.AuditIsOn) && (super.sh.ValidSession))
- putEvent(session, status, ret_val,
- message_val);
- }
-}
diff --git a/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_scheduledjob_add.java b/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_scheduledjob_add.java
deleted file mode 100644
index 58cd05ecd7..0000000000
--- a/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_scheduledjob_add.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (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
- * or http://www.opensolaris.org/os/licensing.
- * 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 (c) 2001-2002 by Sun Microsystems, Inc.
- * All rights reserved.
- *
- * ident "%Z%%M% %I% %E% SMI"
- */
-package com.sun.audit;
-
-// audit event: AUE_scheduledjob_add = 6190
-
-public class AuditEvent_scheduledjob_add extends AuditEvent {
-
- private native void putEvent(byte[]session,
- int status, int ret_val,
- String object_name,
- String domain,
- String name_service,
- String auth_used,
- String initial_values);
-
- public AuditEvent_scheduledjob_add(AuditSession session)
- throws Exception {
- super(session);
- }
-
-
- private String object_name_val = ""; // required
- public void object_name(String setTo) {
- object_name_val = setTo;
- }
-
- private String domain_val; // optional
- public void domain(String setTo) {
- domain_val = setTo;
- }
-
- private String name_service_val = ""; // required
- public void name_service(String setTo) {
- name_service_val = setTo;
- }
-
- private String auth_used_val; // optional
- public void auth_used(String setTo) {
- auth_used_val = setTo;
- }
-
- private String initial_values_val = ""; // required
- public void initial_values(String setTo) {
- initial_values_val = setTo;
- }
-
- public void putEvent(int status, int ret_val) {
- byte[] session = super.sh.getSession();
-
- if ((super.sh.AuditIsOn) && (super.sh.ValidSession))
- putEvent(session, status, ret_val,
- object_name_val,
- domain_val,
- name_service_val,
- auth_used_val,
- initial_values_val);
- }
-}
diff --git a/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_scheduledjob_delete.java b/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_scheduledjob_delete.java
deleted file mode 100644
index 6e6f001013..0000000000
--- a/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_scheduledjob_delete.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (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
- * or http://www.opensolaris.org/os/licensing.
- * 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 (c) 2001-2002 by Sun Microsystems, Inc.
- * All rights reserved.
- *
- * ident "%Z%%M% %I% %E% SMI"
- */
-package com.sun.audit;
-
-// audit event: AUE_scheduledjob_delete = 6191
-
-public class AuditEvent_scheduledjob_delete extends AuditEvent {
-
- private native void putEvent(byte[]session,
- int status, int ret_val,
- String object_name,
- String domain,
- String name_service,
- String auth_used,
- String delete_values);
-
- public AuditEvent_scheduledjob_delete(AuditSession session)
- throws Exception {
- super(session);
- }
-
-
- private String object_name_val = ""; // required
- public void object_name(String setTo) {
- object_name_val = setTo;
- }
-
- private String domain_val; // optional
- public void domain(String setTo) {
- domain_val = setTo;
- }
-
- private String name_service_val = ""; // required
- public void name_service(String setTo) {
- name_service_val = setTo;
- }
-
- private String auth_used_val; // optional
- public void auth_used(String setTo) {
- auth_used_val = setTo;
- }
-
- private String delete_values_val = ""; // required
- public void delete_values(String setTo) {
- delete_values_val = setTo;
- }
-
- public void putEvent(int status, int ret_val) {
- byte[] session = super.sh.getSession();
-
- if ((super.sh.AuditIsOn) && (super.sh.ValidSession))
- putEvent(session, status, ret_val,
- object_name_val,
- domain_val,
- name_service_val,
- auth_used_val,
- delete_values_val);
- }
-}
diff --git a/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_scheduledjob_modify.java b/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_scheduledjob_modify.java
deleted file mode 100644
index 2fe628ddf0..0000000000
--- a/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_scheduledjob_modify.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (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
- * or http://www.opensolaris.org/os/licensing.
- * 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 (c) 2001-2002 by Sun Microsystems, Inc.
- * All rights reserved.
- *
- * ident "%Z%%M% %I% %E% SMI"
- */
-package com.sun.audit;
-
-// audit event: AUE_scheduledjob_modify = 6192
-
-public class AuditEvent_scheduledjob_modify extends AuditEvent {
-
- private native void putEvent(byte[]session,
- int status, int ret_val,
- String object_name,
- String domain,
- String name_service,
- String auth_used,
- String changed_values);
-
- public AuditEvent_scheduledjob_modify(AuditSession session)
- throws Exception {
- super(session);
- }
-
-
- private String object_name_val = ""; // required
- public void object_name(String setTo) {
- object_name_val = setTo;
- }
-
- private String domain_val; // optional
- public void domain(String setTo) {
- domain_val = setTo;
- }
-
- private String name_service_val = ""; // required
- public void name_service(String setTo) {
- name_service_val = setTo;
- }
-
- private String auth_used_val; // optional
- public void auth_used(String setTo) {
- auth_used_val = setTo;
- }
-
- private String changed_values_val = ""; // required
- public void changed_values(String setTo) {
- changed_values_val = setTo;
- }
-
- public void putEvent(int status, int ret_val) {
- byte[] session = super.sh.getSession();
-
- if ((super.sh.AuditIsOn) && (super.sh.ValidSession))
- putEvent(session, status, ret_val,
- object_name_val,
- domain_val,
- name_service_val,
- auth_used_val,
- changed_values_val);
- }
-}
diff --git a/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_screenlock.java b/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_screenlock.java
deleted file mode 100644
index 5687c09573..0000000000
--- a/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_screenlock.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2001-2003 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- *
- * ident "%Z%%M% %I% %E% SMI"
- */
-package com.sun.audit;
-
-// audit event: AUE_screenlock = 6221
-
-public class AuditEvent_screenlock extends AuditEvent {
-
- private native void putEvent(byte[]session,
- int status, int ret_val);
-
- public AuditEvent_screenlock(AuditSession session)
- throws Exception
- {
- super(session);
- }
-
-
- public void putEvent(int status, int ret_val)
- {
- byte[] session = super.sh.getSession();
-
- if ((super.sh.AuditIsOn) && (super.sh.ValidSession))
- putEvent(session, status, ret_val);
- }
-}
diff --git a/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_serialport_add.java b/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_serialport_add.java
deleted file mode 100644
index 5b452ad2e8..0000000000
--- a/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_serialport_add.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (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
- * or http://www.opensolaris.org/os/licensing.
- * 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 (c) 2001-2002 by Sun Microsystems, Inc.
- * All rights reserved.
- *
- * ident "%Z%%M% %I% %E% SMI"
- */
-package com.sun.audit;
-
-// audit event: AUE_serialport_add = 6193
-
-public class AuditEvent_serialport_add extends AuditEvent {
-
- private native void putEvent(byte[]session,
- int status, int ret_val,
- String object_name,
- String domain,
- String name_service,
- String auth_used,
- String initial_values);
-
- public AuditEvent_serialport_add(AuditSession session)
- throws Exception {
- super(session);
- }
-
-
- private String object_name_val = ""; // required
- public void object_name(String setTo) {
- object_name_val = setTo;
- }
-
- private String domain_val; // optional
- public void domain(String setTo) {
- domain_val = setTo;
- }
-
- private String name_service_val = ""; // required
- public void name_service(String setTo) {
- name_service_val = setTo;
- }
-
- private String auth_used_val; // optional
- public void auth_used(String setTo) {
- auth_used_val = setTo;
- }
-
- private String initial_values_val = ""; // required
- public void initial_values(String setTo) {
- initial_values_val = setTo;
- }
-
- public void putEvent(int status, int ret_val) {
- byte[] session = super.sh.getSession();
-
- if ((super.sh.AuditIsOn) && (super.sh.ValidSession))
- putEvent(session, status, ret_val,
- object_name_val,
- domain_val,
- name_service_val,
- auth_used_val,
- initial_values_val);
- }
-}
diff --git a/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_serialport_delete.java b/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_serialport_delete.java
deleted file mode 100644
index 862d60e763..0000000000
--- a/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_serialport_delete.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (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
- * or http://www.opensolaris.org/os/licensing.
- * 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 (c) 2001-2002 by Sun Microsystems, Inc.
- * All rights reserved.
- *
- * ident "%Z%%M% %I% %E% SMI"
- */
-package com.sun.audit;
-
-// audit event: AUE_serialport_delete = 6194
-
-public class AuditEvent_serialport_delete extends AuditEvent {
-
- private native void putEvent(byte[]session,
- int status, int ret_val,
- String object_name,
- String domain,
- String name_service,
- String auth_used,
- String delete_values);
-
- public AuditEvent_serialport_delete(AuditSession session)
- throws Exception {
- super(session);
- }
-
-
- private String object_name_val = ""; // required
- public void object_name(String setTo) {
- object_name_val = setTo;
- }
-
- private String domain_val; // optional
- public void domain(String setTo) {
- domain_val = setTo;
- }
-
- private String name_service_val = ""; // required
- public void name_service(String setTo) {
- name_service_val = setTo;
- }
-
- private String auth_used_val; // optional
- public void auth_used(String setTo) {
- auth_used_val = setTo;
- }
-
- private String delete_values_val = ""; // required
- public void delete_values(String setTo) {
- delete_values_val = setTo;
- }
-
- public void putEvent(int status, int ret_val) {
- byte[] session = super.sh.getSession();
-
- if ((super.sh.AuditIsOn) && (super.sh.ValidSession))
- putEvent(session, status, ret_val,
- object_name_val,
- domain_val,
- name_service_val,
- auth_used_val,
- delete_values_val);
- }
-}
diff --git a/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_serialport_modify.java b/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_serialport_modify.java
deleted file mode 100644
index 94429ab048..0000000000
--- a/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_serialport_modify.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (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
- * or http://www.opensolaris.org/os/licensing.
- * 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 (c) 2001-2002 by Sun Microsystems, Inc.
- * All rights reserved.
- *
- * ident "%Z%%M% %I% %E% SMI"
- */
-package com.sun.audit;
-
-// audit event: AUE_serialport_modify = 6195
-
-public class AuditEvent_serialport_modify extends AuditEvent {
-
- private native void putEvent(byte[]session,
- int status, int ret_val,
- String object_name,
- String domain,
- String name_service,
- String auth_used,
- String changed_values);
-
- public AuditEvent_serialport_modify(AuditSession session)
- throws Exception {
- super(session);
- }
-
-
- private String object_name_val = ""; // required
- public void object_name(String setTo) {
- object_name_val = setTo;
- }
-
- private String domain_val; // optional
- public void domain(String setTo) {
- domain_val = setTo;
- }
-
- private String name_service_val = ""; // required
- public void name_service(String setTo) {
- name_service_val = setTo;
- }
-
- private String auth_used_val; // optional
- public void auth_used(String setTo) {
- auth_used_val = setTo;
- }
-
- private String changed_values_val = ""; // required
- public void changed_values(String setTo) {
- changed_values_val = setTo;
- }
-
- public void putEvent(int status, int ret_val) {
- byte[] session = super.sh.getSession();
-
- if ((super.sh.AuditIsOn) && (super.sh.ValidSession))
- putEvent(session, status, ret_val,
- object_name_val,
- domain_val,
- name_service_val,
- auth_used_val,
- changed_values_val);
- }
-}
diff --git a/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_ssh.java b/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_ssh.java
deleted file mode 100644
index a8bf119250..0000000000
--- a/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_ssh.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (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
- * or http://www.opensolaris.org/os/licensing.
- * 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 (c) 2001-2002 by Sun Microsystems, Inc.
- * All rights reserved.
- *
- * ident "%Z%%M% %I% %E% SMI"
- */
-package com.sun.audit;
-
-// audit event: AUE_ssh = 6172
-
-public class AuditEvent_ssh extends AuditEvent {
-
- private native void putEvent(byte[]session,
- int status, int ret_val,
- int message);
-
- public AuditEvent_ssh(AuditSession session)
- throws Exception {
- super(session);
- }
-
-
- // See adt_login_text in AuditEvent.java for valid values
- private int message_val = 0; // optional
- public void message(int setTo) {
- message_val = setTo;
- }
-
- public void putEvent(int status, int ret_val) {
- byte[] session = super.sh.getSession();
-
- if ((super.sh.AuditIsOn) && (super.sh.ValidSession))
- putEvent(session, status, ret_val,
- message_val);
- }
-}
diff --git a/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_su.java b/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_su.java
deleted file mode 100644
index 5ac46a4fa7..0000000000
--- a/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_su.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2001-2003 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- *
- * ident "%Z%%M% %I% %E% SMI"
- */
-package com.sun.audit;
-
-// audit event: AUE_su = 6159
-
-public class AuditEvent_su extends AuditEvent {
-
- private native void putEvent(byte[]session,
- int status, int ret_val,
- String message);
-
- public AuditEvent_su(AuditSession session)
- throws Exception
- {
- super(session);
- }
-
-
- private String message_val; // optional
- public void message(String setTo)
- {
- message_val = setTo;
- }
-
- public void putEvent(int status, int ret_val)
- {
- byte[] session = super.sh.getSession();
-
- if ((super.sh.AuditIsOn) && (super.sh.ValidSession))
- putEvent(session, status, ret_val,
- message_val);
- }
-}
diff --git a/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_telnet.java b/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_telnet.java
deleted file mode 100644
index c0f97b116b..0000000000
--- a/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_telnet.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (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
- * or http://www.opensolaris.org/os/licensing.
- * 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 2001-2003 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- *
- * ident "%Z%%M% %I% %E% SMI"
- */
-package com.sun.audit;
-
-// audit event: AUE_telnet = 6154
-
-public class AuditEvent_telnet extends AuditEvent {
-
- private native void putEvent(byte[]session,
- int status, int ret_val,
- int message);
-
- public AuditEvent_telnet(AuditSession session)
- throws Exception
- {
- super(session);
- }
-
-
- // See adt_login_text in AuditEvent.java for valid values
- private int message_val = 0; // optional
- public void message(int setTo)
- {
- message_val = setTo;
- }
-
- public void putEvent(int status, int ret_val)
- {
- byte[] session = super.sh.getSession();
-
- if ((super.sh.AuditIsOn) && (super.sh.ValidSession))
- putEvent(session, status, ret_val,
- message_val);
- }
-}
diff --git a/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_uauth.java b/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_uauth.java
deleted file mode 100644
index 1f60337504..0000000000
--- a/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_uauth.java
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (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
- * or http://www.opensolaris.org/os/licensing.
- * 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 (c) 2001-2002 by Sun Microsystems, Inc.
- * All rights reserved.
- *
- * ident "%Z%%M% %I% %E% SMI"
- */
-package com.sun.audit;
-
-// audit event: AUE_uauth = 6199
-
-public class AuditEvent_uauth extends AuditEvent {
-
- private native void putEvent(byte[]session,
- int status, int ret_val,
- String auth_used,
- String objectname);
-
- public AuditEvent_uauth(AuditSession session)
- throws Exception {
- super(session);
- }
-
-
- private String auth_used_val = ""; // required
- public void auth_used(String setTo) {
- auth_used_val = setTo;
- }
-
- private String objectname_val = ""; // required
- public void objectname(String setTo) {
- objectname_val = setTo;
- }
-
- public void putEvent(int status, int ret_val) {
- byte[] session = super.sh.getSession();
-
- if ((super.sh.AuditIsOn) && (super.sh.ValidSession))
- putEvent(session, status, ret_val,
- auth_used_val,
- objectname_val);
- }
-}
diff --git a/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_usermgr_add.java b/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_usermgr_add.java
deleted file mode 100644
index 37719e596f..0000000000
--- a/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_usermgr_add.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (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
- * or http://www.opensolaris.org/os/licensing.
- * 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 (c) 2001-2002 by Sun Microsystems, Inc.
- * All rights reserved.
- *
- * ident "%Z%%M% %I% %E% SMI"
- */
-package com.sun.audit;
-
-// audit event: AUE_usermgr_add = 6196
-
-public class AuditEvent_usermgr_add extends AuditEvent {
-
- private native void putEvent(byte[]session,
- int status, int ret_val,
- String object_name,
- String domain,
- String name_service,
- String auth_used,
- String initial_values);
-
- public AuditEvent_usermgr_add(AuditSession session)
- throws Exception {
- super(session);
- }
-
-
- private String object_name_val = ""; // required
- public void object_name(String setTo) {
- object_name_val = setTo;
- }
-
- private String domain_val; // optional
- public void domain(String setTo) {
- domain_val = setTo;
- }
-
- private String name_service_val = ""; // required
- public void name_service(String setTo) {
- name_service_val = setTo;
- }
-
- private String auth_used_val; // optional
- public void auth_used(String setTo) {
- auth_used_val = setTo;
- }
-
- private String initial_values_val = ""; // required
- public void initial_values(String setTo) {
- initial_values_val = setTo;
- }
-
- public void putEvent(int status, int ret_val) {
- byte[] session = super.sh.getSession();
-
- if ((super.sh.AuditIsOn) && (super.sh.ValidSession))
- putEvent(session, status, ret_val,
- object_name_val,
- domain_val,
- name_service_val,
- auth_used_val,
- initial_values_val);
- }
-}
diff --git a/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_usermgr_delete.java b/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_usermgr_delete.java
deleted file mode 100644
index fdf1a19f48..0000000000
--- a/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_usermgr_delete.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (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
- * or http://www.opensolaris.org/os/licensing.
- * 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 (c) 2001-2002 by Sun Microsystems, Inc.
- * All rights reserved.
- *
- * ident "%Z%%M% %I% %E% SMI"
- */
-package com.sun.audit;
-
-// audit event: AUE_usermgr_delete = 6197
-
-public class AuditEvent_usermgr_delete extends AuditEvent {
-
- private native void putEvent(byte[]session,
- int status, int ret_val,
- String object_name,
- String domain,
- String name_service,
- String auth_used,
- String delete_values);
-
- public AuditEvent_usermgr_delete(AuditSession session)
- throws Exception {
- super(session);
- }
-
-
- private String object_name_val = ""; // required
- public void object_name(String setTo) {
- object_name_val = setTo;
- }
-
- private String domain_val; // optional
- public void domain(String setTo) {
- domain_val = setTo;
- }
-
- private String name_service_val = ""; // required
- public void name_service(String setTo) {
- name_service_val = setTo;
- }
-
- private String auth_used_val; // optional
- public void auth_used(String setTo) {
- auth_used_val = setTo;
- }
-
- private String delete_values_val = ""; // required
- public void delete_values(String setTo) {
- delete_values_val = setTo;
- }
-
- public void putEvent(int status, int ret_val) {
- byte[] session = super.sh.getSession();
-
- if ((super.sh.AuditIsOn) && (super.sh.ValidSession))
- putEvent(session, status, ret_val,
- object_name_val,
- domain_val,
- name_service_val,
- auth_used_val,
- delete_values_val);
- }
-}
diff --git a/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_usermgr_modify.java b/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_usermgr_modify.java
deleted file mode 100644
index a4d6c72665..0000000000
--- a/usr/src/lib/libadt_jni/com/sun/audit/AuditEvent_usermgr_modify.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (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
- * or http://www.opensolaris.org/os/licensing.
- * 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 (c) 2001-2002 by Sun Microsystems, Inc.
- * All rights reserved.
- *
- * ident "%Z%%M% %I% %E% SMI"
- */
-package com.sun.audit;
-
-// audit event: AUE_usermgr_modify = 6198
-
-public class AuditEvent_usermgr_modify extends AuditEvent {
-
- private native void putEvent(byte[]session,
- int status, int ret_val,
- String object_name,
- String domain,
- String name_service,
- String auth_used,
- String changed_values);
-
- public AuditEvent_usermgr_modify(AuditSession session)
- throws Exception {
- super(session);
- }
-
-
- private String object_name_val = ""; // required
- public void object_name(String setTo) {
- object_name_val = setTo;
- }
-
- private String domain_val; // optional
- public void domain(String setTo) {
- domain_val = setTo;
- }
-
- private String name_service_val = ""; // required
- public void name_service(String setTo) {
- name_service_val = setTo;
- }
-
- private String auth_used_val; // optional
- public void auth_used(String setTo) {
- auth_used_val = setTo;
- }
-
- private String changed_values_val = ""; // required
- public void changed_values(String setTo) {
- changed_values_val = setTo;
- }
-
- public void putEvent(int status, int ret_val) {
- byte[] session = super.sh.getSession();
-
- if ((super.sh.AuditIsOn) && (super.sh.ValidSession))
- putEvent(session, status, ret_val,
- object_name_val,
- domain_val,
- name_service_val,
- auth_used_val,
- changed_values_val);
- }
-}
diff --git a/usr/src/lib/libadt_jni/com/sun/audit/Makefile b/usr/src/lib/libadt_jni/com/sun/audit/Makefile
index a6a05ed8c6..97f0df5972 100644
--- a/usr/src/lib/libadt_jni/com/sun/audit/Makefile
+++ b/usr/src/lib/libadt_jni/com/sun/audit/Makefile
@@ -19,7 +19,7 @@
# CDDL HEADER END
#
#
-# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
#
@@ -45,7 +45,7 @@ JAR_FILE=Audit.jar
INSTALL_JAR = $(ROOTAUDITHOME)/$(JAR_FILE)
-CLEAN_FILES = *.class $(JNIH) *.jar
+CLEAN_FILES = *.class $(JNIH) *.jar AuditEvent*.java
DEFINES=
diff --git a/usr/src/lib/libadt_jni/common/adt_jni_event.c b/usr/src/lib/libadt_jni/common/adt_jni_event.c
deleted file mode 100644
index 9d7f97794d..0000000000
--- a/usr/src/lib/libadt_jni/common/adt_jni_event.c
+++ /dev/null
@@ -1,2686 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (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
- * or http://www.opensolaris.org/os/licensing.
- * 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
- */
-/*
- * adt_jni_event.c
- *
- * helper functions for the event-specific Java classes
- *
- * Automatically generated code; do not edit
- *
- * Copyright 2004 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include "../../libbsm/common/adt_xlate.h"
-#include <jni.h>
-#include "../com/sun/audit/AuditSession.h" /* javah output */
-#include "adt_jni.h"
-#include <stdlib.h>
-#include <string.h>
-
-static char *except_class = "java/lang/Exception";
-
-/* ARGSUSED */
-JNIEXPORT void JNICALL
-Java_com_sun_audit_AuditEvent_1admin_1authenticate_putEvent(
- JNIEnv *env,
- jobject self,
- jbyteArray jsession,
- jint status,
- jint ret_val,
- jint message)
-{
- adt_event_data_t *event;
- adt_session_data_t *session;
-
- (void) j2c_pointer(env, jsession, (char **)&session);
-
- event = adt_alloc_event(session, ADT_admin_authenticate);
-
-
- event->adt_admin_authenticate.message = message;
-
- (void) adt_put_event((adt_event_data_t *)event, status, ret_val);
-
-
- adt_free_event((adt_event_data_t *)event);
-}
-/* ARGSUSED */
-JNIEXPORT void JNICALL
-Java_com_sun_audit_AuditEvent_1filesystem_1add_putEvent(
- JNIEnv *env,
- jobject self,
- jbyteArray jsession,
- jint status,
- jint ret_val,
- jstring object_name,
- jstring domain,
- jstring name_service,
- jstring auth_used,
- jstring initial_values)
-{
- adt_event_data_t *event;
- adt_session_data_t *session;
- char *string;
- char *locale;
-
- (void) j2c_pointer(env, jsession, (char **)&session);
-
- event = adt_alloc_event(session, ADT_filesystem_add);
-
- /* object_name */
- if (object_name != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, object_name, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_filesystem_add.object_name = strdup(string);
- (*env)->ReleaseStringUTFChars(env, object_name, string);
- if (event->adt_filesystem_add.object_name == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
- /* domain */
- if (domain != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, domain, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_filesystem_add.domain = strdup(string);
- (*env)->ReleaseStringUTFChars(env, domain, string);
- if (event->adt_filesystem_add.domain == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
- /* name_service */
- if (name_service != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, name_service, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_filesystem_add.name_service = strdup(string);
- (*env)->ReleaseStringUTFChars(env, name_service, string);
- if (event->adt_filesystem_add.name_service == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
- /* auth_used */
- if (auth_used != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, auth_used, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_filesystem_add.auth_used = strdup(string);
- (*env)->ReleaseStringUTFChars(env, auth_used, string);
- if (event->adt_filesystem_add.auth_used == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
- /* initial_values */
- if (initial_values != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, initial_values, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_filesystem_add.initial_values = strdup(string);
- (*env)->ReleaseStringUTFChars(env, initial_values, string);
- if (event->adt_filesystem_add.initial_values == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
-
- (void) adt_put_event((adt_event_data_t *)event, status, ret_val);
-
- cleanup:
-
- if (event->adt_filesystem_add.object_name != NULL)
- free(event->adt_filesystem_add.object_name);
-
- if (event->adt_filesystem_add.domain != NULL)
- free(event->adt_filesystem_add.domain);
-
- if (event->adt_filesystem_add.name_service != NULL)
- free(event->adt_filesystem_add.name_service);
-
- if (event->adt_filesystem_add.auth_used != NULL)
- free(event->adt_filesystem_add.auth_used);
-
- if (event->adt_filesystem_add.initial_values != NULL)
- free(event->adt_filesystem_add.initial_values);
-
- adt_free_event((adt_event_data_t *)event);
-}
-/* ARGSUSED */
-JNIEXPORT void JNICALL
-Java_com_sun_audit_AuditEvent_1filesystem_1delete_putEvent(
- JNIEnv *env,
- jobject self,
- jbyteArray jsession,
- jint status,
- jint ret_val,
- jstring object_name,
- jstring domain,
- jstring name_service,
- jstring auth_used,
- jstring delete_values)
-{
- adt_event_data_t *event;
- adt_session_data_t *session;
- char *string;
- char *locale;
-
- (void) j2c_pointer(env, jsession, (char **)&session);
-
- event = adt_alloc_event(session, ADT_filesystem_delete);
-
- /* object_name */
- if (object_name != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, object_name, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_filesystem_delete.object_name = strdup(string);
- (*env)->ReleaseStringUTFChars(env, object_name, string);
- if (event->adt_filesystem_delete.object_name == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
- /* domain */
- if (domain != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, domain, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_filesystem_delete.domain = strdup(string);
- (*env)->ReleaseStringUTFChars(env, domain, string);
- if (event->adt_filesystem_delete.domain == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
- /* name_service */
- if (name_service != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, name_service, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_filesystem_delete.name_service = strdup(string);
- (*env)->ReleaseStringUTFChars(env, name_service, string);
- if (event->adt_filesystem_delete.name_service == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
- /* auth_used */
- if (auth_used != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, auth_used, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_filesystem_delete.auth_used = strdup(string);
- (*env)->ReleaseStringUTFChars(env, auth_used, string);
- if (event->adt_filesystem_delete.auth_used == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
- /* delete_values */
- if (delete_values != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, delete_values, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_filesystem_delete.delete_values = strdup(string);
- (*env)->ReleaseStringUTFChars(env, delete_values, string);
- if (event->adt_filesystem_delete.delete_values == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
-
- (void) adt_put_event((adt_event_data_t *)event, status, ret_val);
-
- cleanup:
-
- if (event->adt_filesystem_delete.object_name != NULL)
- free(event->adt_filesystem_delete.object_name);
-
- if (event->adt_filesystem_delete.domain != NULL)
- free(event->adt_filesystem_delete.domain);
-
- if (event->adt_filesystem_delete.name_service != NULL)
- free(event->adt_filesystem_delete.name_service);
-
- if (event->adt_filesystem_delete.auth_used != NULL)
- free(event->adt_filesystem_delete.auth_used);
-
- if (event->adt_filesystem_delete.delete_values != NULL)
- free(event->adt_filesystem_delete.delete_values);
-
- adt_free_event((adt_event_data_t *)event);
-}
-/* ARGSUSED */
-JNIEXPORT void JNICALL
-Java_com_sun_audit_AuditEvent_1filesystem_1modify_putEvent(
- JNIEnv *env,
- jobject self,
- jbyteArray jsession,
- jint status,
- jint ret_val,
- jstring object_name,
- jstring domain,
- jstring name_service,
- jstring auth_used,
- jstring changed_values)
-{
- adt_event_data_t *event;
- adt_session_data_t *session;
- char *string;
- char *locale;
-
- (void) j2c_pointer(env, jsession, (char **)&session);
-
- event = adt_alloc_event(session, ADT_filesystem_modify);
-
- /* object_name */
- if (object_name != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, object_name, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_filesystem_modify.object_name = strdup(string);
- (*env)->ReleaseStringUTFChars(env, object_name, string);
- if (event->adt_filesystem_modify.object_name == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
- /* domain */
- if (domain != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, domain, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_filesystem_modify.domain = strdup(string);
- (*env)->ReleaseStringUTFChars(env, domain, string);
- if (event->adt_filesystem_modify.domain == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
- /* name_service */
- if (name_service != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, name_service, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_filesystem_modify.name_service = strdup(string);
- (*env)->ReleaseStringUTFChars(env, name_service, string);
- if (event->adt_filesystem_modify.name_service == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
- /* auth_used */
- if (auth_used != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, auth_used, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_filesystem_modify.auth_used = strdup(string);
- (*env)->ReleaseStringUTFChars(env, auth_used, string);
- if (event->adt_filesystem_modify.auth_used == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
- /* changed_values */
- if (changed_values != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, changed_values, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_filesystem_modify.changed_values = strdup(string);
- (*env)->ReleaseStringUTFChars(env, changed_values, string);
- if (event->adt_filesystem_modify.changed_values == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
-
- (void) adt_put_event((adt_event_data_t *)event, status, ret_val);
-
- cleanup:
-
- if (event->adt_filesystem_modify.object_name != NULL)
- free(event->adt_filesystem_modify.object_name);
-
- if (event->adt_filesystem_modify.domain != NULL)
- free(event->adt_filesystem_modify.domain);
-
- if (event->adt_filesystem_modify.name_service != NULL)
- free(event->adt_filesystem_modify.name_service);
-
- if (event->adt_filesystem_modify.auth_used != NULL)
- free(event->adt_filesystem_modify.auth_used);
-
- if (event->adt_filesystem_modify.changed_values != NULL)
- free(event->adt_filesystem_modify.changed_values);
-
- adt_free_event((adt_event_data_t *)event);
-}
-/* ARGSUSED */
-JNIEXPORT void JNICALL
-Java_com_sun_audit_AuditEvent_1login_putEvent(
- JNIEnv *env,
- jobject self,
- jbyteArray jsession,
- jint status,
- jint ret_val,
- jint message)
-{
- adt_event_data_t *event;
- adt_session_data_t *session;
-
- (void) j2c_pointer(env, jsession, (char **)&session);
-
- event = adt_alloc_event(session, ADT_login);
-
-
- event->adt_login.message = message;
-
- (void) adt_put_event((adt_event_data_t *)event, status, ret_val);
-
-
- adt_free_event((adt_event_data_t *)event);
-}
-/* ARGSUSED */
-JNIEXPORT void JNICALL
-Java_com_sun_audit_AuditEvent_1logout_putEvent(
- JNIEnv *env,
- jobject self,
- jbyteArray jsession,
- jint status,
- jint ret_val,
- jstring user_name)
-{
- adt_event_data_t *event;
- adt_session_data_t *session;
- char *string;
- char *locale;
-
- (void) j2c_pointer(env, jsession, (char **)&session);
-
- event = adt_alloc_event(session, ADT_logout);
-
- /* user_name */
- if (user_name != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, user_name, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_logout.user_name = strdup(string);
- (*env)->ReleaseStringUTFChars(env, user_name, string);
- if (event->adt_logout.user_name == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
-
- (void) adt_put_event((adt_event_data_t *)event, status, ret_val);
-
- cleanup:
-
- if (event->adt_logout.user_name != NULL)
- free(event->adt_logout.user_name);
-
- adt_free_event((adt_event_data_t *)event);
-}
-/* ARGSUSED */
-JNIEXPORT void JNICALL
-Java_com_sun_audit_AuditEvent_1network_1add_putEvent(
- JNIEnv *env,
- jobject self,
- jbyteArray jsession,
- jint status,
- jint ret_val,
- jstring object_name,
- jstring domain,
- jstring name_service,
- jstring auth_used,
- jstring initial_values)
-{
- adt_event_data_t *event;
- adt_session_data_t *session;
- char *string;
- char *locale;
-
- (void) j2c_pointer(env, jsession, (char **)&session);
-
- event = adt_alloc_event(session, ADT_network_add);
-
- /* object_name */
- if (object_name != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, object_name, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_network_add.object_name = strdup(string);
- (*env)->ReleaseStringUTFChars(env, object_name, string);
- if (event->adt_network_add.object_name == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
- /* domain */
- if (domain != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, domain, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_network_add.domain = strdup(string);
- (*env)->ReleaseStringUTFChars(env, domain, string);
- if (event->adt_network_add.domain == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
- /* name_service */
- if (name_service != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, name_service, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_network_add.name_service = strdup(string);
- (*env)->ReleaseStringUTFChars(env, name_service, string);
- if (event->adt_network_add.name_service == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
- /* auth_used */
- if (auth_used != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, auth_used, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_network_add.auth_used = strdup(string);
- (*env)->ReleaseStringUTFChars(env, auth_used, string);
- if (event->adt_network_add.auth_used == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
- /* initial_values */
- if (initial_values != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, initial_values, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_network_add.initial_values = strdup(string);
- (*env)->ReleaseStringUTFChars(env, initial_values, string);
- if (event->adt_network_add.initial_values == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
-
- (void) adt_put_event((adt_event_data_t *)event, status, ret_val);
-
- cleanup:
-
- if (event->adt_network_add.object_name != NULL)
- free(event->adt_network_add.object_name);
-
- if (event->adt_network_add.domain != NULL)
- free(event->adt_network_add.domain);
-
- if (event->adt_network_add.name_service != NULL)
- free(event->adt_network_add.name_service);
-
- if (event->adt_network_add.auth_used != NULL)
- free(event->adt_network_add.auth_used);
-
- if (event->adt_network_add.initial_values != NULL)
- free(event->adt_network_add.initial_values);
-
- adt_free_event((adt_event_data_t *)event);
-}
-/* ARGSUSED */
-JNIEXPORT void JNICALL
-Java_com_sun_audit_AuditEvent_1network_1delete_putEvent(
- JNIEnv *env,
- jobject self,
- jbyteArray jsession,
- jint status,
- jint ret_val,
- jstring object_name,
- jstring domain,
- jstring name_service,
- jstring auth_used,
- jstring delete_values)
-{
- adt_event_data_t *event;
- adt_session_data_t *session;
- char *string;
- char *locale;
-
- (void) j2c_pointer(env, jsession, (char **)&session);
-
- event = adt_alloc_event(session, ADT_network_delete);
-
- /* object_name */
- if (object_name != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, object_name, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_network_delete.object_name = strdup(string);
- (*env)->ReleaseStringUTFChars(env, object_name, string);
- if (event->adt_network_delete.object_name == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
- /* domain */
- if (domain != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, domain, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_network_delete.domain = strdup(string);
- (*env)->ReleaseStringUTFChars(env, domain, string);
- if (event->adt_network_delete.domain == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
- /* name_service */
- if (name_service != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, name_service, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_network_delete.name_service = strdup(string);
- (*env)->ReleaseStringUTFChars(env, name_service, string);
- if (event->adt_network_delete.name_service == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
- /* auth_used */
- if (auth_used != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, auth_used, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_network_delete.auth_used = strdup(string);
- (*env)->ReleaseStringUTFChars(env, auth_used, string);
- if (event->adt_network_delete.auth_used == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
- /* delete_values */
- if (delete_values != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, delete_values, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_network_delete.delete_values = strdup(string);
- (*env)->ReleaseStringUTFChars(env, delete_values, string);
- if (event->adt_network_delete.delete_values == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
-
- (void) adt_put_event((adt_event_data_t *)event, status, ret_val);
-
- cleanup:
-
- if (event->adt_network_delete.object_name != NULL)
- free(event->adt_network_delete.object_name);
-
- if (event->adt_network_delete.domain != NULL)
- free(event->adt_network_delete.domain);
-
- if (event->adt_network_delete.name_service != NULL)
- free(event->adt_network_delete.name_service);
-
- if (event->adt_network_delete.auth_used != NULL)
- free(event->adt_network_delete.auth_used);
-
- if (event->adt_network_delete.delete_values != NULL)
- free(event->adt_network_delete.delete_values);
-
- adt_free_event((adt_event_data_t *)event);
-}
-/* ARGSUSED */
-JNIEXPORT void JNICALL
-Java_com_sun_audit_AuditEvent_1network_1modify_putEvent(
- JNIEnv *env,
- jobject self,
- jbyteArray jsession,
- jint status,
- jint ret_val,
- jstring object_name,
- jstring domain,
- jstring name_service,
- jstring auth_used,
- jstring changed_values)
-{
- adt_event_data_t *event;
- adt_session_data_t *session;
- char *string;
- char *locale;
-
- (void) j2c_pointer(env, jsession, (char **)&session);
-
- event = adt_alloc_event(session, ADT_network_modify);
-
- /* object_name */
- if (object_name != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, object_name, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_network_modify.object_name = strdup(string);
- (*env)->ReleaseStringUTFChars(env, object_name, string);
- if (event->adt_network_modify.object_name == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
- /* domain */
- if (domain != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, domain, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_network_modify.domain = strdup(string);
- (*env)->ReleaseStringUTFChars(env, domain, string);
- if (event->adt_network_modify.domain == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
- /* name_service */
- if (name_service != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, name_service, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_network_modify.name_service = strdup(string);
- (*env)->ReleaseStringUTFChars(env, name_service, string);
- if (event->adt_network_modify.name_service == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
- /* auth_used */
- if (auth_used != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, auth_used, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_network_modify.auth_used = strdup(string);
- (*env)->ReleaseStringUTFChars(env, auth_used, string);
- if (event->adt_network_modify.auth_used == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
- /* changed_values */
- if (changed_values != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, changed_values, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_network_modify.changed_values = strdup(string);
- (*env)->ReleaseStringUTFChars(env, changed_values, string);
- if (event->adt_network_modify.changed_values == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
-
- (void) adt_put_event((adt_event_data_t *)event, status, ret_val);
-
- cleanup:
-
- if (event->adt_network_modify.object_name != NULL)
- free(event->adt_network_modify.object_name);
-
- if (event->adt_network_modify.domain != NULL)
- free(event->adt_network_modify.domain);
-
- if (event->adt_network_modify.name_service != NULL)
- free(event->adt_network_modify.name_service);
-
- if (event->adt_network_modify.auth_used != NULL)
- free(event->adt_network_modify.auth_used);
-
- if (event->adt_network_modify.changed_values != NULL)
- free(event->adt_network_modify.changed_values);
-
- adt_free_event((adt_event_data_t *)event);
-}
-/* ARGSUSED */
-JNIEXPORT void JNICALL
-Java_com_sun_audit_AuditEvent_1passwd_putEvent(
- JNIEnv *env,
- jobject self,
- jbyteArray jsession,
- jint status,
- jint ret_val,
- jstring username)
-{
- adt_event_data_t *event;
- adt_session_data_t *session;
- char *string;
- char *locale;
-
- (void) j2c_pointer(env, jsession, (char **)&session);
-
- event = adt_alloc_event(session, ADT_passwd);
-
- /* username */
- if (username != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, username, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_passwd.username = strdup(string);
- (*env)->ReleaseStringUTFChars(env, username, string);
- if (event->adt_passwd.username == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
-
- (void) adt_put_event((adt_event_data_t *)event, status, ret_val);
-
- cleanup:
-
- if (event->adt_passwd.username != NULL)
- free(event->adt_passwd.username);
-
- adt_free_event((adt_event_data_t *)event);
-}
-/* ARGSUSED */
-JNIEXPORT void JNICALL
-Java_com_sun_audit_AuditEvent_1printer_1add_putEvent(
- JNIEnv *env,
- jobject self,
- jbyteArray jsession,
- jint status,
- jint ret_val,
- jstring object_name,
- jstring domain,
- jstring name_service,
- jstring auth_used,
- jstring initial_values)
-{
- adt_event_data_t *event;
- adt_session_data_t *session;
- char *string;
- char *locale;
-
- (void) j2c_pointer(env, jsession, (char **)&session);
-
- event = adt_alloc_event(session, ADT_printer_add);
-
- /* object_name */
- if (object_name != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, object_name, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_printer_add.object_name = strdup(string);
- (*env)->ReleaseStringUTFChars(env, object_name, string);
- if (event->adt_printer_add.object_name == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
- /* domain */
- if (domain != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, domain, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_printer_add.domain = strdup(string);
- (*env)->ReleaseStringUTFChars(env, domain, string);
- if (event->adt_printer_add.domain == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
- /* name_service */
- if (name_service != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, name_service, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_printer_add.name_service = strdup(string);
- (*env)->ReleaseStringUTFChars(env, name_service, string);
- if (event->adt_printer_add.name_service == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
- /* auth_used */
- if (auth_used != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, auth_used, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_printer_add.auth_used = strdup(string);
- (*env)->ReleaseStringUTFChars(env, auth_used, string);
- if (event->adt_printer_add.auth_used == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
- /* initial_values */
- if (initial_values != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, initial_values, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_printer_add.initial_values = strdup(string);
- (*env)->ReleaseStringUTFChars(env, initial_values, string);
- if (event->adt_printer_add.initial_values == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
-
- (void) adt_put_event((adt_event_data_t *)event, status, ret_val);
-
- cleanup:
-
- if (event->adt_printer_add.object_name != NULL)
- free(event->adt_printer_add.object_name);
-
- if (event->adt_printer_add.domain != NULL)
- free(event->adt_printer_add.domain);
-
- if (event->adt_printer_add.name_service != NULL)
- free(event->adt_printer_add.name_service);
-
- if (event->adt_printer_add.auth_used != NULL)
- free(event->adt_printer_add.auth_used);
-
- if (event->adt_printer_add.initial_values != NULL)
- free(event->adt_printer_add.initial_values);
-
- adt_free_event((adt_event_data_t *)event);
-}
-/* ARGSUSED */
-JNIEXPORT void JNICALL
-Java_com_sun_audit_AuditEvent_1printer_1delete_putEvent(
- JNIEnv *env,
- jobject self,
- jbyteArray jsession,
- jint status,
- jint ret_val,
- jstring object_name,
- jstring domain,
- jstring name_service,
- jstring auth_used,
- jstring delete_values)
-{
- adt_event_data_t *event;
- adt_session_data_t *session;
- char *string;
- char *locale;
-
- (void) j2c_pointer(env, jsession, (char **)&session);
-
- event = adt_alloc_event(session, ADT_printer_delete);
-
- /* object_name */
- if (object_name != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, object_name, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_printer_delete.object_name = strdup(string);
- (*env)->ReleaseStringUTFChars(env, object_name, string);
- if (event->adt_printer_delete.object_name == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
- /* domain */
- if (domain != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, domain, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_printer_delete.domain = strdup(string);
- (*env)->ReleaseStringUTFChars(env, domain, string);
- if (event->adt_printer_delete.domain == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
- /* name_service */
- if (name_service != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, name_service, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_printer_delete.name_service = strdup(string);
- (*env)->ReleaseStringUTFChars(env, name_service, string);
- if (event->adt_printer_delete.name_service == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
- /* auth_used */
- if (auth_used != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, auth_used, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_printer_delete.auth_used = strdup(string);
- (*env)->ReleaseStringUTFChars(env, auth_used, string);
- if (event->adt_printer_delete.auth_used == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
- /* delete_values */
- if (delete_values != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, delete_values, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_printer_delete.delete_values = strdup(string);
- (*env)->ReleaseStringUTFChars(env, delete_values, string);
- if (event->adt_printer_delete.delete_values == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
-
- (void) adt_put_event((adt_event_data_t *)event, status, ret_val);
-
- cleanup:
-
- if (event->adt_printer_delete.object_name != NULL)
- free(event->adt_printer_delete.object_name);
-
- if (event->adt_printer_delete.domain != NULL)
- free(event->adt_printer_delete.domain);
-
- if (event->adt_printer_delete.name_service != NULL)
- free(event->adt_printer_delete.name_service);
-
- if (event->adt_printer_delete.auth_used != NULL)
- free(event->adt_printer_delete.auth_used);
-
- if (event->adt_printer_delete.delete_values != NULL)
- free(event->adt_printer_delete.delete_values);
-
- adt_free_event((adt_event_data_t *)event);
-}
-/* ARGSUSED */
-JNIEXPORT void JNICALL
-Java_com_sun_audit_AuditEvent_1printer_1modify_putEvent(
- JNIEnv *env,
- jobject self,
- jbyteArray jsession,
- jint status,
- jint ret_val,
- jstring object_name,
- jstring domain,
- jstring name_service,
- jstring auth_used,
- jstring changed_values)
-{
- adt_event_data_t *event;
- adt_session_data_t *session;
- char *string;
- char *locale;
-
- (void) j2c_pointer(env, jsession, (char **)&session);
-
- event = adt_alloc_event(session, ADT_printer_modify);
-
- /* object_name */
- if (object_name != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, object_name, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_printer_modify.object_name = strdup(string);
- (*env)->ReleaseStringUTFChars(env, object_name, string);
- if (event->adt_printer_modify.object_name == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
- /* domain */
- if (domain != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, domain, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_printer_modify.domain = strdup(string);
- (*env)->ReleaseStringUTFChars(env, domain, string);
- if (event->adt_printer_modify.domain == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
- /* name_service */
- if (name_service != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, name_service, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_printer_modify.name_service = strdup(string);
- (*env)->ReleaseStringUTFChars(env, name_service, string);
- if (event->adt_printer_modify.name_service == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
- /* auth_used */
- if (auth_used != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, auth_used, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_printer_modify.auth_used = strdup(string);
- (*env)->ReleaseStringUTFChars(env, auth_used, string);
- if (event->adt_printer_modify.auth_used == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
- /* changed_values */
- if (changed_values != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, changed_values, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_printer_modify.changed_values = strdup(string);
- (*env)->ReleaseStringUTFChars(env, changed_values, string);
- if (event->adt_printer_modify.changed_values == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
-
- (void) adt_put_event((adt_event_data_t *)event, status, ret_val);
-
- cleanup:
-
- if (event->adt_printer_modify.object_name != NULL)
- free(event->adt_printer_modify.object_name);
-
- if (event->adt_printer_modify.domain != NULL)
- free(event->adt_printer_modify.domain);
-
- if (event->adt_printer_modify.name_service != NULL)
- free(event->adt_printer_modify.name_service);
-
- if (event->adt_printer_modify.auth_used != NULL)
- free(event->adt_printer_modify.auth_used);
-
- if (event->adt_printer_modify.changed_values != NULL)
- free(event->adt_printer_modify.changed_values);
-
- adt_free_event((adt_event_data_t *)event);
-}
-/* ARGSUSED */
-JNIEXPORT void JNICALL
-Java_com_sun_audit_AuditEvent_1rlogin_putEvent(
- JNIEnv *env,
- jobject self,
- jbyteArray jsession,
- jint status,
- jint ret_val,
- jint message)
-{
- adt_event_data_t *event;
- adt_session_data_t *session;
-
- (void) j2c_pointer(env, jsession, (char **)&session);
-
- event = adt_alloc_event(session, ADT_rlogin);
-
-
- event->adt_rlogin.message = message;
-
- (void) adt_put_event((adt_event_data_t *)event, status, ret_val);
-
-
- adt_free_event((adt_event_data_t *)event);
-}
-/* ARGSUSED */
-JNIEXPORT void JNICALL
-Java_com_sun_audit_AuditEvent_1role_1login_putEvent(
- JNIEnv *env,
- jobject self,
- jbyteArray jsession,
- jint status,
- jint ret_val,
- jint message)
-{
- adt_event_data_t *event;
- adt_session_data_t *session;
-
- (void) j2c_pointer(env, jsession, (char **)&session);
-
- event = adt_alloc_event(session, ADT_role_login);
-
-
- event->adt_role_login.message = message;
-
- (void) adt_put_event((adt_event_data_t *)event, status, ret_val);
-
-
- adt_free_event((adt_event_data_t *)event);
-}
-/* ARGSUSED */
-JNIEXPORT void JNICALL
-Java_com_sun_audit_AuditEvent_1scheduledjob_1add_putEvent(
- JNIEnv *env,
- jobject self,
- jbyteArray jsession,
- jint status,
- jint ret_val,
- jstring object_name,
- jstring domain,
- jstring name_service,
- jstring auth_used,
- jstring initial_values)
-{
- adt_event_data_t *event;
- adt_session_data_t *session;
- char *string;
- char *locale;
-
- (void) j2c_pointer(env, jsession, (char **)&session);
-
- event = adt_alloc_event(session, ADT_scheduledjob_add);
-
- /* object_name */
- if (object_name != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, object_name, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_scheduledjob_add.object_name = strdup(string);
- (*env)->ReleaseStringUTFChars(env, object_name, string);
- if (event->adt_scheduledjob_add.object_name == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
- /* domain */
- if (domain != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, domain, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_scheduledjob_add.domain = strdup(string);
- (*env)->ReleaseStringUTFChars(env, domain, string);
- if (event->adt_scheduledjob_add.domain == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
- /* name_service */
- if (name_service != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, name_service, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_scheduledjob_add.name_service = strdup(string);
- (*env)->ReleaseStringUTFChars(env, name_service, string);
- if (event->adt_scheduledjob_add.name_service == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
- /* auth_used */
- if (auth_used != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, auth_used, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_scheduledjob_add.auth_used = strdup(string);
- (*env)->ReleaseStringUTFChars(env, auth_used, string);
- if (event->adt_scheduledjob_add.auth_used == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
- /* initial_values */
- if (initial_values != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, initial_values, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_scheduledjob_add.initial_values = strdup(string);
- (*env)->ReleaseStringUTFChars(env, initial_values, string);
- if (event->adt_scheduledjob_add.initial_values == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
-
- (void) adt_put_event((adt_event_data_t *)event, status, ret_val);
-
- cleanup:
-
- if (event->adt_scheduledjob_add.object_name != NULL)
- free(event->adt_scheduledjob_add.object_name);
-
- if (event->adt_scheduledjob_add.domain != NULL)
- free(event->adt_scheduledjob_add.domain);
-
- if (event->adt_scheduledjob_add.name_service != NULL)
- free(event->adt_scheduledjob_add.name_service);
-
- if (event->adt_scheduledjob_add.auth_used != NULL)
- free(event->adt_scheduledjob_add.auth_used);
-
- if (event->adt_scheduledjob_add.initial_values != NULL)
- free(event->adt_scheduledjob_add.initial_values);
-
- adt_free_event((adt_event_data_t *)event);
-}
-/* ARGSUSED */
-JNIEXPORT void JNICALL
-Java_com_sun_audit_AuditEvent_1scheduledjob_1delete_putEvent(
- JNIEnv *env,
- jobject self,
- jbyteArray jsession,
- jint status,
- jint ret_val,
- jstring object_name,
- jstring domain,
- jstring name_service,
- jstring auth_used,
- jstring delete_values)
-{
- adt_event_data_t *event;
- adt_session_data_t *session;
- char *string;
- char *locale;
-
- (void) j2c_pointer(env, jsession, (char **)&session);
-
- event = adt_alloc_event(session, ADT_scheduledjob_delete);
-
- /* object_name */
- if (object_name != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, object_name, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_scheduledjob_delete.object_name = strdup(string);
- (*env)->ReleaseStringUTFChars(env, object_name, string);
- if (event->adt_scheduledjob_delete.object_name == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
- /* domain */
- if (domain != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, domain, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_scheduledjob_delete.domain = strdup(string);
- (*env)->ReleaseStringUTFChars(env, domain, string);
- if (event->adt_scheduledjob_delete.domain == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
- /* name_service */
- if (name_service != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, name_service, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_scheduledjob_delete.name_service = strdup(string);
- (*env)->ReleaseStringUTFChars(env, name_service, string);
- if (event->adt_scheduledjob_delete.name_service == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
- /* auth_used */
- if (auth_used != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, auth_used, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_scheduledjob_delete.auth_used = strdup(string);
- (*env)->ReleaseStringUTFChars(env, auth_used, string);
- if (event->adt_scheduledjob_delete.auth_used == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
- /* delete_values */
- if (delete_values != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, delete_values, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_scheduledjob_delete.delete_values = strdup(string);
- (*env)->ReleaseStringUTFChars(env, delete_values, string);
- if (event->adt_scheduledjob_delete.delete_values == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
-
- (void) adt_put_event((adt_event_data_t *)event, status, ret_val);
-
- cleanup:
-
- if (event->adt_scheduledjob_delete.object_name != NULL)
- free(event->adt_scheduledjob_delete.object_name);
-
- if (event->adt_scheduledjob_delete.domain != NULL)
- free(event->adt_scheduledjob_delete.domain);
-
- if (event->adt_scheduledjob_delete.name_service != NULL)
- free(event->adt_scheduledjob_delete.name_service);
-
- if (event->adt_scheduledjob_delete.auth_used != NULL)
- free(event->adt_scheduledjob_delete.auth_used);
-
- if (event->adt_scheduledjob_delete.delete_values != NULL)
- free(event->adt_scheduledjob_delete.delete_values);
-
- adt_free_event((adt_event_data_t *)event);
-}
-/* ARGSUSED */
-JNIEXPORT void JNICALL
-Java_com_sun_audit_AuditEvent_1scheduledjob_1modify_putEvent(
- JNIEnv *env,
- jobject self,
- jbyteArray jsession,
- jint status,
- jint ret_val,
- jstring object_name,
- jstring domain,
- jstring name_service,
- jstring auth_used,
- jstring changed_values)
-{
- adt_event_data_t *event;
- adt_session_data_t *session;
- char *string;
- char *locale;
-
- (void) j2c_pointer(env, jsession, (char **)&session);
-
- event = adt_alloc_event(session, ADT_scheduledjob_modify);
-
- /* object_name */
- if (object_name != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, object_name, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_scheduledjob_modify.object_name = strdup(string);
- (*env)->ReleaseStringUTFChars(env, object_name, string);
- if (event->adt_scheduledjob_modify.object_name == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
- /* domain */
- if (domain != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, domain, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_scheduledjob_modify.domain = strdup(string);
- (*env)->ReleaseStringUTFChars(env, domain, string);
- if (event->adt_scheduledjob_modify.domain == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
- /* name_service */
- if (name_service != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, name_service, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_scheduledjob_modify.name_service = strdup(string);
- (*env)->ReleaseStringUTFChars(env, name_service, string);
- if (event->adt_scheduledjob_modify.name_service == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
- /* auth_used */
- if (auth_used != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, auth_used, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_scheduledjob_modify.auth_used = strdup(string);
- (*env)->ReleaseStringUTFChars(env, auth_used, string);
- if (event->adt_scheduledjob_modify.auth_used == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
- /* changed_values */
- if (changed_values != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, changed_values, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_scheduledjob_modify.changed_values = strdup(string);
- (*env)->ReleaseStringUTFChars(env, changed_values, string);
- if (event->adt_scheduledjob_modify.changed_values == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
-
- (void) adt_put_event((adt_event_data_t *)event, status, ret_val);
-
- cleanup:
-
- if (event->adt_scheduledjob_modify.object_name != NULL)
- free(event->adt_scheduledjob_modify.object_name);
-
- if (event->adt_scheduledjob_modify.domain != NULL)
- free(event->adt_scheduledjob_modify.domain);
-
- if (event->adt_scheduledjob_modify.name_service != NULL)
- free(event->adt_scheduledjob_modify.name_service);
-
- if (event->adt_scheduledjob_modify.auth_used != NULL)
- free(event->adt_scheduledjob_modify.auth_used);
-
- if (event->adt_scheduledjob_modify.changed_values != NULL)
- free(event->adt_scheduledjob_modify.changed_values);
-
- adt_free_event((adt_event_data_t *)event);
-}
-/* ARGSUSED */
-JNIEXPORT void JNICALL
-Java_com_sun_audit_AuditEvent_1screenlock_putEvent(
- JNIEnv *env,
- jobject self,
- jbyteArray jsession,
- jint status,
- jint ret_val)
-{
- adt_event_data_t *event;
- adt_session_data_t *session;
-
- (void) j2c_pointer(env, jsession, (char **)&session);
-
- event = adt_alloc_event(session, ADT_screenlock);
-
-
- (void) adt_put_event((adt_event_data_t *)event, status, ret_val);
-
-
- adt_free_event((adt_event_data_t *)event);
-}
-/* ARGSUSED */
-JNIEXPORT void JNICALL
-Java_com_sun_audit_AuditEvent_1screenunlock_putEvent(
- JNIEnv *env,
- jobject self,
- jbyteArray jsession,
- jint status,
- jint ret_val)
-{
- adt_event_data_t *event;
- adt_session_data_t *session;
-
- (void) j2c_pointer(env, jsession, (char **)&session);
-
- event = adt_alloc_event(session, ADT_screenunlock);
-
-
- (void) adt_put_event((adt_event_data_t *)event, status, ret_val);
-
-
- adt_free_event((adt_event_data_t *)event);
-}
-/* ARGSUSED */
-JNIEXPORT void JNICALL
-Java_com_sun_audit_AuditEvent_1serialport_1add_putEvent(
- JNIEnv *env,
- jobject self,
- jbyteArray jsession,
- jint status,
- jint ret_val,
- jstring object_name,
- jstring domain,
- jstring name_service,
- jstring auth_used,
- jstring initial_values)
-{
- adt_event_data_t *event;
- adt_session_data_t *session;
- char *string;
- char *locale;
-
- (void) j2c_pointer(env, jsession, (char **)&session);
-
- event = adt_alloc_event(session, ADT_serialport_add);
-
- /* object_name */
- if (object_name != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, object_name, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_serialport_add.object_name = strdup(string);
- (*env)->ReleaseStringUTFChars(env, object_name, string);
- if (event->adt_serialport_add.object_name == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
- /* domain */
- if (domain != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, domain, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_serialport_add.domain = strdup(string);
- (*env)->ReleaseStringUTFChars(env, domain, string);
- if (event->adt_serialport_add.domain == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
- /* name_service */
- if (name_service != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, name_service, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_serialport_add.name_service = strdup(string);
- (*env)->ReleaseStringUTFChars(env, name_service, string);
- if (event->adt_serialport_add.name_service == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
- /* auth_used */
- if (auth_used != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, auth_used, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_serialport_add.auth_used = strdup(string);
- (*env)->ReleaseStringUTFChars(env, auth_used, string);
- if (event->adt_serialport_add.auth_used == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
- /* initial_values */
- if (initial_values != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, initial_values, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_serialport_add.initial_values = strdup(string);
- (*env)->ReleaseStringUTFChars(env, initial_values, string);
- if (event->adt_serialport_add.initial_values == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
-
- (void) adt_put_event((adt_event_data_t *)event, status, ret_val);
-
- cleanup:
-
- if (event->adt_serialport_add.object_name != NULL)
- free(event->adt_serialport_add.object_name);
-
- if (event->adt_serialport_add.domain != NULL)
- free(event->adt_serialport_add.domain);
-
- if (event->adt_serialport_add.name_service != NULL)
- free(event->adt_serialport_add.name_service);
-
- if (event->adt_serialport_add.auth_used != NULL)
- free(event->adt_serialport_add.auth_used);
-
- if (event->adt_serialport_add.initial_values != NULL)
- free(event->adt_serialport_add.initial_values);
-
- adt_free_event((adt_event_data_t *)event);
-}
-/* ARGSUSED */
-JNIEXPORT void JNICALL
-Java_com_sun_audit_AuditEvent_1serialport_1delete_putEvent(
- JNIEnv *env,
- jobject self,
- jbyteArray jsession,
- jint status,
- jint ret_val,
- jstring object_name,
- jstring domain,
- jstring name_service,
- jstring auth_used,
- jstring delete_values)
-{
- adt_event_data_t *event;
- adt_session_data_t *session;
- char *string;
- char *locale;
-
- (void) j2c_pointer(env, jsession, (char **)&session);
-
- event = adt_alloc_event(session, ADT_serialport_delete);
-
- /* object_name */
- if (object_name != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, object_name, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_serialport_delete.object_name = strdup(string);
- (*env)->ReleaseStringUTFChars(env, object_name, string);
- if (event->adt_serialport_delete.object_name == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
- /* domain */
- if (domain != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, domain, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_serialport_delete.domain = strdup(string);
- (*env)->ReleaseStringUTFChars(env, domain, string);
- if (event->adt_serialport_delete.domain == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
- /* name_service */
- if (name_service != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, name_service, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_serialport_delete.name_service = strdup(string);
- (*env)->ReleaseStringUTFChars(env, name_service, string);
- if (event->adt_serialport_delete.name_service == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
- /* auth_used */
- if (auth_used != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, auth_used, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_serialport_delete.auth_used = strdup(string);
- (*env)->ReleaseStringUTFChars(env, auth_used, string);
- if (event->adt_serialport_delete.auth_used == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
- /* delete_values */
- if (delete_values != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, delete_values, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_serialport_delete.delete_values = strdup(string);
- (*env)->ReleaseStringUTFChars(env, delete_values, string);
- if (event->adt_serialport_delete.delete_values == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
-
- (void) adt_put_event((adt_event_data_t *)event, status, ret_val);
-
- cleanup:
-
- if (event->adt_serialport_delete.object_name != NULL)
- free(event->adt_serialport_delete.object_name);
-
- if (event->adt_serialport_delete.domain != NULL)
- free(event->adt_serialport_delete.domain);
-
- if (event->adt_serialport_delete.name_service != NULL)
- free(event->adt_serialport_delete.name_service);
-
- if (event->adt_serialport_delete.auth_used != NULL)
- free(event->adt_serialport_delete.auth_used);
-
- if (event->adt_serialport_delete.delete_values != NULL)
- free(event->adt_serialport_delete.delete_values);
-
- adt_free_event((adt_event_data_t *)event);
-}
-/* ARGSUSED */
-JNIEXPORT void JNICALL
-Java_com_sun_audit_AuditEvent_1serialport_1modify_putEvent(
- JNIEnv *env,
- jobject self,
- jbyteArray jsession,
- jint status,
- jint ret_val,
- jstring object_name,
- jstring domain,
- jstring name_service,
- jstring auth_used,
- jstring changed_values)
-{
- adt_event_data_t *event;
- adt_session_data_t *session;
- char *string;
- char *locale;
-
- (void) j2c_pointer(env, jsession, (char **)&session);
-
- event = adt_alloc_event(session, ADT_serialport_modify);
-
- /* object_name */
- if (object_name != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, object_name, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_serialport_modify.object_name = strdup(string);
- (*env)->ReleaseStringUTFChars(env, object_name, string);
- if (event->adt_serialport_modify.object_name == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
- /* domain */
- if (domain != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, domain, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_serialport_modify.domain = strdup(string);
- (*env)->ReleaseStringUTFChars(env, domain, string);
- if (event->adt_serialport_modify.domain == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
- /* name_service */
- if (name_service != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, name_service, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_serialport_modify.name_service = strdup(string);
- (*env)->ReleaseStringUTFChars(env, name_service, string);
- if (event->adt_serialport_modify.name_service == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
- /* auth_used */
- if (auth_used != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, auth_used, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_serialport_modify.auth_used = strdup(string);
- (*env)->ReleaseStringUTFChars(env, auth_used, string);
- if (event->adt_serialport_modify.auth_used == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
- /* changed_values */
- if (changed_values != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, changed_values, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_serialport_modify.changed_values = strdup(string);
- (*env)->ReleaseStringUTFChars(env, changed_values, string);
- if (event->adt_serialport_modify.changed_values == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
-
- (void) adt_put_event((adt_event_data_t *)event, status, ret_val);
-
- cleanup:
-
- if (event->adt_serialport_modify.object_name != NULL)
- free(event->adt_serialport_modify.object_name);
-
- if (event->adt_serialport_modify.domain != NULL)
- free(event->adt_serialport_modify.domain);
-
- if (event->adt_serialport_modify.name_service != NULL)
- free(event->adt_serialport_modify.name_service);
-
- if (event->adt_serialport_modify.auth_used != NULL)
- free(event->adt_serialport_modify.auth_used);
-
- if (event->adt_serialport_modify.changed_values != NULL)
- free(event->adt_serialport_modify.changed_values);
-
- adt_free_event((adt_event_data_t *)event);
-}
-/* ARGSUSED */
-JNIEXPORT void JNICALL
-Java_com_sun_audit_AuditEvent_1ssh_putEvent(
- JNIEnv *env,
- jobject self,
- jbyteArray jsession,
- jint status,
- jint ret_val,
- jint message)
-{
- adt_event_data_t *event;
- adt_session_data_t *session;
-
- (void) j2c_pointer(env, jsession, (char **)&session);
-
- event = adt_alloc_event(session, ADT_ssh);
-
-
- event->adt_ssh.message = message;
-
- (void) adt_put_event((adt_event_data_t *)event, status, ret_val);
-
-
- adt_free_event((adt_event_data_t *)event);
-}
-/* ARGSUSED */
-JNIEXPORT void JNICALL
-Java_com_sun_audit_AuditEvent_1su_putEvent(
- JNIEnv *env,
- jobject self,
- jbyteArray jsession,
- jint status,
- jint ret_val,
- jstring message)
-{
- adt_event_data_t *event;
- adt_session_data_t *session;
- char *string;
- char *locale;
-
- (void) j2c_pointer(env, jsession, (char **)&session);
-
- event = adt_alloc_event(session, ADT_su);
-
- /* message */
- if (message != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, message, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_su.message = strdup(string);
- (*env)->ReleaseStringUTFChars(env, message, string);
- if (event->adt_su.message == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
-
- (void) adt_put_event((adt_event_data_t *)event, status, ret_val);
-
- cleanup:
-
- if (event->adt_su.message != NULL)
- free(event->adt_su.message);
-
- adt_free_event((adt_event_data_t *)event);
-}
-/* ARGSUSED */
-JNIEXPORT void JNICALL
-Java_com_sun_audit_AuditEvent_1telnet_putEvent(
- JNIEnv *env,
- jobject self,
- jbyteArray jsession,
- jint status,
- jint ret_val,
- jint message)
-{
- adt_event_data_t *event;
- adt_session_data_t *session;
-
- (void) j2c_pointer(env, jsession, (char **)&session);
-
- event = adt_alloc_event(session, ADT_telnet);
-
-
- event->adt_telnet.message = message;
-
- (void) adt_put_event((adt_event_data_t *)event, status, ret_val);
-
-
- adt_free_event((adt_event_data_t *)event);
-}
-/* ARGSUSED */
-JNIEXPORT void JNICALL
-Java_com_sun_audit_AuditEvent_1uauth_putEvent(
- JNIEnv *env,
- jobject self,
- jbyteArray jsession,
- jint status,
- jint ret_val,
- jstring auth_used,
- jstring objectname)
-{
- adt_event_data_t *event;
- adt_session_data_t *session;
- char *string;
- char *locale;
-
- (void) j2c_pointer(env, jsession, (char **)&session);
-
- event = adt_alloc_event(session, ADT_uauth);
-
- /* auth_used */
- if (auth_used != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, auth_used, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_uauth.auth_used = strdup(string);
- (*env)->ReleaseStringUTFChars(env, auth_used, string);
- if (event->adt_uauth.auth_used == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
- /* objectname */
- if (objectname != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, objectname, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_uauth.objectname = strdup(string);
- (*env)->ReleaseStringUTFChars(env, objectname, string);
- if (event->adt_uauth.objectname == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
-
- (void) adt_put_event((adt_event_data_t *)event, status, ret_val);
-
- cleanup:
-
- if (event->adt_uauth.auth_used != NULL)
- free(event->adt_uauth.auth_used);
-
- if (event->adt_uauth.objectname != NULL)
- free(event->adt_uauth.objectname);
-
- adt_free_event((adt_event_data_t *)event);
-}
-/* ARGSUSED */
-JNIEXPORT void JNICALL
-Java_com_sun_audit_AuditEvent_1usermgr_1add_putEvent(
- JNIEnv *env,
- jobject self,
- jbyteArray jsession,
- jint status,
- jint ret_val,
- jstring object_name,
- jstring domain,
- jstring name_service,
- jstring auth_used,
- jstring initial_values)
-{
- adt_event_data_t *event;
- adt_session_data_t *session;
- char *string;
- char *locale;
-
- (void) j2c_pointer(env, jsession, (char **)&session);
-
- event = adt_alloc_event(session, ADT_usermgr_add);
-
- /* object_name */
- if (object_name != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, object_name, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_usermgr_add.object_name = strdup(string);
- (*env)->ReleaseStringUTFChars(env, object_name, string);
- if (event->adt_usermgr_add.object_name == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
- /* domain */
- if (domain != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, domain, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_usermgr_add.domain = strdup(string);
- (*env)->ReleaseStringUTFChars(env, domain, string);
- if (event->adt_usermgr_add.domain == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
- /* name_service */
- if (name_service != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, name_service, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_usermgr_add.name_service = strdup(string);
- (*env)->ReleaseStringUTFChars(env, name_service, string);
- if (event->adt_usermgr_add.name_service == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
- /* auth_used */
- if (auth_used != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, auth_used, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_usermgr_add.auth_used = strdup(string);
- (*env)->ReleaseStringUTFChars(env, auth_used, string);
- if (event->adt_usermgr_add.auth_used == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
- /* initial_values */
- if (initial_values != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, initial_values, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_usermgr_add.initial_values = strdup(string);
- (*env)->ReleaseStringUTFChars(env, initial_values, string);
- if (event->adt_usermgr_add.initial_values == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
-
- (void) adt_put_event((adt_event_data_t *)event, status, ret_val);
-
- cleanup:
-
- if (event->adt_usermgr_add.object_name != NULL)
- free(event->adt_usermgr_add.object_name);
-
- if (event->adt_usermgr_add.domain != NULL)
- free(event->adt_usermgr_add.domain);
-
- if (event->adt_usermgr_add.name_service != NULL)
- free(event->adt_usermgr_add.name_service);
-
- if (event->adt_usermgr_add.auth_used != NULL)
- free(event->adt_usermgr_add.auth_used);
-
- if (event->adt_usermgr_add.initial_values != NULL)
- free(event->adt_usermgr_add.initial_values);
-
- adt_free_event((adt_event_data_t *)event);
-}
-/* ARGSUSED */
-JNIEXPORT void JNICALL
-Java_com_sun_audit_AuditEvent_1usermgr_1delete_putEvent(
- JNIEnv *env,
- jobject self,
- jbyteArray jsession,
- jint status,
- jint ret_val,
- jstring object_name,
- jstring domain,
- jstring name_service,
- jstring auth_used,
- jstring delete_values)
-{
- adt_event_data_t *event;
- adt_session_data_t *session;
- char *string;
- char *locale;
-
- (void) j2c_pointer(env, jsession, (char **)&session);
-
- event = adt_alloc_event(session, ADT_usermgr_delete);
-
- /* object_name */
- if (object_name != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, object_name, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_usermgr_delete.object_name = strdup(string);
- (*env)->ReleaseStringUTFChars(env, object_name, string);
- if (event->adt_usermgr_delete.object_name == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
- /* domain */
- if (domain != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, domain, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_usermgr_delete.domain = strdup(string);
- (*env)->ReleaseStringUTFChars(env, domain, string);
- if (event->adt_usermgr_delete.domain == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
- /* name_service */
- if (name_service != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, name_service, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_usermgr_delete.name_service = strdup(string);
- (*env)->ReleaseStringUTFChars(env, name_service, string);
- if (event->adt_usermgr_delete.name_service == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
- /* auth_used */
- if (auth_used != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, auth_used, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_usermgr_delete.auth_used = strdup(string);
- (*env)->ReleaseStringUTFChars(env, auth_used, string);
- if (event->adt_usermgr_delete.auth_used == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
- /* delete_values */
- if (delete_values != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, delete_values, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_usermgr_delete.delete_values = strdup(string);
- (*env)->ReleaseStringUTFChars(env, delete_values, string);
- if (event->adt_usermgr_delete.delete_values == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
-
- (void) adt_put_event((adt_event_data_t *)event, status, ret_val);
-
- cleanup:
-
- if (event->adt_usermgr_delete.object_name != NULL)
- free(event->adt_usermgr_delete.object_name);
-
- if (event->adt_usermgr_delete.domain != NULL)
- free(event->adt_usermgr_delete.domain);
-
- if (event->adt_usermgr_delete.name_service != NULL)
- free(event->adt_usermgr_delete.name_service);
-
- if (event->adt_usermgr_delete.auth_used != NULL)
- free(event->adt_usermgr_delete.auth_used);
-
- if (event->adt_usermgr_delete.delete_values != NULL)
- free(event->adt_usermgr_delete.delete_values);
-
- adt_free_event((adt_event_data_t *)event);
-}
-/* ARGSUSED */
-JNIEXPORT void JNICALL
-Java_com_sun_audit_AuditEvent_1usermgr_1modify_putEvent(
- JNIEnv *env,
- jobject self,
- jbyteArray jsession,
- jint status,
- jint ret_val,
- jstring object_name,
- jstring domain,
- jstring name_service,
- jstring auth_used,
- jstring changed_values)
-{
- adt_event_data_t *event;
- adt_session_data_t *session;
- char *string;
- char *locale;
-
- (void) j2c_pointer(env, jsession, (char **)&session);
-
- event = adt_alloc_event(session, ADT_usermgr_modify);
-
- /* object_name */
- if (object_name != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, object_name, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_usermgr_modify.object_name = strdup(string);
- (*env)->ReleaseStringUTFChars(env, object_name, string);
- if (event->adt_usermgr_modify.object_name == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
- /* domain */
- if (domain != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, domain, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_usermgr_modify.domain = strdup(string);
- (*env)->ReleaseStringUTFChars(env, domain, string);
- if (event->adt_usermgr_modify.domain == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
- /* name_service */
- if (name_service != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, name_service, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_usermgr_modify.name_service = strdup(string);
- (*env)->ReleaseStringUTFChars(env, name_service, string);
- if (event->adt_usermgr_modify.name_service == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
- /* auth_used */
- if (auth_used != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, auth_used, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_usermgr_modify.auth_used = strdup(string);
- (*env)->ReleaseStringUTFChars(env, auth_used, string);
- if (event->adt_usermgr_modify.auth_used == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
- /* changed_values */
- if (changed_values != NULL) {
- string = (char *)(*env)->GetStringUTFChars(
- env, changed_values, NULL);
- if (string == NULL)
- goto cleanup; /* exception thrown */
- event->adt_usermgr_modify.changed_values = strdup(string);
- (*env)->ReleaseStringUTFChars(env, changed_values, string);
- if (event->adt_usermgr_modify.changed_values == NULL) {
- locale = I18N_SETUP;
- local_throw(env, except_class,
- gettext("Out of memory"));
- (void) setlocale(LC_MESSAGES, locale);
- goto cleanup;
- }
- }
-
- (void) adt_put_event((adt_event_data_t *)event, status, ret_val);
-
- cleanup:
-
- if (event->adt_usermgr_modify.object_name != NULL)
- free(event->adt_usermgr_modify.object_name);
-
- if (event->adt_usermgr_modify.domain != NULL)
- free(event->adt_usermgr_modify.domain);
-
- if (event->adt_usermgr_modify.name_service != NULL)
- free(event->adt_usermgr_modify.name_service);
-
- if (event->adt_usermgr_modify.auth_used != NULL)
- free(event->adt_usermgr_modify.auth_used);
-
- if (event->adt_usermgr_modify.changed_values != NULL)
- free(event->adt_usermgr_modify.changed_values);
-
- adt_free_event((adt_event_data_t *)event);
-}
diff --git a/usr/src/lib/libadt_jni/common/mapfile-vers b/usr/src/lib/libadt_jni/common/mapfile-vers
deleted file mode 100644
index e87a88b92c..0000000000
--- a/usr/src/lib/libadt_jni/common/mapfile-vers
+++ /dev/null
@@ -1,71 +0,0 @@
-#
-# 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
-# or http://www.opensolaris.org/os/licensing.
-# 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 2006 Sun Microsystems, Inc. All rights reserved.
-# Use is subject to license terms.
-#
-# ident "%Z%%M% %I% %E% SMI"
-#
-
-SUNWprivate_1.1 {
- global:
- c2j_pointer;
- j2c_pointer;
- Java_com_sun_audit_AuditEvent_1admin_1authenticate_putEvent;
- Java_com_sun_audit_AuditEvent_1filesystem_1add_putEvent;
- Java_com_sun_audit_AuditEvent_1filesystem_1delete_putEvent;
- Java_com_sun_audit_AuditEvent_1filesystem_1modify_putEvent;
- Java_com_sun_audit_AuditEvent_1login_putEvent;
- Java_com_sun_audit_AuditEvent_1logout_putEvent;
- Java_com_sun_audit_AuditEvent_1network_1add_putEvent;
- Java_com_sun_audit_AuditEvent_1network_1delete_putEvent;
- Java_com_sun_audit_AuditEvent_1network_1modify_putEvent;
- Java_com_sun_audit_AuditEvent_1passwd_putEvent;
- Java_com_sun_audit_AuditEvent_1printer_1add_putEvent;
- Java_com_sun_audit_AuditEvent_1printer_1delete_putEvent;
- Java_com_sun_audit_AuditEvent_1printer_1modify_putEvent;
- Java_com_sun_audit_AuditEvent_1rlogin_putEvent;
- Java_com_sun_audit_AuditEvent_1role_1login_putEvent;
- Java_com_sun_audit_AuditEvent_1scheduledjob_1add_putEvent;
- Java_com_sun_audit_AuditEvent_1scheduledjob_1delete_putEvent;
- Java_com_sun_audit_AuditEvent_1scheduledjob_1modify_putEvent;
- Java_com_sun_audit_AuditEvent_1screenlock_putEvent;
- Java_com_sun_audit_AuditEvent_1screenunlock_putEvent;
- Java_com_sun_audit_AuditEvent_1serialport_1add_putEvent;
- Java_com_sun_audit_AuditEvent_1serialport_1delete_putEvent;
- Java_com_sun_audit_AuditEvent_1serialport_1modify_putEvent;
- Java_com_sun_audit_AuditEvent_1ssh_putEvent;
- Java_com_sun_audit_AuditEvent_1su_putEvent;
- Java_com_sun_audit_AuditEvent_1telnet_putEvent;
- Java_com_sun_audit_AuditEvent_1uauth_putEvent;
- Java_com_sun_audit_AuditEvent_1usermgr_1add_putEvent;
- Java_com_sun_audit_AuditEvent_1usermgr_1delete_putEvent;
- Java_com_sun_audit_AuditEvent_1usermgr_1modify_putEvent;
- Java_com_sun_audit_AuditSession_bsmAuditOn;
- Java_com_sun_audit_AuditSession_dupSession;
- Java_com_sun_audit_AuditSession_endSession;
- Java_com_sun_audit_AuditSession_exportSessionData;
- Java_com_sun_audit_AuditSession_getSessionId;
- Java_com_sun_audit_AuditSession_sessionAttr;
- Java_com_sun_audit_AuditSession_startSession;
- local:
- *;
-};
diff --git a/usr/src/lib/libbsm/Makefile b/usr/src/lib/libbsm/Makefile
index 6eec25553f..05ccd0441a 100644
--- a/usr/src/lib/libbsm/Makefile
+++ b/usr/src/lib/libbsm/Makefile
@@ -19,7 +19,7 @@
# CDDL HEADER END
#
#
-# Copyright 2006 Sun Microsystems, Inc. All rights reserved.
+# Copyright 2007 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
# ident "%Z%%M% %I% %E% SMI"
@@ -42,8 +42,6 @@ package := TARGET= package
.KEEP_STATE:
-all clean clobber delete install lint package: $(SUBDIRS)
-
COMMONDIR = common
#
@@ -51,6 +49,7 @@ COMMONDIR = common
#
GENHDRS = audit_uevents.h
HDRS = libbsm.h devices.h devalloc.h adt.h adt_event.h audit_private.h
+GENSRCS = $(COMMONDIR)/adt_xlate.c $(COMMONDIR)/adt_event.h
COMMONHDRS = $(HDRS:%=$(COMMONDIR)/%)
ROOTHDRDIR = $(ROOT)/usr/include/bsm
ROOTCHDRS = $(HDRS:%=$(ROOTHDRDIR)/%)
@@ -62,6 +61,9 @@ CHECKHDRS = $(GENHDRS:%.h=%.check)
$(ROOTHDRS) := FILEMODE = 0644
$(ROOTCHDRS) := FILEMODE = 0644
+all install lint package: $(GENSRCS) $(SUBDIRS)
+clean clobber delete: $(SUBDIRS)
+
#
# Macros for libbsm database files. These should probably be installed
# from somewhere else. Until we find that better place, install them
@@ -132,6 +134,12 @@ $(ROOTXMLFILES) := GROUP = bin
CPPFLAGS += -I$(COMMONDIR)
CPPFLAGS += -D_REENTRANT
+CLEANFILES += $(GENSRCS) $(GENHDRS)
+
+ADTXMLFILE = $(COMMONDIR)/adt.xml
+ADTXSDFILE = $(COMMONDIR)/adt.xsd
+AUDITXML = auditxml
+
.KEEP_STATE:
install: install_dirs install_data
@@ -141,6 +149,7 @@ install: install_dirs install_data
install_h: $(ROOTHDRDIR) $(ROOTHDRS) $(ROOTCHDRS)
check: $(CHECKHDRS) $(CHECKCHDRS)
+ xmllint --schema $(ADTXSDFILE) --noout $(ADTXMLFILE)
install_data: $(ESSRC) $(RESSRC) $(ROOTETCSECURITY) $(ETCSECURITYFILES) \
$(EETCSECURITYFILES) $(ROOTXMLFILES)
@@ -150,6 +159,17 @@ install_dirs: $(AUDITDIRS) $(ARSYMLNK) $(ROOTXMLDIRS)
audit_uevents.h: mkhdr.sh audit_event.txt
sh mkhdr.sh
+$(COMMONDIR)/adt_event.check: $(COMMONDIR)/adt_event.h
+ $(DOT_C_CHECK) $<
+
+clean clobber: clean_files
+
+clean_files:
+ -$(RM) $(CLEANFILES)
+
+$(GENSRCS): $(ADTXMLFILE) $(AUDITXML)
+ $(PERL) $(AUDITXML) $(ADTXMLFILE)
+
$(ETCSECURITYFILES) $(EETCSECURITYFILES) $(RESA): \
$(ETCSECURITY) \
$(ROOTETCSECURITY)
diff --git a/usr/src/lib/libbsm/auditxml b/usr/src/lib/libbsm/auditxml
new file mode 100644
index 0000000000..5f8cfef0c3
--- /dev/null
+++ b/usr/src/lib/libbsm/auditxml
@@ -0,0 +1,1060 @@
+#!/usr/perl5/bin/perl -w
+#
+# 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
+# or http://www.opensolaris.org/os/licensing.
+# 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 2007 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "%Z%%M% %I% %E% SMI"
+#
+
+# auditxml [-d] <xml input file>
+
+# auditxml takes the audit record description (.xml file) and
+# generates the files needed for the C audit api.
+
+use auditxml;
+use Getopt::Std;
+use vars qw($opt_d);
+use strict;
+
+
+our $debug = 0; # normal use is to set via the file being parsed.
+ # <debug set="on"/> or <debug set="off"/> or <debug/>
+ # if the set attribute is omitted, debug state is toggled
+ # Override with appDebug, but toggle won't do what you
+ # want.
+my $appDebug = 0; # used after return from "new auditxml";
+
+my $genNotice = "
+DO NOT EDIT. This file is auto generated by the Solaris Audit
+system from adt.xml.
+
+See http://opensolaris.org/os/project/audit/
+";
+
+# trim leading/trailing newlines
+$genNotice =~ s/^\n//s;
+$genNotice =~ s/\n$//s;
+my $prog = $0; $prog =~ s|.*/||g;
+my $usage = "usage: $prog [-d] file.xml\n";
+
+getopts('d');
+
+$appDebug = $opt_d;
+
+my $uniLabel = "adr";
+my $xlateUniLabelInc = 0;
+
+die $usage if ($#ARGV < 0);
+
+# where everything comes from and where it goes:
+
+my $bsmBuildPath = "./common";
+my $xlateFile = "$bsmBuildPath/adt_xlate.c";
+my $headerFile = "$bsmBuildPath/adt_event_N.h";
+
+my $doc = new auditxml ($ARGV[0]); # input XML file
+
+$debug = $appDebug;
+
+my %xlateEventTable = ();
+my @xlateTypeList = ();
+my %xlateTypeList = ();
+my %eventAPI = ();
+my %eventExtra = ();
+my %headers = ();
+my %externalIdNo = ();
+my @outputState = ();
+my %nameTranslation = ();
+my @xlateDefaults = ();
+my %xlateDefault = ();
+my %msg_list = ();
+
+my $event;
+while ($event = $doc->getNextEvent()) {
+ my $eventId = $event->getId();
+ my $eventHeader = $event->getHeader();
+ my $idNo = $event->getIdNo();
+ $externalIdNo{$eventId} = $idNo;
+ addHeader($eventHeader) if defined ($eventHeader);
+ my $super;
+ my $omit = $event->getOmit();
+ my $eventType = '';
+ if ($super = $event->getSuperClass()) {
+ $event = $super;
+ $eventType = 'instance';
+ } else {
+ $eventType = $event->getType();
+ }
+
+ # header file for API use
+ generateAPIFile($event, $eventId, $eventType, $eventHeader, $idNo)
+ unless $omit eq 'always';
+
+ # c file table for translation
+ generateTableC($event, $eventId, $eventType, $eventHeader, $omit);
+}
+
+my $textList;
+while ($textList = $doc->getNextMsgId()) {
+ generateMsgLists($textList); # enum -> text mappings
+}
+
+printTableC($xlateFile);
+printAPIFile($headerFile, $doc);
+
+exit 0;
+
+
+sub printTableC {
+ my $file = shift;
+
+ unless (open(Cfile, ">$file")) {
+ print STDERR "can't open output file ($file): $!\n";
+ return;
+ }
+
+ my $notice = $genNotice;
+ $notice =~ s/\n/\n * /gs;
+ $notice =~ s/\s+\n/\n/gs;
+ print Cfile <<EOF;
+/*
+ * $notice
+ */
+
+#include <bsm/libbsm.h>
+#include <adt_xlate.h>
+#include <libintl.h>
+
+EOF
+ print Cfile "#ifndef _PRAUDIT\n";
+ print Cfile "/* Internal data type definitions */\n\n";
+ my $extDef;
+ foreach $extDef (@xlateTypeList) {
+ print Cfile "static $extDef\n";
+ }
+ @xlateTypeList = ();
+
+ print Cfile "\n/* External event structure to internal event structure */\n\n";
+
+ my @pointers = ();
+
+ foreach my $eventId (sort keys %xlateEventTable) {
+ if ($xlateEventTable{$eventId}) {
+ my ($ref1, $eventType, $firstToken, $eventHeader) =
+ @{$xlateEventTable{$eventId}};
+ my @entries = @$ref1;
+ my $entry;
+ my $entries = $#entries;
+ my $count = $entries + 1;
+ my $externalName = $nameTranslation{$eventId};
+ my $externalRoot = $externalName;
+ $externalRoot =~ s/AUE_//;
+ my $structName = "XX_$externalRoot";
+ my $root = $eventId;
+ $root =~ s/AUE_//;
+ my $externalId = $eventId;
+ $externalId =~ s/AUE_/ADT_/;
+
+ unless ($eventType eq 'generic') {
+ print Cfile "static struct entry $structName\[$count\] = {\n";
+ foreach $entry (@entries) {
+ if ($entries--) {
+ $entry =~ s/EOL/,/;
+ }
+ else {
+ $entry =~ s/EOL//;
+ }
+ $entry =~ s/selfReference/$structName/;
+ print Cfile "\t$entry\n";
+ }
+ print Cfile "};\n";
+
+ print Cfile "static struct translation X_$externalRoot = {\n";
+ push (@pointers, "X_$externalRoot");
+
+ print Cfile "\t0,\n"; # tx_offsetsCalculated = 0
+ print Cfile "\t$externalId,\n";
+ print Cfile "\t$externalName,\n";
+
+ print Cfile "\t$count,\n";
+ print Cfile "\t&XX_$externalRoot\[$firstToken\],\n";
+ print Cfile "\t&XX_$externalRoot\[0\]\n};\n";
+ }
+ } else {
+ print STDERR "expected entry for $eventId but none found\n";
+ }
+ }
+
+ my $count = $#pointers + 2;
+ print Cfile "struct translation *xlate_table[$count] = {\n";
+
+ my $firstEvent = 1;
+ foreach my $eventId (@pointers) {
+ if ($firstEvent) {
+ $firstEvent = 0;
+ }
+ else {
+ print Cfile ",\n";
+ }
+ print Cfile "\t&$eventId";
+ }
+ print Cfile ",\n\tNULL\n};\n";
+
+ # generate the adt_preload() function
+
+ print Cfile <<EOF;
+
+void
+adt_preload(au_event_t event_id, adt_event_data_t *event_data)
+{
+ switch (event_id) {
+EOF
+
+ foreach my $id (@xlateDefaults) {
+ my $adtID = $id;
+ $adtID =~ s/AUE/ADT/;
+
+ print Cfile <<EOF;
+ case $adtID:
+EOF
+ my @preloads = @{$xlateDefault{$id}};
+ while (@preloads) {
+ my $fieldName = shift @preloads;
+ my $default = shift @preloads;
+ my $lcid = lc $id;
+ $lcid =~ s/aue_/adt_/;
+
+ print Cfile <<EOF;
+ event_data->$lcid.$fieldName = $default;
+EOF
+ }
+
+ print Cfile <<EOF;
+ break;
+EOF
+ }
+
+ print Cfile <<EOF;
+ default:
+ break;
+ }
+}
+#endif
+
+/* message lists */
+
+EOF
+ my $listName;
+ my @listName;
+ foreach $listName (sort keys %msg_list) {
+ my ($listRef, $headref) = @{$msg_list{$listName}};
+ my ($header, $start, $public, $deprecated) = @$headref;
+
+ my @listValue = @$listRef;
+ my $listValue;
+ my $listLength = $#listValue + 1;
+
+ $listName = 'NULL' if ($#listValue < 0);
+
+ push (@listName, [$listName, $listLength - 1, $start, $public]);
+
+ next if ($#listValue < 0);
+
+ print Cfile "/* Deprecated message list */\n" if ($deprecated);
+ print Cfile "static char *msg_$listName\[$listLength] = {\n";
+
+ my $ffirst = 1;
+ foreach $listValue (@listValue) {
+ print Cfile ",\n" unless $ffirst;
+ $ffirst = 0;
+ my ($id, $text) = split(/\s*::\s*/, $listValue);
+ if ($text) {
+ print Cfile "\t\"$text\"";
+ }
+ else {
+ print Cfile "\tNULL";
+ }
+ }
+ print Cfile "\n};\n";
+ }
+ print Cfile "\nstruct msg_text adt_msg_text[", $#listName + 1,
+ "] = {\n";
+ my $ffirst = 1;
+ foreach $listName (@listName) {
+ my ($name, $max, $start) = @$listName;
+ $start = -$start if $start;
+ print Cfile ",\n" unless $ffirst;
+ $ffirst = 0;
+ $name = "msg_$name" if ($name ne 'NULL');
+ print Cfile "\t{0, $max, $name, $start}";
+ }
+ print Cfile "\n};\n";
+
+ close Cfile;
+}
+
+sub printAPIFile {
+ my $file = shift;
+ my $xmlDoc = shift;
+
+ my @Hfile;
+ @Hfile = openHeaderFiles($file);
+
+ my $notice = $genNotice;
+ $notice =~ s/\n/\n * /gs;
+ $notice =~ s/\s+\n/\n/gs;
+
+ foreach my $header (keys %headers) {
+ next unless $Hfile[$header];
+ *Hfile = $Hfile[$header];
+ my $include = "adt.h";
+ my $adt_event_n = "_ADT_EVENT_H";
+ if ($header > 0) {
+ $include = "adt_event.h";
+ $adt_event_n = "_ADT_EVENT_".$header."_H";
+ }
+ print Hfile <<EOF;
+/*
+ * $notice
+ */
+
+#ifndef $adt_event_n
+#define $adt_event_n
+
+#include <bsm/$include>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+ * adt_put_event() status values. Positive values are for kernel-generated
+ * failure, -1 for user-space. For ADT_SUCCESS, the adt_put_event() return_val
+ * is not used; the convention is to set it to ADT_SUCCESS.
+ */
+#define ADT_SUCCESS 0
+#define ADT_FAILURE -1
+
+EOF
+ }
+
+ foreach my $listName (sort keys %msg_list) {
+ my $shortName = uc $listName;
+ $shortName =~ s/_TEXT//;
+
+ my ($listRef, $headref) = @{$msg_list{$listName}};
+ my ($header, $start, $public, $deprecated) = @$headref;
+ next unless $Hfile[$header];
+ *Hfile = $Hfile[$header];
+
+ print Hfile "/* Deprecated message list */\n" if $deprecated;
+ print Hfile "#define\tADT_$shortName\t$start\n" if $start;
+
+ my @listValue = @$listRef;
+ next unless ($#listValue >= 0);
+ print Hfile "enum\tadt_$listName", " {\n";
+
+ my $listValue;
+ my $i = 0;
+ my $j = $#listValue;
+ my $comma = ',';
+ foreach $listValue (@listValue) {
+ my ($id, $text) = split(/\s*::\s*/, $listValue);
+ $comma = '' if $i++ == $j;
+ if ($start) {
+ $start = " = $start$comma";
+ } else {
+ $start = "$comma\t";
+ }
+ $text = "(no token will be generated)" unless $text;
+ print Hfile "\tADT_$shortName", "_$id$start\t/* $text */\n";
+ $start = '';
+ }
+ print Hfile "};\n";
+ }
+
+ # generate defines for ADT_* external event names
+
+ foreach my $eventId (sort keys %eventAPI) {
+ my ($header, $idNo) = @{$eventExtra{$eventId}};
+ unless (defined ($header)) {
+ print STDERR "missing header selection for $eventId\n";
+ next;
+ }
+ *Hfile = $Hfile[$header];
+ next unless $Hfile[$header];
+
+ my $l = length($eventId) + 8; # label plus preceding #define\t
+ $l = 5 - int(($l + 8)/8);
+ $l = 1 if $l < 1;
+ my $tab = "\t" x $l;
+
+ print STDERR "missing id number for $eventId\n" unless $idNo;
+
+ $eventId =~ s/AUE_/ADT_/;
+ print Hfile "#define\t$eventId$tab$idNo\n";
+ }
+
+
+ # generate per-event structures
+
+ foreach my $eventId (sort keys %eventAPI) {
+ my ($header, $idNo) = @{$eventExtra{$eventId}};
+ my $dataId = $eventId;
+ $dataId =~ s/^AUE_/adt_/;
+ unless(defined ($header)) {
+ print STDERR "$eventId is missing the header assignment\n";
+ next;
+ }
+ *Hfile = $Hfile[$header];
+ next unless $Hfile[$header];
+
+ my $externalId = $eventId;
+ $externalId =~ s/AUE_/ADT_/;
+
+ print Hfile "\nstruct $dataId {\t/* $externalId */\n";
+
+ my @entries = @{$eventAPI{$eventId}};
+ my $entry;
+ if ($#entries < 0) {
+ print Hfile "\tint\tdummy;\t/* not used */\n";
+ } else {
+ foreach $entry (@entries) {
+ $entry =~ s/termid/adt_termid_t/;
+ print Hfile "\t$entry\n";
+ }
+ }
+ print Hfile "};\n";
+ $eventId =~ s/^AUE_/adt_/;
+ print Hfile "typedef struct $dataId $eventId","_t;\n";
+ }
+
+ foreach my $header (sort keys %headers) {
+ $outputState[$header] = 0;
+ }
+
+ foreach my $eventId (sort keys %eventAPI) {
+ my ($header, $idNo) = @{$eventExtra{$eventId}};
+ unless(defined ($header)) {
+ # don't print duplicate error message
+ next;
+ }
+ *Hfile = $Hfile[$header];
+ next unless $Hfile[$header];
+ if ($outputState[$header] == 0) {
+ $outputState[$header] = 1;
+ my $suffix = '';
+ $suffix = "_$header" if $header;
+ print Hfile "\nunion adt_event_data$suffix {\n";
+ }
+ my $elementName = $eventId;
+ $elementName =~ s/^AUE_/adt_/;
+ $eventId =~ s/^AUE_/adt_/;
+ $elementName =~ s/_t$//;
+
+ print Hfile "\t\t$eventId","_t\t$elementName;\n";
+ }
+ foreach my $header (sort keys %headers) {
+ if ($outputState[$header]) {
+ *Hfile = $Hfile[$header];
+ next unless $Hfile[$header];
+ print Hfile "};\n";
+ }
+ }
+ foreach my $header (keys %headers) {
+ next unless $Hfile[$header];
+ *Hfile = $Hfile[$header];
+ my $adt_event_n = "_ADT_EVENT_H";
+ if ($header > 0) {
+ $adt_event_n = "_ADT_EVENT_".$header."_H";
+ }
+ print Hfile <<EOF;
+
+
+#ifndef ADT_PRIVATE
+#define ADT_PRIVATE
+
+/*
+ * These interfaces are project private and will change without
+ * notice as needed for the BSM API project.
+ */
+
+extern void adt_get_auid(const adt_session_data_t *, au_id_t *);
+extern void adt_set_auid(const adt_session_data_t *, const au_id_t);
+
+extern void adt_get_mask(const adt_session_data_t *, au_mask_t *);
+extern void adt_set_mask(const adt_session_data_t *, const au_mask_t *);
+
+extern void adt_get_termid(const adt_session_data_t *, au_tid_addr_t *);
+extern void adt_set_termid(const adt_session_data_t *,
+ const au_tid_addr_t *);
+
+extern void adt_get_asid(const adt_session_data_t *, au_asid_t *);
+extern void adt_set_asid(const adt_session_data_t *, const au_asid_t);
+
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* $adt_event_n */
+EOF
+ }
+ closeHeaderFiles(@Hfile);
+}
+
+sub generateTableC {
+ my $event = shift;
+ my $eventId = shift;
+ my $eventType = shift;
+ my $eventHeader = shift;
+ my $omit = shift;
+
+ my %tokenType = (
+ 'acl' => 'AUT_ACL',
+ 'arbitrary' => 'AUT_ARBITRARY',
+ 'arg' => 'AUT_ARG',
+ 'attr' => 'AUT_ATTR',
+ 'command' => 'AUT_CMD',
+ 'command_1' => 'ADT_CMD_ALT', # dummy token id
+ 'date' => 'AUT_TEXT',
+ 'exec_args' => 'AUT_EXEC_ARGS',
+ 'exec_env' => 'AUT_EXEC_ENV',
+ 'exit' => 'AUT_EXIT',
+ 'file' => 'AUT_FILE',
+ 'fmri' => 'AUT_FMRI',
+ 'groups' => 'AUT_GROUPS',
+ # 'header' => 'AUT_HEADER', # not used
+ 'in_addr' => 'AUT_IN_ADDR',
+ 'tid' => 'AUT_TID',
+ 'ipc' => 'AUT_IPC',
+ 'ipc_perm' => 'AUT_IPC_PERM',
+ 'iport' => 'AUT_IPORT',
+ 'label' => 'AUT_LABEL',
+ 'newgroups' => 'AUT_NEWGROUPS',
+ 'opaque' => 'AUT_OPAQUE',
+ 'path' => 'AUT_PATH',
+ 'path_list' => '-AUT_PATH', # dummy token id
+ 'process' => 'AUT_PROCESS',
+ 'priv_effective' => 'ADT_AUT_PRIV_E', # dummy token id
+ 'priv_limit' => 'ADT_AUT_PRIV_L', # dummy token id
+ 'priv_inherit' => 'ADT_AUT_PRIV_I', # dummy token id
+ 'return' => 'AUT_RETURN',
+ 'seq' => 'AUT_SEQ',
+ 'socket' => 'AUT_SOCKET',
+ 'socket-inet' => 'AUT_SOCKET_INET',
+ 'subject' => 'AUT_SUBJECT',
+ 'text' => 'AUT_TEXT',
+ # 'trailer' => 'AUT_TRAILER', # not used
+ 'uauth' => 'AUT_UAUTH',
+ 'zonename' => 'AUT_ZONENAME'
+ );
+
+ my @xlateEntryList = ();
+
+ my $external = $event->getExternal();
+ my $internal = $event->getInternal();
+
+ unless ($external) {
+ print STDERR "No external object captured for event $eventId\n";
+ return;
+ }
+ if ($eventType) {
+ $nameTranslation{$eventId} = $eventId;
+ } else {
+ $nameTranslation{$eventId} = $external->getInternalName();
+ }
+ unless ($internal) {
+ print STDERR "No internal object captured for event $eventId\n";
+ return;
+ }
+ my @entryRef = $internal->getEntries();
+ my $entryRef;
+ my @tokenOrder = ();
+ my $firstTokenIndex = 0; # djdj not used yet, djdj BUG!
+ # needs to be used by translate table
+
+ if ($internal->isReorder()) { # prescan the entry list to get the token order
+ my @inputOrder;
+ foreach $entryRef (@entryRef) {
+ my ($intEntry, $entry) = @$entryRef;
+ push (@inputOrder, $intEntry->getAttr('order'));
+ }
+
+ my $i; # walk down the inputOrder list once
+ my $k = 1; # discover next in line
+ my $l = 0; # who should point to next in line
+ for ($i = 0; $i <= $#inputOrder; $i++) {
+ my $j;
+ for ($j = 0; $j <= $#inputOrder; $j++) {
+ if ($k == $inputOrder[$j]) {
+ if ($k == 1) {
+ $firstTokenIndex = $j;
+ } else {
+ $tokenOrder[$l] = "&(selfReference[$j])";
+ }
+ $l = $j;
+ last;
+ }
+ }
+ $k++;
+ }
+ $tokenOrder[$l] = 'NULL';
+ }
+ else { # default order -- input order same as output
+ my $i;
+ my $j;
+ for ($i = 0; $i < $#entryRef; $i++) {
+ my $j = $i + 1;
+ $tokenOrder[$i] = "&(selfReference[$j])";
+ }
+ $tokenOrder[$#entryRef] = 'NULL';
+ }
+
+ my $sequence = 0;
+ foreach $entryRef (@entryRef) {
+ my ($intEntry, $entry) = @$entryRef;
+ my $entryId = $entry->getAttr('id');
+
+ my ($extEntry, $unusedEntry, $tokenId) =
+ $external->getEntry($entryId);
+ my $opt = $extEntry->getAttr('opt');
+
+ if ($opt eq 'none') {
+ if (defined ($doc->getToken($tokenId))) {
+ if (defined ($tokenType{$tokenId})) {
+ $tokenId = $tokenType{$tokenId};
+ }
+ else {
+ print STDERR "token id $tokenId not implemented\n";
+ }
+ }
+ else {
+ print STDERR "token = $tokenId is undefined\n";
+ $tokenId = 'error';
+ }
+ my ($xlate, $jni) =
+ formatTableEntry ('', $tokenId, $eventId, '', 0, 0, $tokenOrder[$sequence],
+ 'NULL', '');
+ push (@xlateEntryList, $xlate);
+ }
+ else {
+ my $dataType = $extEntry->getAttr('type');
+ $dataType =~ s/\s+//g; # remove blanks (char * => char*)
+
+ my $enumGroup = '';
+ if ($dataType =~ /^msg/i) {
+ $enumGroup = $dataType;
+ $enumGroup =~ s/^msg\s*//i;
+ $enumGroup = 'adt_' . $enumGroup;
+ }
+ my $required = ($opt eq 'required') ? 1 : 0;
+ my $tsol = 0;
+ my $tokenId = $intEntry->getAttr('token');
+ my $token;
+ my $tokenName;
+ my $tokenFormat = $intEntry->getAttr('format');
+ if (defined ($tokenFormat)) {
+ $tokenFormat = "\"$tokenFormat\"";
+ }
+ else {
+ $tokenFormat = 'NULL';
+ }
+
+ if (defined ($token = $doc->getToken($tokenId))) {
+ $tsol = (lc $token->getUsage() eq 'tsol') ? 1 : 0;
+ if (defined ($tokenType{$tokenId})) {
+ $tokenName = $tokenType{$tokenId};
+ }
+ else {
+ print STDERR "token id $tokenId not implemented\n";
+ }
+ }
+ else {
+ print STDERR
+ "$tokenId is an unimplemented token ($entryId in $eventId)\n";
+ $tokenName = 'AUT_TEXT';
+ }
+ my ($xlate, $jni) =
+ formatTableEntry($entryId, $tokenName, $eventId, $dataType, $required,
+ $tsol, $tokenOrder[$sequence], $tokenFormat,
+ $enumGroup, (uc $omit eq 'JNI'));
+ push (@xlateEntryList, $xlate);
+ }
+ $sequence++;
+ }
+ $xlateEventTable{$eventId} = [\@xlateEntryList, $eventType, $firstTokenIndex,
+ $eventHeader];
+}
+
+sub formatTableEntry {
+ my ($id, $token, $eventId, $type, $required, $tsol, $sequence, $format, $enumGroup,
+ $omitJNI) = @_;
+
+
+ # does this map belong in the xml source? (at least the defaults?)
+ # fill in the default value only if it is other than zero.
+ # base type adt name, default value
+ my %entryDef = ( 'au_asid_t' => ['ADT_UINT32', ''],
+ 'uint_t' => ['ADT_UINT32', ''],
+ 'int' => ['ADT_INT', ''],
+ 'int32_t' => ['ADT_INT32', ''],
+ 'uid_t' => ['ADT_UID', 'AU_NOAUDITID'],
+ 'gid_t' => ['ADT_GID', 'AU_NOAUDITID'],
+ 'uid_t*' => ['ADT_UIDSTAR', ''],
+ 'gid_t*' => ['ADT_GIDSTAR', ''],
+ 'char' => ['ADT_CHAR', ''],
+ 'char*' => ['ADT_CHARSTAR', ''],
+ 'char**' => ['ADT_CHAR2STAR', ''],
+ 'long' => ['ADT_LONG', ''],
+ 'pid_t' => ['ADT_PID', ''],
+ 'priv_set_t*' => ['ADT_PRIVSTAR', ''],
+ 'ulong_t' => ['ADT_ULONG', ''],
+ 'uint16_t', => ['ADT_UINT16', ''],
+ 'uint32_t' => ['ADT_UINT32', ''],
+ 'uint32_t*' => ['ADT_UINT32STAR', ''],
+ 'uint32_t[]' => ['ADT_UINT32ARRAY', ''],
+ 'uint64_t' => ['ADT_UINT64', ''],
+ 'uint64_t*' => ['ADT_UINT64STAR', ''],
+ 'm_label_t*' => ['ADT_MLABELSTAR', ''],
+ );
+ my $xlateLabel = $uniLabel.$xlateUniLabelInc;
+ my $xlateLabelInc = 0;
+ my $xlateLine = '';
+ my @jniLine = ();
+
+ # the list handling should be a simple loop with a loop of one
+ # falling out naturally.
+
+ unless ($type =~ /,/) { # if list, then generate sequence of entries
+ my $dataType;
+ my $dataSize;
+ my $xlateLabelRef = '';
+
+ my $arraySize = '';
+ $arraySize = $1 if ($type =~ s/\[(\d+)\]/[]/);
+
+ my $entryType = ${$entryDef{$type}}[0];
+
+ my @xlateType = (); # for adt_xlate.c
+ my $typeCount = 1;
+
+ if ($entryType) {
+ $dataType = $entryType;
+ $type =~ s/([^*]+)\s*(\*+)/$1 $2/;
+ $type =~ s/\[\]//;
+ $dataSize = "sizeof ($type)";
+ if ($arraySize) {
+ $dataSize = "$arraySize * " . $dataSize;
+ }
+ $xlateLine = "{{$dataType, $dataSize}}";
+ push (@jniLine, [$id, $dataType, $format, $enumGroup, $required]);
+ } elsif ($type eq '') {
+ $xlateLabelRef = 'NULL';
+ } elsif ($type =~ /^msg/i) {
+ $type =~ s/^msg//i;
+ $dataType = 'ADT_MSG';
+ my $dataEnum = 'ADT_LIST_' . uc $type;
+ $xlateLine = "{{$dataType, $dataEnum}}";
+ push (@jniLine, [$id, $dataType, $format, $enumGroup, $required]);
+ } elsif ($type =~ /time_t/i) {
+ $dataType = 'ADT_DATE';
+ $dataSize = "sizeof (time_t)";
+ $xlateLine = "{{$dataType, $dataSize}}";
+ push (@jniLine, [$id, $dataType, $format, $enumGroup, $required]);
+ } elsif ($type =~ /termid/i) {
+ $dataType = 'ADT_TERMIDSTAR';
+ $dataSize = "sizeof (au_tid_addr_t *)";
+ $xlateLine = "{{$dataType, $dataSize}}";
+ push (@jniLine, [$id, $dataType, $format, $enumGroup, $required]);
+ } elsif ($omitJNI) {
+ $xlateLabelRef = 'NULL';
+ } else {
+ print STDERR "$type is not an implemented data type\n";
+ $xlateLabelRef = 'NULL';
+ }
+ if ($xlateLine && !($xlateTypeList{$xlateLine})) {
+ $xlateTypeList{$xlateLine} = $xlateLabel;
+ push (@xlateTypeList, "datadef\t$xlateLabel\[1\] =\t$xlateLine;");
+ $xlateLabelInc = 1;
+ } else {
+ $xlateLabel = $xlateTypeList{$xlateLine};
+ }
+ $xlateLabelRef = '&' . $xlateLabel . '[0]'
+ unless $xlateLabelRef eq 'NULL';
+
+ # "EOL" is where a comma should go unless end of list
+ $xlateLine = "{$token,\t1,\t$xlateLabelRef,\t$sequence,\n" .
+ "\t\t0,\t$required,\t$tsol,\t$format}EOL";
+
+ if (${$entryDef{$type}}[1]) {
+ my @list = ();
+ if ($xlateDefault{$eventId}) {
+ @list = @{$xlateDefault{$eventId}};
+ } else {
+ push (@xlateDefaults, $eventId);
+ }
+ push (@list, $id, ${$entryDef{$type}}[1]);
+ $xlateDefault{$eventId} = \@list;
+ }
+ } else { # is a list
+ my @type = split(/,/, $type);
+ my @arraySize = ();
+ my @id = split(/,/, $id);
+ my @jniId = @id;
+ my $dataType;
+ my $typeCount = ($#type + 1);
+ my @xlateType = ();
+ my @default = ();
+
+ foreach my $dtype (@type) {
+ my $jniId = shift @jniId;
+ my $id = shift @id;
+ my $arraySize = '';
+ $arraySize = $1 if ($dtype =~ s/\[(\d+)\]/[]/);
+
+ my $entryType = ${$entryDef{$dtype}}[0];
+ if ($entryType) {
+ my $type = $dtype;
+ $type =~ s/([^*]+)\s*(\*+)/$1 $2/;
+ $type =~ s/\[\]//;
+
+ my $sizeString = "sizeof";
+ $sizeString = "$arraySize * " . $sizeString if $arraySize;
+ push (@xlateType, "\{$entryType, $sizeString ($type)\}");
+ push (@jniLine, [$jniId, $entryType, $format, $enumGroup, $required]);
+ } elsif ($type =~ /^msg/i) {
+ $type =~ s/^msg//i;
+ $dataType = 'ADT_MSG';
+ my $dataEnum = 'ADT_LIST_' . uc $type;
+ push (@xlateType, "\{$dataType, $dataEnum\}};");
+ push (@jniLine, [$jniId, $dataType, $format, $enumGroup, $required]);
+ } elsif ($type =~ /time_t/i) {
+ $dataType = 'ADT_DATE';
+ push (@xlateType, "\{$entryType, sizeof ($type)\}");
+ push (@jniLine, [$jniId, $entryType, $format, $enumGroup, $required]);
+ } elsif ($type =~ /termid/i) {
+ $dataType = 'ADT_TERMIDSTAR';
+ push (@xlateType, "\{$dataType, sizeof (au_tid_addr_t *)\}");
+ push (@jniLine, [$jniId, $dataType, $format, $enumGroup, $required]);
+ } elsif ($omitJNI) {
+ # nothing to do.
+ } else {
+ print STDERR "$dtype is not an implemented data type\n";
+ }
+ if (${$entryDef{$dtype}}[1]) {
+ push (@default, $id, ${$entryDef{$dtype}}[1]);
+ }
+ }
+ my $xlateArray = "\[$typeCount\] =\t{" . join(",\n\t\t\t\t", @xlateType) . "};";
+
+ unless ($xlateTypeList{$xlateArray}) {
+ $xlateTypeList{$xlateArray} = $xlateLabel;
+ $xlateArray = "datadef\t$xlateLabel" . $xlateArray;
+ push (@xlateTypeList, $xlateArray);
+ $xlateLabelInc = 1;
+ } else {
+ $xlateLabel = $xlateTypeList{$xlateArray};
+ }
+ $xlateLine =
+ "{$token,\t$typeCount,\t&$xlateLabel\[0\],\t$sequence,\n" .
+ "\t\t0,\t$required,\t$tsol,\t$format}EOL";
+ if (@default) {
+ my @list = ();
+ if ($xlateDefault{$eventId}) {
+ @list = @{$xlateDefault{$eventId}};
+ } else {
+ push (@xlateDefaults, $eventId);
+ }
+ push (@list, @default);
+ $xlateDefault{$eventId} = \@list;
+ }
+ }
+ $xlateUniLabelInc++ if $xlateLabelInc;
+ return ($xlateLine, \@jniLine);
+}
+
+sub generateAPIFile {
+ my $event = shift;
+ my $eventId = shift;
+ my $eventType = shift;
+ my $eventHeader = shift;
+ my $idNo = shift;
+
+ my @entryList = ();
+
+ my $external = $event->getExternal();
+
+ if ($eventType && $debug) {
+ print STDERR "event $eventId is of type $eventType\n";
+ }
+
+ return unless $external;
+
+ my ($extEntry, $entry, $tokenId, $format);
+ while (($extEntry, $entry, $tokenId, $format) = $external->getNextEntry()) {
+ last unless $entry;
+ my $entryId = $entry->getAttr('id');
+
+ unless (defined $entryId) {
+ print STDERR "undefined entry id for external $eventId\n";
+ next;
+ }
+ my $option = $extEntry->getAttr('opt');
+ next if ($option eq 'none');
+
+ if (defined (my $token = $doc->getToken($tokenId))) {
+ $option = 'Trusted Solaris only'
+ if (lc $token->getUsage() eq 'tsol') ? 1 : 0;
+ }
+ $option .= " (format: $format)" if $format;
+
+ my $dataType = $extEntry->getAttr('type');
+ unless (defined $dataType) {
+ print STDERR "no type defined for external tag for $eventId\n";
+ $dataType = "error";
+ }
+
+ my $comment = $entry->getContent();
+
+ if (($dataType =~ /,/) || ($entryId =~ /,/)) {
+ my @type = split(/\s*,\s*/, $dataType);
+ my @id = split(/\s*,\s*/, $entryId);
+ if ($#type != $#id) {
+ print STDERR
+ "number of data types ($dataType) does not match number of ids ($entryId)",
+ " for event $eventId\n";
+ if ($#type < $#id) {
+ $#id = $#type;
+ }
+ else {
+ $#type = $#id;
+ }
+ }
+
+ my $i;
+ my $line = '';
+ $line = "/* $comment */\n\t" if defined $comment;
+ for ($i = 0; $i <= $#type; $i++) {
+ my ($primitive, $dereference) =
+ ($type[$i] =~ /([^\*]+)\s*(\**)/);
+ $id[$i] .= $1 if ($primitive =~ s/(\[\d+\])//);
+ $line .= "$primitive\t$dereference$id[$i];\t/* $option */";
+ push (@entryList, $line);
+ $line = '';
+ }
+ }
+ else {
+ my $line = '';
+ $line = "/* $comment */\n\t" if defined $comment;
+ if ($dataType =~ /^msg/i) {
+ $dataType =~ s/^msg\s*//i;
+ $line .= "enum adt_$dataType" . "\t$entryId;\t/* $option */";
+ }
+ elsif ($dataType =~ /time_t/i) {
+ $line .= "time_t\t$entryId;\t/* $option */";
+ }
+ else {
+ my ($primitive, $dereference) =
+ ($dataType =~ /([^\*]+)\s*(\**)/);
+ $entryId .= $1 if ($primitive =~ s/(\[\d+\])//);
+ $line .= "$primitive\t$dereference$entryId;\t/* $option */";
+ }
+ push (@entryList, $line);
+ }
+ }
+ $eventExtra{$eventId} = [$eventHeader, $idNo];
+ $eventAPI{$eventId} = \@entryList;
+}
+
+sub generateMsgLists {
+ my $textList = shift;
+
+ my $textName = $textList->getId();
+ my $header = $textList->getHeader();
+ my $start = $textList->getMsgStart();
+ my $public = $textList->getMsgPublic();
+ my $deprecated = $textList->getDeprecated();
+
+ addHeader($header);
+ print "$textName starts at $start\n" if $debug;
+
+ my $entry;
+ my @entry;
+ while ($entry = $textList->getNextMsg()) {
+ if ($debug) {
+ my ($id, $text) = split(/\s*::\s*/, $entry);
+ print " $id = $text\n";
+ }
+ unshift (@entry, $entry);
+ }
+ $msg_list{$textName} =
+ [\@entry, [$header, $start, $public, $deprecated]];
+}
+
+sub addHeader {
+ my $header_index = shift;
+
+ die "invalid adt_event_N.h index: $header_index\n"
+ unless ($header_index =~ /^\d+$/);
+
+ $headers{$header_index} = $header_index;
+}
+
+# $header = 0 is a special case; it is for adt_event.h
+# $header > 0 creates adt_event_N.h, where N = $header
+
+sub openHeaderFiles {
+ my $outfile = shift; # path to an adt_event_N.h file
+
+ my $header;
+ my @Hfile = (); # potentially sparse array of file handles
+ my @HfileName = (); # parallel array to Hfile, file name (not path)
+ foreach $header (sort keys %headers) {
+ my $file = $outfile;
+ if ($header > 0) {
+ $file =~ s/_N/_$header/;
+ } else {
+ $file =~ s/_N//;
+ }
+ unless (open($Hfile[$header], ">$file")) {
+ print STDERR "can't open output ($file): $!\n";
+ $HfileName[$header] = '';
+ $Hfile[$header] = '';
+ } else {
+ my @tmp = split(/\//, $file);
+ $HfileName[$header] = $tmp[$#tmp];
+ }
+ }
+ return (@Hfile);
+}
+
+sub closeHeaderFiles {
+ my @Hfile = @_;
+
+ my $header;
+ foreach $header (sort keys %headers) {
+ close $Hfile[$header] if $Hfile[$header];
+ }
+}
diff --git a/usr/src/lib/libbsm/auditxml.pm b/usr/src/lib/libbsm/auditxml.pm
new file mode 100644
index 0000000000..01589bcf5d
--- /dev/null
+++ b/usr/src/lib/libbsm/auditxml.pm
@@ -0,0 +1,861 @@
+#
+# 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
+# or http://www.opensolaris.org/os/licensing.
+# 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 2007 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "%Z%%M% %I% %E% SMI"
+#
+
+use xmlHandlers;
+
+package externalEvent;
+
+1;
+
+sub new {
+ my $pkg = shift;
+ my $id = shift;
+ my $obj = shift;
+
+ my @kid = $obj->getKids(); # kids of event are entry or allowed_types
+
+ # separate kids into classes and create hash of entries and an
+ # array of includes
+
+ my %entry = ();
+ my @entry = ();
+ my @allowed_types = ();
+ my @include = ();
+ my $internalName = '';
+
+ my $kid;
+ foreach $kid (@kid) {
+ my $class = $kid->getClass();
+ my $kidId = $kid->getAttr('id');
+
+ if ($class eq 'entry') {
+ my $tokenId = 'undefined';
+ my $format = '';
+ my $internal = $kid->getKid('internal');
+ if (defined $internal) {
+ $tokenId = $internal->getAttr('token');
+ $format = $internal->getAttr('format');
+ $format = '' unless defined $format;
+ }
+ my $comment;
+ my $commentKid = $kid->getKid('comment');
+ if (defined $commentKid) {
+ $comment = $commentKid->getContent;
+ }
+ my $external = $kid->getKid('external');
+ if (defined ($external)) {
+ $entry{$kidId} = [$external, $kid, $tokenId, $format, $comment];
+ push (@entry, $kidId);
+ }
+ else {
+ print STDERR "no external attributes defined for $id/$kidId\n";
+ }
+ } # handle event id translation...
+ elsif ($class eq 'altname') {
+ $internalName = $kid->getAttr('id');
+ unless (defined $internalName) {
+ print STDERR "missing id for internal name of $id\n";
+ $internalName = 'error';
+ }
+ }
+ elsif ($class eq 'allowed_types') {
+ my $content = $kid->getContent();
+ @allowed_types = (@allowed_types, split(/\s*,\s*/, $content));
+ }
+ }
+ my @entryCopy = @entry;
+ return bless {'id' => $id,
+ 'internalName' => $internalName,
+ 'allowed_types' => \@allowed_types,
+ 'entry' => \%entry,
+ 'entryList' => \@entry,
+ 'entryListCopy' => \@entryCopy,
+ 'include' => \@include,
+ 'xmlObj' => $obj}, $pkg;
+}
+
+# return id
+
+sub getExternalName {
+ my $pkg = shift;
+
+ return $pkg->{'id'};
+}
+
+
+# return internal name if it exists, else id
+
+sub getInternalName {
+ $pkg = shift;
+
+ if ($pkg->{'internalName'}) {
+ return $pkg->{'internalName'};
+ }
+ else {
+ return $pkg->{'id'};
+ }
+}
+
+# getNextEntry reads from 'entryList' destructively
+# but resets when the list after the list is emptied
+
+sub getNextEntry {
+ my $pkg = shift;
+
+ unless (@{$pkg->{'entryList'}}) {
+ @{$pkg->{'entryList'}} = @{$pkg->{'entryListCopy'}};
+ return undef;
+ }
+ my $id = shift @{$pkg->{'entryList'}};
+
+ return ($pkg->getEntry($id)); # getEntry returns an array
+}
+
+# getEntryIds returns list of all ids from entryList
+
+sub getEntryIds {
+ my $pkg = shift;
+ return (@{$pkg->{'entryList'}});
+}
+
+# getEntry returns a selected entry for the current event
+
+sub getEntry {
+ my $pkg = shift;
+ my $id = shift; #entry id
+
+ my $ref = $pkg->{'entry'};
+ my $array = $$ref{$id};
+
+ return @$array;
+}
+
+# getNextInclude reads from 'include' destructively
+
+sub getNextInclude {
+ my $pkg = shift;
+
+ return shift @{$pkg->{'include'}};
+}
+
+# getIncludes returns list of 'include'
+
+sub getIncludes {
+ my $pkg = shift;
+ return @{$pkg->{'include'}};
+}
+
+# return a reference to the list of event id's allowed for
+# this generic event
+
+sub getAllowedTypes {
+ my $pkg = shift;
+
+ return $pkg->{'allowed_types'};
+}
+
+package internalEvent;
+
+1;
+
+sub new {
+ my $pkg = shift;
+ my $id = shift;
+ my $obj = shift;
+
+ my @kid = $obj->getKids(); # kids of event are entry
+
+ my @entry = ();
+
+ my $reorder = 0;
+ if ($reorder = $obj->getAttr('reorder')) {
+ $reorder = 1 if $reorder eq 'yes';
+ }
+ my $kid;
+ foreach $kid (@kid) {
+ my $class = $kid->getClass();
+ my $id = $kid->getAttr('id');
+
+ if ($class eq 'entry') {
+ my $internal = $kid->getKid('internal');
+ if (defined ($internal)) {
+ push (@entry, [$internal, $kid]);
+ }
+ else {
+ print STDERR "no internal attributes defined for $id\n";
+ }
+ }
+ }
+ return bless {'id' => $id,
+ 'reorder' => $reorder,
+ 'entry' => \@entry,
+ 'xmlObj' => $obj}, $pkg;
+}
+
+# getEntries returns a list of all entry references
+
+sub getEntries {
+ my $pkg = shift;
+
+ return undef unless @{$pkg->{'entry'}};
+
+ return @{$pkg->{'entry'}};
+}
+
+sub isReorder {
+ my $pkg = shift;
+
+ return $pkg->{'reorder'};
+}
+
+sub getId {
+ my $pkg = shift;
+
+ return $pkg->{'id'};
+}
+
+package eventDef;
+
+%uniqueId = ();
+
+1;
+
+sub new {
+ my $pkg = shift;
+ my $id = shift;
+ my $obj = shift;
+ my $super = shift;
+
+ my $omit;
+ my $type;
+ my $header;
+ my $idNo;
+ my $javaToo;
+ my $title = '';
+ my @program = ();
+ my @see = ();
+
+ $omit = '' unless $omit = $obj->getAttr('omit');
+ $type = '' unless $type = $obj->getAttr('type');
+ $header = 0 unless $header = $obj->getAttr('header');
+ $idNo = '' unless $idNo = $obj->getAttr('idNo');
+
+ if ($idNo ne '' && $uniqueId{$idNo}) {
+ print STDERR "$uniqueId{$idNo} and $id have the same id ($idNo)\n";
+ }
+ else {
+ $uniqueId{$idNo} = $id;
+ }
+
+ return bless {'id' => $id,
+ 'header' => $header,
+ 'idNo' => $idNo,
+ 'omit' => $omit,
+ 'super' => $super,
+ 'type' => $type,
+ 'title' => $title,
+ 'program' => \@program,
+ 'see' => \@see,
+ 'external' => 0,
+ 'internal' => 0}, $pkg;
+}
+
+# putDef is called at the end of an <event></event> block, so
+# it sees a completed object.
+
+sub putDef {
+ my $pkg = shift;
+ my $obj = shift; # ref to xmlHandlers event object
+ my $context = shift;
+
+ my $id = $pkg->{'id'};
+
+ if ($context eq 'internal') {
+ $pkg->{$context} = new internalEvent($id, $obj);
+ return undef;
+ } elsif ($context eq 'external') {
+ my $ref = $pkg->{$context} = new externalEvent($id, $obj);
+ return $ref->{'internalName'};
+ }
+}
+
+sub getId {
+ my $pkg = shift;
+
+ return $pkg->{'id'};
+}
+
+sub getHeader {
+ my $pkg = shift;
+
+ return $pkg->{'header'};
+}
+
+sub getIdNo {
+ my $pkg = shift;
+
+ return $pkg->{'idNo'};
+}
+
+sub getSuperClass {
+ my $pkg = shift;
+
+ return $pkg->{'super'};
+}
+
+sub getOmit {
+ my $pkg = shift;
+
+ return $pkg->{'omit'};
+}
+
+sub getType {
+ my $pkg = shift;
+
+ return $pkg->{'type'};
+}
+
+sub getTitle {
+ return shift->{'title'};
+}
+
+sub getProgram {
+ return shift->{'program'};
+}
+
+sub getSee {
+ return shift->{'see'};
+}
+
+sub getInternal {
+ my $pkg = shift;
+
+ return $pkg->{'internal'};
+}
+
+sub getExternal {
+ my $pkg = shift;
+
+ return $pkg->{'external'};
+}
+
+# this isn't fully implemented; just a skeleton
+
+package tokenDef;
+
+1;
+
+sub new {
+ my $pkg = shift;
+ my $obj = shift;
+ my $id = shift;
+
+ $usage = $obj->getAttr('usage');
+ $usage = '' unless defined $usage;
+
+ return bless {'id' => $id,
+ 'usage' => $usage
+ }, $pkg;
+}
+
+sub getId {
+ my $pkg = shift;
+
+ return $pkg->{'id'};
+}
+
+sub getUsage {
+ my $pkg = shift;
+
+ return $pkg->{'usage'};
+}
+
+package messageList;
+
+1;
+
+sub new {
+ my $pkg = shift;
+ my $obj = shift;
+ my $id = shift;
+ my $header = shift;
+ my $start = shift;
+ my $public = shift;
+ my $deprecated = shift;
+
+ my @msg = ();
+
+ my @kid = $obj->getKids(); # kids of msg_list are msg
+ my $kid;
+ foreach $kid (@kid) {
+ my $class = $kid->getClass();
+ if ($class eq 'msg') {
+ my $text = $kid->getContent();
+ $text = '' unless defined ($text);
+ my $msgId = $kid->getAttr('id');
+ if (defined ($msgId)) {
+ push(@msg, join('::', $msgId, $text));
+ }
+ else {
+ print STDERR "missing id for $class <msg>\n";
+ }
+ }
+ else {
+ print STDERR "invalid tag in <msg_list> block: $class\n";
+ }
+ }
+
+ return bless {'id' => $id,
+ 'header' => $header,
+ 'msg' => \@msg,
+ 'start' => $start,
+ 'public' => $public,
+ 'deprecated' => $deprecated
+ }, $pkg;
+}
+
+sub getId {
+ my $pkg = shift;
+
+ return $pkg->{'id'};
+}
+
+sub getMsgStart {
+ my $pkg = shift;
+
+ return $pkg->{'start'};
+}
+
+sub getDeprecated {
+ my $pkg = shift;
+
+ return $pkg->{'deprecated'};
+}
+
+sub getMsgPublic {
+ my $pkg = shift;
+
+ return $pkg->{'public'};
+}
+
+sub getHeader {
+ my $pkg = shift;
+
+ return $pkg->{'header'};
+}
+
+# destructive read of @msg...
+
+sub getNextMsg {
+ my $pkg = shift;
+
+ my @msg = @{$pkg->{'msg'}};
+
+ return undef unless @msg;
+
+ my $text = pop(@msg);
+ $pkg->{'msg'} = \@msg;
+ return $text;
+}
+
+# returns all msgs
+sub getMsgs {
+ my $pkg = shift;
+
+ return @{$pkg->{'msg'}};
+}
+
+
+package auditxml;
+
+# These aren't internal state because the callback functions don't
+# have the object handle.
+
+@debug = (); # stack for nesting debug state
+%event = (); # event name => $objRef
+@event = (); # event id
+%token = (); # token name => $objRef
+@token = (); # token id
+%msg_list = (); # messageList string list id to obj
+@msg_list = (); # id list
+%service = (); # valid service names
+%externalToInternal = (); # map external event name to internal event name
+
+1;
+
+sub new {
+ my $pkg = shift;
+ my $file = shift; # xml file to be parsed
+
+ register('event', \&eventStart, \&eventEnd);
+ register('entry', 0, \&entry);
+ register('external', 0, \&external);
+ register('internal', 0, \&internal);
+ register('include', 0, \&include);
+ register('token', 0, \&token);
+ register('service', 0, \&service);
+ register('msg_list', 0, \&msg_list);
+ register('msg', 0, \&msg);
+
+ # do not use register() for debug because register generates extra
+ # debug information
+
+ xmlHandlers::registerStartCallback('debug', \&debugStart);
+ xmlHandlers::registerEndCallback('debug', \&debugEnd);
+
+ $xml = new xmlHandlers(0, 'top level', $file);
+
+ return bless {'xmlObj' => $xml,
+ 'firstToken' => 1,
+ 'firstEvent' => 1}, $pkg;
+}
+
+# local function -- register both the auditxml function and the
+# xmlHandler callback
+
+sub register {
+ my $localName = shift;
+ my $startFunction = shift;
+ my $endFunction = shift;
+
+ if ($startFunction) {
+ xmlHandlers::registerStartCallback($localName, \&completed);
+ $startFunction{$localName} = $startFunction;
+ }
+ if ($endFunction) {
+ xmlHandlers::registerEndCallback($localName, \&completed);
+ $endFunction{$localName} = $endFunction;
+ }
+}
+
+sub completed {
+ my $obj = shift;
+ my $callbackSource = shift;
+
+ my $id = $obj->getAttr('id');
+ my $class = $obj->getClass();
+
+ if ($main::debug) {
+ print "*** $callbackSource: $class", (defined ($id)) ? "= $id\n" : "\n";
+
+ my %attributes = $obj->getAttributes();
+ my $attribute;
+ foreach $attribute (keys %attributes) {
+ print "*** $attribute = $attributes{$attribute}\n";
+ }
+ my $content = $obj->getContent();
+ print "*** content = $content\n" if defined $content;
+ }
+ if ($callbackSource eq 'start') {
+ &{$startFunction{$class}}($obj);
+ }
+ elsif ($callbackSource eq 'end') {
+ &{$endFunction{$class}}($obj);
+ }
+ else {
+ print STDERR "no auditxml function defined for $class\n";
+ }
+}
+
+# getNextEvent reads from @event destructively. 'firstEvent' could
+# be used to make a copy from which to read.
+
+sub getNextEvent {
+ my $pkg = shift;
+
+ return undef unless (@event);
+ if ($pkg->{'firstEvent'}) {
+ @token = sort @token;
+ $pkg->{'firstEvent'} = 1;
+ }
+
+ my $id = shift @event;
+
+ return $event{$id};
+}
+
+# returns all event ids
+sub getEventIds {
+ my $pkg = shift;
+
+ return @event;
+}
+
+# returns event for id
+sub getEvent {
+ my $pkg = shift;
+ my $id = shift;
+
+ return $event{$id};
+}
+
+sub getToken {
+ my $pkg = shift;
+ my $id = shift;
+
+ return $token{$id};
+}
+
+# getNextToken reads from @token destructively. 'firstToken' could
+# be used to make a copy from which to read.
+
+sub getNextToken {
+ my $pkg = shift;
+
+ return undef unless (@token);
+
+ if ($pkg->{'firstToken'}) {
+ @token = sort @token;
+ $pkg->{'firstToken'} = 1;
+ }
+ my $id = shift @token;
+
+ return $token{$id};
+}
+
+# return token Ids
+
+sub getTokenIds {
+ my $pkg = shift;
+
+ return @token;
+}
+
+# getNextMsgId reads from @msg_list destructively.
+
+sub getNextMsgId {
+ my $pkg = shift;
+
+ return undef unless (@msg_list);
+
+ my $id = shift @msg_list;
+
+ return ($id, $msg_list{$id});
+}
+
+sub getMsgIds {
+ my $pkg = shift;
+
+ return @msg_list;
+}
+
+sub getMsg {
+ my $pkg = shift;
+ my $id = shift;
+
+ return $msg_list{$id};
+}
+
+sub external {
+}
+
+sub internal {
+
+}
+
+sub eventStart {
+ my $obj = shift;
+
+ my $id = $obj->getAttr('id');
+
+ unless ($id) {
+ print STDERR "eventStart can't get a valid id\n";
+ return;
+ }
+ unless (defined $event{$id}) {
+ my $super;
+ if ($super = $obj->getAttr('instance_of')) {
+ $super = $event{$super};
+ } else {
+ $super = 0;
+ }
+ $event{$id} = new eventDef($id, $obj, $super);
+ push (@event, $id);
+ } else {
+ print STDERR "duplicate event id: $id\n";
+ }
+}
+
+sub eventEnd {
+ my $obj = shift;
+
+ my $id = $obj->getAttr('id');
+ unless (defined $id) {
+ print STDERR "event element is missing required id attribute\n";
+ return;
+ }
+ print "event = $id\n" if $main::debug;
+
+ foreach my $kid ($obj->getKids) {
+ my $class = $kid->getClass;
+ next unless ($class =~ /title|program|see/);
+ my $content = $kid->getContent;
+ if ($class eq 'title') {
+ $event{$id}->{$class} = $content;
+ } else {
+ push @{$event{$id}->{$class}}, $content;
+ }
+ }
+ $event{$id}->putDef($obj, 'internal');
+
+ my $internalName = $event{$id}->putDef($obj, 'external');
+
+ $externalToInternal{$id} = $internalName if $internalName;
+}
+
+# class method
+
+#sub getInternalName {
+# my $name = shift;
+#
+# return $externalToInternal{$name};
+#}
+
+sub entry {
+}
+
+#sub include {
+# my $obj = shift;
+#
+# my $id = $obj->getAttr('id');
+#
+# if (defined $id) {
+# print "include = $id\n" if $main::debug;
+# }
+# else {
+# print STDERR "include element is missing required id attribute\n";
+# }
+#}
+
+sub token {
+ my $obj = shift;
+
+ my $id = $obj->getAttr('id');
+
+ if (defined $id) {
+ print "token = $id\n" if $main::debug;
+ $token{$id} = new tokenDef($obj, $id);
+ push (@token, $id);
+ }
+ else {
+ print STDERR "token element is missing required id attribute\n";
+ }
+}
+
+sub msg_list {
+ my $obj = shift;
+
+ my $id = $obj->getAttr('id');
+ my $header = $obj->getAttr('header');
+ my $start = $obj->getAttr('start');
+ my $public = $obj->getAttr('public');
+ my $deprecated = $obj->getAttr('deprecated');
+
+ $header = 0 unless $header;
+ $start = 0 unless $start;
+ $public = ($public) ? 1 : 0;
+ $deprecated = ($deprecated) ? 1 : 0;
+
+ if (defined $id) {
+ print "msg_list = $id\n" if $main::debug;
+ $msg_list{$id} = new messageList($obj, $id, $header, $start,
+ $public, $deprecated);
+ push (@msg_list, $id);
+ }
+ else {
+ print STDERR
+ "msg_list element is missing required id attribute\n";
+ }
+}
+
+sub msg {
+# my $obj = shift;
+}
+
+# Service name was dropped during PSARC review
+
+sub service {
+ my $obj = shift;
+
+ my $name = $obj->getAttr('name');
+ my $id = $obj->getAttr('id');
+
+ if ((defined $id) && (defined $name)) {
+ print "service $name = $id\n" if $main::debug;
+ $service{$name} = $id;
+ }
+ elsif (defined $name) {
+ print STDERR "service $name is missing an id number\n";
+ }
+ elsif (defined $id) {
+ print STDERR "service name missing for id = $id\n";
+ }
+ else {
+ print STDERR "missing both name and id for a service entry\n";
+ }
+}
+
+#sub getServices {
+#
+# return %service;
+#}
+
+# <debug set="on"> or <debug set="off"> or <debug>
+# if the set attribute is omitted, debug state is toggled
+
+# debugStart / debugEnd are used to insure debug state is
+# scoped to the block between <debug> and </debug>
+
+sub debugStart {
+ my $obj = shift;
+
+ push (@debug, $main::debug);
+ my $debug = $main::debug;
+
+ my $state = $obj->getAttr('set');
+
+ if (defined $state) {
+ $main::debug = ($state eq 'on') ? 1 : 0;
+ }
+ else {
+ $main::debug = !$debug;
+ }
+ if ($debug != $main::debug) {
+ print 'debug is ', $main::debug ? 'on' : 'off', "\n";
+ }
+}
+
+sub debugEnd {
+ my $obj = shift;
+
+ my $debug = $main::debug;
+ $main::debug = pop (@debug);
+
+ if ($debug != $main::debug) {
+ print 'debug is ', $main::debug ? 'on' : 'off', "\n";
+ }
+}
diff --git a/usr/src/lib/libbsm/common/adt_xml.txt b/usr/src/lib/libbsm/common/adt.xml
index 8a847792c5..b69dce26f8 100644
--- a/usr/src/lib/libbsm/common/adt_xml.txt
+++ b/usr/src/lib/libbsm/common/adt.xml
@@ -29,7 +29,7 @@ Use is subject to license terms.
<specification>
<!-- comments are displayed to stderr if debug is on -->
-<debug set="off">
+<debug set="off"/>
<!-- The order of events is arbitrary EXCEPT generic events must
precede their instances -->
@@ -257,6 +257,7 @@ Use is subject to license terms.
<entry id="message">
<internal token="text"/>
<external opt="optional" type="msg login_text"/>
+ <comment>error message</comment>
</entry>
<entry id="return">
<internal token="return"/>
@@ -274,18 +275,22 @@ Use is subject to license terms.
<entry id="object_name">
<internal token="text"/>
<external opt="required" type="char *"/>
+ <comment>object name</comment>
</entry>
<entry id="domain">
<internal token="text"/>
<external opt="optional" type="char *"/>
+ <comment>domain</comment>
</entry>
<entry id="name_service">
<internal token="text"/>
<external opt="required" type="char *"/>
+ <comment>name_service</comment>
</entry>
<entry id="auth_used">
<internal token="uauth"/>
<external opt="optional" type="char *"/>
+ <comment>authorization used</comment>
</entry>
<!--
This should really be its own token type, not "text"
@@ -293,6 +298,7 @@ Use is subject to license terms.
<entry id="initial_values">
<internal token="text"/>
<external opt="required" type="char *"/>
+ <comment>initial values</comment>
</entry>
<entry id="return">
<internal token="return"/>
@@ -308,22 +314,27 @@ Use is subject to license terms.
<entry id="object_name">
<internal token="text"/>
<external opt="required" type="char *"/>
+ <comment>object name</comment>
</entry>
<entry id="domain">
<internal token="text"/>
<external opt="optional" type="char *"/>
+ <comment>domain</comment>
</entry>
<entry id="name_service">
<internal token="text"/>
<external opt="required" type="char *"/>
+ <comment>name_service</comment>
</entry>
<entry id="auth_used">
<internal token="uauth"/>
<external opt="optional" type="char *"/>
+ <comment>authorization used</comment>
</entry>
<entry id="delete_values">
<internal token="text"/>
<external opt="required" type="char *"/>
+ <comment>deleted values</comment>
</entry>
<entry id="return">
<internal token="return"/>
@@ -339,22 +350,27 @@ Use is subject to license terms.
<entry id="object_name">
<internal token="text"/>
<external opt="required" type="char *"/>
+ <comment>object name</comment>
</entry>
<entry id="domain">
<internal token="text"/>
<external opt="optional" type="char *"/>
+ <comment>domain</comment>
</entry>
<entry id="name_service">
<internal token="text"/>
<external opt="required" type="char *"/>
+ <comment>name_service</comment>
</entry>
<entry id="auth_used">
<internal token="uauth"/>
<external opt="optional" type="char *"/>
+ <comment>authorization used</comment>
</entry>
<entry id="changed_values">
<internal token="text"/>
<external opt="required" type="char *"/>
+ <comment>changed values</comment>
</entry>
<entry id="return">
<internal token="return"/>
@@ -374,36 +390,57 @@ Use is subject to license terms.
-->
<event id="AUE_admin_authenticate" instance_of="AUE_generic_login"
header="0" idNo="3">
+ <title>Admin Server Authentication</title>
+ <program>admin (various)</program>
+ <see>SMC, WBEM, or AdminSuite</see>
</event>
<event id="AUE_filesystem_add" instance_of="AUE_generic_SMC_add"
header="0" idNo="4">
+ <title>SMC: filesystem add</title>
+ <program>SMC server</program>
</event>
<event id="AUE_filesystem_delete" instance_of="AUE_generic_SMC_delete"
header="0" idNo="5">
+ <title>SMC: filesystem delete</title>
+ <program>SMC server</program>
</event>
<event id="AUE_filesystem_modify" instance_of="AUE_generic_SMC_modify"
header="0" idNo="6">
+ <title>SMC: filesystem modify</title>
+ <program>SMC server</program>
</event>
<event id="AUE_network_add" instance_of="AUE_generic_SMC_add"
header="0" idNo="7">
+ <title>SMC: network add</title>
+ <program>SMC server</program>
</event>
<event id="AUE_network_delete" instance_of="AUE_generic_SMC_delete"
header="0" idNo="8">
+ <title>SMC: network delete</title>
+ <program>SMC server</program>
</event>
<event id="AUE_network_modify" instance_of="AUE_generic_SMC_modify"
header="0" idNo="9">
+ <title>SMC: network modify</title>
+ <program>SMC server</program>
</event>
<event id="AUE_printer_add" instance_of="AUE_generic_SMC_add"
header="0" idNo="10">
+ <title>SMC: printer add</title>
+ <program>SMC server</program>
</event>
<event id="AUE_printer_delete" instance_of="AUE_generic_SMC_delete"
header="0" idNo="11">
+ <title>SMC: printer delete</title>
+ <program>SMC server</program>
</event>
<event id="AUE_printer_modify" instance_of="AUE_generic_SMC_modify"
header="0" idNo="12">
+ <title>SMC: printer modify</title>
+ <program>SMC server</program>
</event>
<!--
@@ -413,30 +450,47 @@ Use is subject to license terms.
-->
<event id="AUE_role_login" instance_of="AUE_generic_login"
header="0" idNo="13">
+ <title>RBAC: role login</title>
+ <program>SMC server</program>
+ <program>/usr/bin/su</program>
</event>
<event id="AUE_scheduledjob_add" instance_of="AUE_generic_SMC_add"
header="0" idNo="14">
+ <title>SMC: scheduled job add</title>
+ <program>SMC server</program>
</event>
<event id="AUE_scheduledjob_delete" instance_of="AUE_generic_SMC_delete"
header="0" idNo="15">
+ <title>SMC: scheduled job delete</title>
+ <program>SMC server</program>
</event>
<event id="AUE_scheduledjob_modify" instance_of="AUE_generic_SMC_modify"
header="0" idNo="16">
+ <title>SMC: scheduled job modify</title>
+ <program>SMC server</program>
</event>
<event id="AUE_serialport_add" instance_of="AUE_generic_SMC_add"
header="0" idNo="17">
+ <title>SMC: serial port add</title>
+ <program>SMC server</program>
</event>
<event id="AUE_serialport_delete" instance_of="AUE_generic_SMC_delete"
header="0" idNo="18">
+ <title>SMC: serial port delete</title>
+ <program>SMC server</program>
</event>
<event id="AUE_serialport_modify" instance_of="AUE_generic_SMC_modify"
header="0" idNo="19">
+ <title>SMC: serial port modify</title>
+ <program>SMC server</program>
</event>
<!-- This is SMC; should this also be used elsewhere? -->
<event id="AUE_uauth" header="0" idNo="20">
+ <title>SMC: Use of Authorization</title>
+ <program>SMC server</program>
<entry id="subject">
<internal token="subject"/>
<external opt="none"/>
@@ -444,10 +498,12 @@ Use is subject to license terms.
<entry id="auth_used">
<internal token="uauth"/>
<external opt="required" type="char *"/>
+ <comment>authorization used</comment>
</entry>
<entry id="objectname">
<internal token="text"/>
<external opt="required" type="char *"/>
+ <comment>object name</comment>
</entry>
<entry id="return">
<internal token="return"/>
@@ -457,18 +513,27 @@ Use is subject to license terms.
<event id="AUE_usermgr_add" instance_of="AUE_generic_SMC_add"
header="0" idNo="21">
+ <title>SMC: User Manager add</title>
+ <program>SMC server</program>
</event>
<event id="AUE_usermgr_delete" instance_of="AUE_generic_SMC_delete"
header="0" idNo="22">
+ <title>SMC: User Manager delete</title>
+ <program>SMC server</program>
</event>
<event id="AUE_usermgr_modify" instance_of="AUE_generic_SMC_modify"
header="0" idNo="23">
+ <title>SMC: User Manager modify</title>
+ <program>SMC server</program>
</event>
<!-- end of Java needed for SMC events -->
<!--
while not used by SMC logout is used by Lockhart
-->
<event id="AUE_logout" header="0" idNo="1">
+ <title>login: logout</title>
+ <program>various</program>
+ <see>login(1)</see>
<entry id="subject">
<internal token="subject"/>
<external opt="none"/>
@@ -483,6 +548,7 @@ Use is subject to license terms.
<entry id="user_name">
<internal token="text" format="logout %s"/>
<external opt="optional" type="char *"/>
+ <comment>"logout" username</comment>
</entry>
<entry id="return">
<internal token="return"/>
@@ -493,6 +559,10 @@ Use is subject to license terms.
<!-- C Only events -->
<event id="AUE_init_solaris" header="0" idNo="32" omit="JNI">
+ <title>init</title>
+ <program>/sbin/init</program>
+ <program>/usr/sbin/init</program>
+ <program>/usr/sbin/shutdown</program>
<entry id="subject">
<internal token="subject"/>
<external opt="none"/>
@@ -500,6 +570,7 @@ Use is subject to license terms.
<entry id="info">
<internal token="text"/>
<external opt="optional" type="char *"/>
+ <comment>init level or zone name</comment>
</entry>
<entry id="return">
<internal token="return"/>
@@ -509,18 +580,33 @@ Use is subject to license terms.
<event id="AUE_login" instance_of="AUE_generic_login" header="0"
idNo="25" omit="JNI">
+ <title>terminal login</title>
+ <program>/usr/sbin/login</program>
+ <program>/usr/dt/bin/dtlogin</program>
+ <see>login(1)</see>
+ <see>dtlogin</see>
</event>
<event id="AUE_rlogin" instance_of="AUE_generic_login" header="0"
idNo="28" omit="JNI">
+ <title>rlogin</title>
+ <program>/usr/sbin/login</program>
+ <see>login(1) - rlogin</see>
</event>
<event id="AUE_telnet" instance_of="AUE_generic_login" header="0"
idNo="29" omit="JNI">
+ <title>telnet login</title>
+ <program>/usr/sbin/login</program>
+ <see>login(1) - telnet</see>
</event>
<event id="AUE_ssh" instance_of="AUE_generic_login" header="0"
idNo="2" omit="JNI">
+ <program>/usr/lib/ssh/sshd</program>
</event>
<event id="AUE_zlogin" header="0" idNo="38" omit="JNI">
+ <title>zone login</title>
+ <program>/usr/sbin/login</program>
+ <see>zlogin(1)</see>
<entry id="subject">
<internal token="subject"/>
<external opt="none"/>
@@ -528,6 +614,7 @@ Use is subject to license terms.
<entry id="message">
<internal token="text"/>
<external opt="optional" type="char *"/>
+ <comment>error message</comment>
</entry>
<entry id="return">
<internal token="return"/>
@@ -536,6 +623,9 @@ Use is subject to license terms.
</event>
<event id="AUE_su" header="0" idNo="30" omit="JNI">
+ <title>su</title>
+ <program>/usr/bin/su</program>
+ <see>su(1M)</see>
<entry id="subject">
<internal token="subject"/>
<external opt="none"/>
@@ -547,6 +637,7 @@ Use is subject to license terms.
<entry id="message">
<internal token="text"/>
<external opt="optional" type="char *"/>
+ <comment>"user name" of failed new user/role</comment>
</entry>
<entry id="return">
<internal token="return"/>
@@ -555,6 +646,9 @@ Use is subject to license terms.
</event>
<event id="AUE_passwd" header="0" idNo="27" omit="JNI">
+ <title>passwd</title>
+ <program>various</program>
+ <see>passwd(1)</see>
<entry id="subject">
<internal token="subject"/>
<external opt="none"/>
@@ -562,6 +656,7 @@ Use is subject to license terms.
<entry id="username">
<internal token="text"/>
<external opt="optional" type="char *"/>
+ <comment>success/fail message</comment>
</entry>
<entry id="return">
<internal token="return"/>
@@ -571,9 +666,11 @@ Use is subject to license terms.
<event id="AUE_screenlock" instance_of="AUE_generic_basic" header="0"
idNo="26" omit="JNI">
+ <program>desktop screen lock</program>
</event>
<event id="AUE_screenunlock" instance_of="AUE_generic_basic" header="0"
idNo="31" omit="JNI">
+ <program>desktop screen unlock</program>
</event>
<!--
@@ -584,6 +681,9 @@ Use is subject to license terms.
-->
<event id="AUE_prof_cmd" header="0" idNo="24" omit="JNI">
+ <title>pfexec</title>
+ <program>/usr/bin/pfexec</program>
+ <see>pfexec(1)</see>
<entry id="subject">
<internal token="subject"/>
<external opt="none"/>
@@ -591,10 +691,12 @@ Use is subject to license terms.
<entry id="cwdpath">
<internal token="path"/>
<external opt="required" type="char*"/>
+ <comment>working directory</comment>
</entry>
<entry id="cmdpath">
<internal token="path"/>
<external opt="required" type="char*"/>
+ <comment>command pathname</comment>
</entry>
<entry id="argc,argv,envp">
<internal token="command"/>
@@ -620,6 +722,8 @@ Use is subject to license terms.
</event>
<event id="AUE_inetd_connect" header="0" idNo="34" omit="JNI">
+ <title>inetd</title>
+ <program>/usr/sbin/inetd</program>
<entry id="subject">
<internal token="subject"/>
<external opt="none"/>
@@ -627,15 +731,18 @@ Use is subject to license terms.
<entry id="service_name">
<internal token="text"/>
<external opt="optional" type="char *"/>
+ <comment>service name</comment>
</entry>
<entry id="ip_type,ip_remote_port,ip_local_port,ip_adr">
<internal token="tid"/>
<external opt="required"
type="uint32_t,uint16_t,uint16_t,uint32_t[4]"/>
+ <comment>client address</comment>
</entry>
<entry id="cmd">
<internal token="command_1"/>
<external opt="required" type="char *"/>
+ <comment>inetd command</comment>
</entry>
<entry id="privileges">
<internal token="priv_effective"/>
@@ -648,6 +755,8 @@ Use is subject to license terms.
</event>
<event id="AUE_inetd_ratelimit" header="0" idNo="35" omit="JNI">
+ <title>inetd</title>
+ <program>/usr/sbin/inetd</program>
<entry id="subject">
<internal token="subject"/>
<external opt="none"/>
@@ -655,10 +764,12 @@ Use is subject to license terms.
<entry id="service_name">
<internal token="text"/>
<external opt="optional" type="char *"/>
+ <comment>service name</comment>
</entry>
<entry id="limit">
<internal token="text"/>
<external opt="required" type="char *"/>
+ <comment>limit value</comment>
</entry>
<entry id="return">
<internal token="return"/>
@@ -667,6 +778,8 @@ Use is subject to license terms.
</event>
<event id="AUE_inetd_copylimit" header="0" idNo="36" omit="JNI">
+ <title>inetd</title>
+ <program>/usr/sbin/inetd</program>
<entry id="subject">
<internal token="subject"/>
<external opt="none"/>
@@ -674,10 +787,12 @@ Use is subject to license terms.
<entry id="service_name">
<internal token="text"/>
<external opt="optional" type="char *"/>
+ <comment>service name</comment>
</entry>
<entry id="limit">
<internal token="text"/>
<external opt="required" type="char *"/>
+ <comment>limit value</comment>
</entry>
<entry id="return">
<internal token="return"/>
@@ -686,6 +801,8 @@ Use is subject to license terms.
</event>
<event id="AUE_inetd_failrate" header="0" idNo="37" omit="JNI">
+ <title>inetd</title>
+ <program>/usr/sbin/inetd</program>
<entry id="subject">
<internal token="subject"/>
<external opt="none"/>
@@ -693,10 +810,12 @@ Use is subject to license terms.
<entry id="service_name">
<internal token="text"/>
<external opt="optional" type="char *"/>
+ <comment>service name</comment>
</entry>
<entry id="values">
<internal token="text"/>
<external opt="required" type="char *"/>
+ <comment>limit value, interval</comment>
</entry>
<entry id="return">
<internal token="return"/>
@@ -712,10 +831,12 @@ Use is subject to license terms.
<entry id="new_state">
<internal token="text"/>
<external opt="required" type="char *"/>
+ <comment>New zone state</comment>
</entry>
<entry id="zonename">
<internal token="zonename"/>
<external opt="required" type="char *"/>
+ <comment>zone name</comment>
</entry>
<entry id="return">
<internal token="return"/>
@@ -725,13 +846,20 @@ Use is subject to license terms.
<event id="AUE_su_logout" instance_of="AUE_generic_basic"
header="0" idNo="39" omit="JNI">
+ <title>su</title>
+ <program>/usr/bin/su</program>
+ <see>su(1M)</see>
</event>
<event id="AUE_role_logout" instance_of="AUE_generic_basic"
header="0" idNo="40" omit="JNI">
+ <title>su</title>
+ <program>/usr/bin/su</program>
+ <see>su(1M)</see>
</event>
<event id="AUE_newgrp_login" header="0" idNo="41" omit="JNI">
+ <program>newgrp</program>
<entry id="subject">
<internal token="subject"/>
<external opt="none"/>
@@ -739,6 +867,7 @@ Use is subject to license terms.
<entry id="groupname">
<internal token="text"/>
<external opt="required" type="char *"/>
+ <comment>group name</comment>
</entry>
<entry id="return">
<internal token="return"/>
@@ -759,18 +888,22 @@ Use is subject to license terms.
<entry id="auth_used">
<internal token="uauth"/>
<external opt="required" type="char *"/>
+ <comment>authorization used</comment>
</entry>
<entry id="mount_point">
<internal token="path"/>
<external opt="required" type="char *"/>
+ <comment>mount point</comment>
</entry>
<entry id="device">
<internal token="path"/>
<external opt="required" type="char *"/>
+ <comment>device</comment>
</entry>
<entry id="options">
<internal token="text"/>
<external opt="optional" type="char *"/>
+ <comment>options</comment>
</entry>
<entry id="return">
<internal token="return"/>
@@ -780,11 +913,14 @@ Use is subject to license terms.
<event id="AUE_attach" instance_of="AUE_generic_mountable"
header="0" idNo="42" omit="JNI">
+ <program>hald</program>
</event>
<event id="AUE_detach" instance_of="AUE_generic_mountable"
header="0" idNo="43" omit="JNI">
+ <program>hald</program>
</event>
<event id="AUE_remove" header="0" idNo="44" omit="JNI">
+ <program>hald</program>
<entry id="subject">
<internal token="subject"/>
<external opt="none"/>
@@ -792,14 +928,17 @@ Use is subject to license terms.
<entry id="auth_used">
<internal token="uauth"/>
<external opt="required" type="char *"/>
+ <comment>authorization used</comment>
</entry>
<entry id="mount_point">
<internal token="path"/>
<external opt="optional" type="char *"/>
+ <comment>mount point</comment>
</entry>
<entry id="device">
<internal token="path"/>
<external opt="required" type="char *"/>
+ <comment>device</comment>
</entry>
<entry id="return">
<internal token="return"/>
@@ -808,6 +947,7 @@ Use is subject to license terms.
</event>
<event id="AUE_pool_import" header="0" idNo="45" omit="JNI">
+ <program>hald</program>
<entry id="subject">
<internal token="subject"/>
<external opt="none"/>
@@ -815,14 +955,17 @@ Use is subject to license terms.
<entry id="auth_used">
<internal token="uauth"/>
<external opt="required" type="char *"/>
+ <comment>authorization used</comment>
</entry>
<entry id="pool">
<internal token="text"/>
<external opt="required" type="char *"/>
+ <comment>pool</comment>
</entry>
<entry id="device">
<internal token="path"/>
<external opt="required" type="char *"/>
+ <comment>device</comment>
</entry>
<entry id="return">
<internal token="return"/>
@@ -830,6 +973,7 @@ Use is subject to license terms.
</entry>
</event>
<event id="AUE_pool_export" header="0" idNo="46" omit="JNI">
+ <program>hald</program>
<entry id="subject">
<internal token="subject"/>
<external opt="none"/>
@@ -837,14 +981,17 @@ Use is subject to license terms.
<entry id="auth_used">
<internal token="uauth"/>
<external opt="required" type="char *"/>
+ <comment>authorization used</comment>
</entry>
<entry id="pool">
<internal token="text"/>
<external opt="required" type="char *"/>
+ <comment>pool</comment>
</entry>
<entry id="device">
<internal token="path"/>
<external opt="required" type="char *"/>
+ <comment>device</comment>
</entry>
<entry id="return">
<internal token="return"/>
@@ -861,14 +1008,17 @@ Use is subject to license terms.
<entry id="auth_used">
<internal token="uauth"/>
<external opt="required" type="char *"/>
+ <comment>authorization used</comment>
</entry>
<entry id="obj_class">
<internal token="text"/>
<external opt="required" type="char *"/>
+ <comment>object class name</comment>
</entry>
<entry id="obj_name">
<internal token="text"/>
<external opt="required" type="char *"/>
+ <comment>object name</comment>
</entry>
<entry id="return">
<internal token="return"/>
@@ -878,15 +1028,24 @@ Use is subject to license terms.
<event id="AUE_dladm_create_secobj" instance_of="AUE_dladm_generic"
header="0" idNo="47" omit="JNI">
+ <title>create wifi security object</title>
+ <program>/usr/sbin/dladm</program>
+ <see>dladm(1M)</see>
</event>
<event id="AUE_dladm_delete_secobj" instance_of="AUE_dladm_generic"
header="0" idNo="48" omit="JNI">
+ <title>delete wifi security object</title>
+ <program>/usr/sbin/dladm</program>
+ <see>dladm(1M)</see>
</event>
<!-- Trusted eXtensions (TX) events -->
<!-- labeld events -->
<event id="AUE_file_relabel" header="0" idNo="49" omit="JNI">
+ <title>relabel file from one zone to another</title>
+ <program>setlabel(1)</program>
+ <see>setflabel(3TSOL)</see>
<entry id="subject">
<internal token="subject"/>
<external opt="none"/>
@@ -894,18 +1053,22 @@ Use is subject to license terms.
<entry id="auth_used">
<internal token="uauth"/>
<external opt="required" type="char *"/>
+ <comment>authorization used</comment>
</entry>
<entry id="file">
<internal token="path"/>
<external opt="required" type="char *"/>
+ <comment>file relabeled</comment>
</entry>
<entry id="src_label">
<internal token="label"/>
<external opt="required" type="m_label_t *"/>
+ <comment>original label</comment>
</entry>
<entry id="dst_label">
<internal token="label"/>
<external opt="required" type="m_label_t *"/>
+ <comment>new label</comment>
</entry>
<entry id="return">
<internal token="return"/>
@@ -914,6 +1077,8 @@ Use is subject to license terms.
</event>
<event id="AUE_file_copy" header="0" idNo="50" omit="JNI">
+ <title>copy file to another zone</title>
+ <program>dtfile(1X)</program>
<entry id="subject">
<internal token="subject"/>
<external opt="none"/>
@@ -921,22 +1086,27 @@ Use is subject to license terms.
<entry id="auth_used">
<internal token="uauth"/>
<external opt="required" type="char *"/>
+ <comment>authorization used</comment>
</entry>
<entry id="src_file">
<internal token="path"/>
<external opt="required" type="char *"/>
+ <comment>source file</comment>
</entry>
<entry id="src_label">
<internal token="label"/>
<external opt="required" type="m_label_t *"/>
+ <comment>source label</comment>
</entry>
<entry id="dst_file">
<internal token="path"/>
<external opt="required" type="char *"/>
+ <comment>destination directory</comment>
</entry>
<entry id="dst_label">
<internal token="label"/>
<external opt="required" type="m_label_t *"/>
+ <comment>destination label</comment>
</entry>
<entry id="return">
<internal token="return"/>
@@ -1116,5 +1286,4 @@ Use is subject to license terms.
<msg id="ANON_USER">No anonymous</msg>
</msg_list>
-</debug>
</specification>
diff --git a/usr/src/lib/libbsm/common/adt.xsd b/usr/src/lib/libbsm/common/adt.xsd
new file mode 100644
index 0000000000..3a30dfa0cf
--- /dev/null
+++ b/usr/src/lib/libbsm/common/adt.xsd
@@ -0,0 +1,151 @@
+<?xml version="1.0"?>
+<!--
+ 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
+ or http://www.opensolaris.org/os/licensing.
+ 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 2007 Sun Microsystems, Inc. All rights reserved.
+Use is subject to license terms.
+
+ ident "%Z%%M% %I% %E% SMI"
+-->
+
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+<xs:element name="specification">
+ <xs:complexType>
+ <xs:sequence minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="debug" type="debug_t" minOccurs="0" maxOccurs="unbounded"/>
+ <xs:element name="event" type="event_t" minOccurs="0" maxOccurs="unbounded"/>
+ <xs:element name="token" type="token_t" minOccurs="0" maxOccurs="unbounded"/>
+ <xs:element name="msg_list" type="msg_list_t" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ </xs:complexType>
+</xs:element>
+
+<xs:complexType name="debug_t">
+ <xs:attribute name="set" use="required">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="on"/>
+ <xs:enumeration value="off"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+</xs:complexType>
+
+<xs:complexType name="event_t">
+ <xs:sequence minOccurs="0">
+ <xs:element name="debug" type="debug_t" minOccurs="0"/>
+ <xs:element name="altname" type="xs:string" minOccurs="0"/>
+ <xs:element name="title" type="xs:string" minOccurs="0" maxOccurs="1"/>
+ <xs:element name="program" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
+ <xs:element name="see" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
+ <xs:element name="note" type="xs:string" minOccurs="0" maxOccurs="1"/>
+ <xs:element name="entry" type="entry_t" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:attribute name="id" type="xs:string" use="required"/>
+ <xs:attribute name="reorder">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="yes"/>
+ <xs:enumeration value="no"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="header" type="xs:unsignedShort"/>
+ <xs:attribute name="idNo" type="xs:unsignedShort"/>
+ <xs:attribute name="type" type="xs:string"/>
+ <xs:attribute name="omit">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="no"/>
+ <xs:enumeration value="always"/>
+ <xs:enumeration value="JNI"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="instance_of" type="xs:string"/>
+</xs:complexType>
+
+<xs:complexType name="entry_t">
+ <xs:sequence>
+ <xs:element name="debug" type="debug_t" minOccurs="0"/>
+ <xs:element name="internal">
+ <xs:complexType>
+ <xs:attribute name="token" type="xs:string" use="required"/>
+ <xs:attribute name="order" type="xs:unsignedShort"/>
+ <xs:attribute name="format" type="xs:string"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="external">
+ <xs:complexType>
+ <xs:attribute name="opt" use="required">
+ <xs:simpleType>
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="required"/>
+ <xs:enumeration value="optional"/>
+ <xs:enumeration value="obsolete"/>
+ <xs:enumeration value="none"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="type" type="xs:string"/>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="comment" type="xs:string" minOccurs="0" maxOccurs="1"/>
+ </xs:sequence>
+ <xs:attribute name="id" type="xs:string" use="required"/>
+</xs:complexType>
+
+<xs:simpleType name="bool_t">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="true"/>
+ <xs:enumeration value="false"/>
+ </xs:restriction>
+</xs:simpleType>
+
+<xs:complexType name="token_t">
+ <xs:simpleContent>
+ <xs:extension base="xs:string">
+ <xs:attribute name="id" type="xs:string" use="required"/>
+ <xs:attribute name="usage" type="xs:string"/>
+ </xs:extension>
+ </xs:simpleContent>
+</xs:complexType>
+
+<xs:complexType name="msg_list_t">
+ <xs:sequence>
+ <xs:element name="msg" minOccurs="0" maxOccurs="unbounded">
+ <xs:complexType>
+ <xs:simpleContent>
+ <xs:extension base="xs:string">
+ <xs:attribute name="id" type="xs:string"/>
+ </xs:extension>
+ </xs:simpleContent>
+ </xs:complexType>
+ </xs:element>
+ </xs:sequence>
+ <xs:attribute name="id" type="xs:string" use="required"/>
+ <xs:attribute name="header" type="xs:unsignedShort" use="required"/>
+ <xs:attribute name="start" type="xs:unsignedShort"/>
+ <xs:attribute name="public" type="bool_t"/>
+ <xs:attribute name="deprecated" type="bool_t"/>
+</xs:complexType>
+
+</xs:schema>
diff --git a/usr/src/lib/libbsm/common/adt_event.h b/usr/src/lib/libbsm/common/adt_event.h
deleted file mode 100644
index 4b245eb53d..0000000000
--- a/usr/src/lib/libbsm/common/adt_event.h
+++ /dev/null
@@ -1,598 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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
- */
-/*
- * adt_event.h
- *
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- *
- * AUTOMATICALLY GENERATED CODE; DO NOT EDIT; CONTACT AUDIT PROJECT
- *
- * This is an evolving interface; additions will be made without
- * notice. It is also part of a contract private interface and
- * any changes made that are not upward compatible are subject to
- * the contract's rules.
- */
-
-#ifndef _ADT_EVENT_H
-#define _ADT_EVENT_H
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include <bsm/adt.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * adt_put_event() status values. Positive values are for kernel-generated
- * failure, -1 for user-space. For ADT_SUCCESS, the adt_put_event() return_val
- * is not used; the convention is to set it to ADT_SUCCESS.
- */
-#define ADT_SUCCESS 0
-#define ADT_FAILURE -1
-
-#define ADT_FAIL_PAM 2000
-#define ADT_FAIL_VALUE 1000
-enum adt_fail_value {
- ADT_FAIL_VALUE_PW_ATTR = 1000, /* Attribute update */
- ADT_FAIL_VALUE_PW, /* Password update */
- ADT_FAIL_VALUE_USERNAME, /* bad username */
- ADT_FAIL_VALUE_AUTH, /* authorization failed */
- ADT_FAIL_VALUE_UID, /* bad uid */
- ADT_FAIL_VALUE_UNKNOWN, /* unknown failure */
- ADT_FAIL_VALUE_EXPIRED, /* password expired */
- ADT_FAIL_VALUE_ACCOUNT_LOCKED, /* Account is locked */
- ADT_FAIL_VALUE_BAD_DIALUP, /* Bad dial up */
- ADT_FAIL_VALUE_BAD_ID, /* Invalid ID */
- ADT_FAIL_VALUE_BAD_PW, /* Invalid password */
- ADT_FAIL_VALUE_CONSOLE, /* Not on console */
- ADT_FAIL_VALUE_MAX_TRIES, /* Too many failed attempts */
- ADT_FAIL_VALUE_PROTOCOL_FAILURE, /* Protocol failure */
- ADT_FAIL_VALUE_EXCLUDED_USER, /* Excluded user */
- ADT_FAIL_VALUE_ANON_USER, /* No anonymous */
- ADT_FAIL_VALUE_BAD_CMD, /* Invalid command */
- ADT_FAIL_VALUE_BAD_TTY, /* Standard input not a tty line */
- ADT_FAIL_VALUE_PROGRAM, /* Program failure */
- ADT_FAIL_VALUE_CHDIR_FAILED, /* chdir to home directory */
- ADT_FAIL_VALUE_INPUT_OVERFLOW, /* Input line too long. */
- ADT_FAIL_VALUE_DEVICE_PERM, /* login device override */
- ADT_FAIL_VALUE_AUTH_BYPASS, /* authorization bypass */
- ADT_FAIL_VALUE_LOGIN_DISABLED /* login disabled */
-};
-/* Deprecated message list */
-enum adt_login_text {
- ADT_LOGIN_NO_MSG, /* (no token will be generated) */
- ADT_LOGIN_ACCOUNT_LOCKED, /* Account is locked */
- ADT_LOGIN_BAD_DIALUP, /* Bad dial up */
- ADT_LOGIN_BAD_ID, /* Invalid ID */
- ADT_LOGIN_BAD_PW, /* Invalid password */
- ADT_LOGIN_CONSOLE, /* Not on console */
- ADT_LOGIN_MAX_TRIES, /* Too many failed attempts */
- ADT_LOGIN_PROTOCOL_FAILURE, /* Protocol failure */
- ADT_LOGIN_EXCLUDED_USER, /* Excluded user */
- ADT_LOGIN_ANON_USER /* No anonymous */
-};
-#define ADT_admin_authenticate 3
-#define ADT_attach 42
-#define ADT_detach 43
-#define ADT_dladm_create_secobj 47
-#define ADT_dladm_delete_secobj 48
-#define ADT_file_copy 50
-#define ADT_file_relabel 49
-#define ADT_filesystem_add 4
-#define ADT_filesystem_delete 5
-#define ADT_filesystem_modify 6
-#define ADT_inetd_connect 34
-#define ADT_inetd_copylimit 36
-#define ADT_inetd_failrate 37
-#define ADT_inetd_ratelimit 35
-#define ADT_init_solaris 32
-#define ADT_login 25
-#define ADT_logout 1
-#define ADT_network_add 7
-#define ADT_network_delete 8
-#define ADT_network_modify 9
-#define ADT_newgrp_login 41
-#define ADT_passwd 27
-#define ADT_pool_export 46
-#define ADT_pool_import 45
-#define ADT_printer_add 10
-#define ADT_printer_delete 11
-#define ADT_printer_modify 12
-#define ADT_prof_cmd 24
-#define ADT_remove 44
-#define ADT_rlogin 28
-#define ADT_role_login 13
-#define ADT_role_logout 40
-#define ADT_scheduledjob_add 14
-#define ADT_scheduledjob_delete 15
-#define ADT_scheduledjob_modify 16
-#define ADT_screenlock 26
-#define ADT_screenunlock 31
-#define ADT_serialport_add 17
-#define ADT_serialport_delete 18
-#define ADT_serialport_modify 19
-#define ADT_ssh 2
-#define ADT_su 30
-#define ADT_su_logout 39
-#define ADT_telnet 29
-#define ADT_uauth 20
-#define ADT_usermgr_add 21
-#define ADT_usermgr_delete 22
-#define ADT_usermgr_modify 23
-#define ADT_zlogin 38
-#define ADT_zone_state 33
-
-
-struct adt_admin_authenticate { /* ADT_admin_authenticate */
- enum adt_login_text message; /* optional */
-};
-typedef struct adt_admin_authenticate adt_admin_authenticate_t;
-
-struct adt_attach { /* ADT_attach */
- char *auth_used; /* required */
- char *mount_point; /* required */
- char *device; /* required */
- char *options; /* optional */
-};
-typedef struct adt_attach adt_attach_t;
-
-struct adt_detach { /* ADT_detach */
- char *auth_used; /* required */
- char *mount_point; /* required */
- char *device; /* required */
- char *options; /* optional */
-};
-typedef struct adt_detach adt_detach_t;
-
-struct adt_dladm_create_secobj { /* ADT_dladm_create_secobj */
- char *auth_used; /* required */
- char *obj_class; /* required */
- char *obj_name; /* required */
-};
-typedef struct adt_dladm_create_secobj adt_dladm_create_secobj_t;
-
-struct adt_dladm_delete_secobj { /* ADT_dladm_delete_secobj */
- char *auth_used; /* required */
- char *obj_class; /* required */
- char *obj_name; /* required */
-};
-typedef struct adt_dladm_delete_secobj adt_dladm_delete_secobj_t;
-
-struct adt_file_copy { /* ADT_file_copy */
- char *auth_used; /* required */
- char *src_file; /* required */
- m_label_t *src_label; /* required */
- char *dst_file; /* required */
- m_label_t *dst_label; /* required */
-};
-typedef struct adt_file_copy adt_file_copy_t;
-
-struct adt_file_relabel { /* ADT_file_relabel */
- char *auth_used; /* required */
- char *file; /* required */
- m_label_t *src_label; /* required */
- m_label_t *dst_label; /* required */
-};
-typedef struct adt_file_relabel adt_file_relabel_t;
-
-struct adt_filesystem_add { /* ADT_filesystem_add */
- char *object_name; /* required */
- char *domain; /* optional */
- char *name_service; /* required */
- char *auth_used; /* optional */
- char *initial_values; /* required */
-};
-typedef struct adt_filesystem_add adt_filesystem_add_t;
-
-struct adt_filesystem_delete { /* ADT_filesystem_delete */
- char *object_name; /* required */
- char *domain; /* optional */
- char *name_service; /* required */
- char *auth_used; /* optional */
- char *delete_values; /* required */
-};
-typedef struct adt_filesystem_delete adt_filesystem_delete_t;
-
-struct adt_filesystem_modify { /* ADT_filesystem_modify */
- char *object_name; /* required */
- char *domain; /* optional */
- char *name_service; /* required */
- char *auth_used; /* optional */
- char *changed_values; /* required */
-};
-typedef struct adt_filesystem_modify adt_filesystem_modify_t;
-
-struct adt_inetd_connect { /* ADT_inetd_connect */
- char *service_name; /* optional */
- uint32_t ip_type; /* required */
- uint16_t ip_remote_port; /* required */
- uint16_t ip_local_port; /* required */
- uint32_t ip_adr[4]; /* required */
- char *cmd; /* required */
- priv_set_t *privileges; /* required */
-};
-typedef struct adt_inetd_connect adt_inetd_connect_t;
-
-struct adt_inetd_copylimit { /* ADT_inetd_copylimit */
- char *service_name; /* optional */
- char *limit; /* required */
-};
-typedef struct adt_inetd_copylimit adt_inetd_copylimit_t;
-
-struct adt_inetd_failrate { /* ADT_inetd_failrate */
- char *service_name; /* optional */
- char *values; /* required */
-};
-typedef struct adt_inetd_failrate adt_inetd_failrate_t;
-
-struct adt_inetd_ratelimit { /* ADT_inetd_ratelimit */
- char *service_name; /* optional */
- char *limit; /* required */
-};
-typedef struct adt_inetd_ratelimit adt_inetd_ratelimit_t;
-
-struct adt_init_solaris { /* ADT_init_solaris */
- char *info; /* optional */
-};
-typedef struct adt_init_solaris adt_init_solaris_t;
-
-struct adt_login { /* ADT_login */
- enum adt_login_text message; /* optional */
-};
-typedef struct adt_login adt_login_t;
-
-struct adt_logout { /* ADT_logout */
- char *user_name; /* optional (format: logout %s) */
-};
-typedef struct adt_logout adt_logout_t;
-
-struct adt_network_add { /* ADT_network_add */
- char *object_name; /* required */
- char *domain; /* optional */
- char *name_service; /* required */
- char *auth_used; /* optional */
- char *initial_values; /* required */
-};
-typedef struct adt_network_add adt_network_add_t;
-
-struct adt_network_delete { /* ADT_network_delete */
- char *object_name; /* required */
- char *domain; /* optional */
- char *name_service; /* required */
- char *auth_used; /* optional */
- char *delete_values; /* required */
-};
-typedef struct adt_network_delete adt_network_delete_t;
-
-struct adt_network_modify { /* ADT_network_modify */
- char *object_name; /* required */
- char *domain; /* optional */
- char *name_service; /* required */
- char *auth_used; /* optional */
- char *changed_values; /* required */
-};
-typedef struct adt_network_modify adt_network_modify_t;
-
-struct adt_newgrp_login { /* ADT_newgrp_login */
- char *groupname; /* required */
-};
-typedef struct adt_newgrp_login adt_newgrp_login_t;
-
-struct adt_passwd { /* ADT_passwd */
- char *username; /* optional */
-};
-typedef struct adt_passwd adt_passwd_t;
-
-struct adt_pool_export { /* ADT_pool_export */
- char *auth_used; /* required */
- char *pool; /* required */
- char *device; /* required */
-};
-typedef struct adt_pool_export adt_pool_export_t;
-
-struct adt_pool_import { /* ADT_pool_import */
- char *auth_used; /* required */
- char *pool; /* required */
- char *device; /* required */
-};
-typedef struct adt_pool_import adt_pool_import_t;
-
-struct adt_printer_add { /* ADT_printer_add */
- char *object_name; /* required */
- char *domain; /* optional */
- char *name_service; /* required */
- char *auth_used; /* optional */
- char *initial_values; /* required */
-};
-typedef struct adt_printer_add adt_printer_add_t;
-
-struct adt_printer_delete { /* ADT_printer_delete */
- char *object_name; /* required */
- char *domain; /* optional */
- char *name_service; /* required */
- char *auth_used; /* optional */
- char *delete_values; /* required */
-};
-typedef struct adt_printer_delete adt_printer_delete_t;
-
-struct adt_printer_modify { /* ADT_printer_modify */
- char *object_name; /* required */
- char *domain; /* optional */
- char *name_service; /* required */
- char *auth_used; /* optional */
- char *changed_values; /* required */
-};
-typedef struct adt_printer_modify adt_printer_modify_t;
-
-struct adt_prof_cmd { /* ADT_prof_cmd */
- char *cwdpath; /* required */
- char *cmdpath; /* required */
- int argc; /* required */
- char **argv; /* required */
- char **envp; /* required */
- uid_t proc_auid; /* required */
- uid_t proc_euid; /* required */
- gid_t proc_egid; /* required */
- uid_t proc_ruid; /* required */
- gid_t proc_rgid; /* required */
- pid_t proc_pid; /* required */
- au_asid_t proc_sid; /* required */
- adt_termid_t *proc_termid; /* required */
- priv_set_t *limit_set; /* optional */
- priv_set_t *inherit_set; /* optional */
-};
-typedef struct adt_prof_cmd adt_prof_cmd_t;
-
-struct adt_remove { /* ADT_remove */
- char *auth_used; /* required */
- char *mount_point; /* optional */
- char *device; /* required */
-};
-typedef struct adt_remove adt_remove_t;
-
-struct adt_rlogin { /* ADT_rlogin */
- enum adt_login_text message; /* optional */
-};
-typedef struct adt_rlogin adt_rlogin_t;
-
-struct adt_role_login { /* ADT_role_login */
- enum adt_login_text message; /* optional */
-};
-typedef struct adt_role_login adt_role_login_t;
-
-struct adt_role_logout { /* ADT_role_logout */
- int dummy; /* not used */
-};
-typedef struct adt_role_logout adt_role_logout_t;
-
-struct adt_scheduledjob_add { /* ADT_scheduledjob_add */
- char *object_name; /* required */
- char *domain; /* optional */
- char *name_service; /* required */
- char *auth_used; /* optional */
- char *initial_values; /* required */
-};
-typedef struct adt_scheduledjob_add adt_scheduledjob_add_t;
-
-struct adt_scheduledjob_delete { /* ADT_scheduledjob_delete */
- char *object_name; /* required */
- char *domain; /* optional */
- char *name_service; /* required */
- char *auth_used; /* optional */
- char *delete_values; /* required */
-};
-typedef struct adt_scheduledjob_delete adt_scheduledjob_delete_t;
-
-struct adt_scheduledjob_modify { /* ADT_scheduledjob_modify */
- char *object_name; /* required */
- char *domain; /* optional */
- char *name_service; /* required */
- char *auth_used; /* optional */
- char *changed_values; /* required */
-};
-typedef struct adt_scheduledjob_modify adt_scheduledjob_modify_t;
-
-struct adt_screenlock { /* ADT_screenlock */
- int dummy; /* not used */
-};
-typedef struct adt_screenlock adt_screenlock_t;
-
-struct adt_screenunlock { /* ADT_screenunlock */
- int dummy; /* not used */
-};
-typedef struct adt_screenunlock adt_screenunlock_t;
-
-struct adt_serialport_add { /* ADT_serialport_add */
- char *object_name; /* required */
- char *domain; /* optional */
- char *name_service; /* required */
- char *auth_used; /* optional */
- char *initial_values; /* required */
-};
-typedef struct adt_serialport_add adt_serialport_add_t;
-
-struct adt_serialport_delete { /* ADT_serialport_delete */
- char *object_name; /* required */
- char *domain; /* optional */
- char *name_service; /* required */
- char *auth_used; /* optional */
- char *delete_values; /* required */
-};
-typedef struct adt_serialport_delete adt_serialport_delete_t;
-
-struct adt_serialport_modify { /* ADT_serialport_modify */
- char *object_name; /* required */
- char *domain; /* optional */
- char *name_service; /* required */
- char *auth_used; /* optional */
- char *changed_values; /* required */
-};
-typedef struct adt_serialport_modify adt_serialport_modify_t;
-
-struct adt_ssh { /* ADT_ssh */
- enum adt_login_text message; /* optional */
-};
-typedef struct adt_ssh adt_ssh_t;
-
-struct adt_su { /* ADT_su */
- char *message; /* optional */
-};
-typedef struct adt_su adt_su_t;
-
-struct adt_su_logout { /* ADT_su_logout */
- int dummy; /* not used */
-};
-typedef struct adt_su_logout adt_su_logout_t;
-
-struct adt_telnet { /* ADT_telnet */
- enum adt_login_text message; /* optional */
-};
-typedef struct adt_telnet adt_telnet_t;
-
-struct adt_uauth { /* ADT_uauth */
- char *auth_used; /* required */
- char *objectname; /* required */
-};
-typedef struct adt_uauth adt_uauth_t;
-
-struct adt_usermgr_add { /* ADT_usermgr_add */
- char *object_name; /* required */
- char *domain; /* optional */
- char *name_service; /* required */
- char *auth_used; /* optional */
- char *initial_values; /* required */
-};
-typedef struct adt_usermgr_add adt_usermgr_add_t;
-
-struct adt_usermgr_delete { /* ADT_usermgr_delete */
- char *object_name; /* required */
- char *domain; /* optional */
- char *name_service; /* required */
- char *auth_used; /* optional */
- char *delete_values; /* required */
-};
-typedef struct adt_usermgr_delete adt_usermgr_delete_t;
-
-struct adt_usermgr_modify { /* ADT_usermgr_modify */
- char *object_name; /* required */
- char *domain; /* optional */
- char *name_service; /* required */
- char *auth_used; /* optional */
- char *changed_values; /* required */
-};
-typedef struct adt_usermgr_modify adt_usermgr_modify_t;
-
-struct adt_zlogin { /* ADT_zlogin */
- char *message; /* optional */
-};
-typedef struct adt_zlogin adt_zlogin_t;
-
-struct adt_zone_state { /* ADT_zone_state */
- char *new_state; /* required */
- char *zonename; /* required */
-};
-typedef struct adt_zone_state adt_zone_state_t;
-
-union adt_event_data {
- adt_admin_authenticate_t adt_admin_authenticate;
- adt_attach_t adt_attach;
- adt_detach_t adt_detach;
- adt_dladm_create_secobj_t adt_dladm_create_secobj;
- adt_dladm_delete_secobj_t adt_dladm_delete_secobj;
- adt_file_copy_t adt_file_copy;
- adt_file_relabel_t adt_file_relabel;
- adt_filesystem_add_t adt_filesystem_add;
- adt_filesystem_delete_t adt_filesystem_delete;
- adt_filesystem_modify_t adt_filesystem_modify;
- adt_inetd_connect_t adt_inetd_connect;
- adt_inetd_copylimit_t adt_inetd_copylimit;
- adt_inetd_failrate_t adt_inetd_failrate;
- adt_inetd_ratelimit_t adt_inetd_ratelimit;
- adt_init_solaris_t adt_init_solaris;
- adt_login_t adt_login;
- adt_logout_t adt_logout;
- adt_network_add_t adt_network_add;
- adt_network_delete_t adt_network_delete;
- adt_network_modify_t adt_network_modify;
- adt_newgrp_login_t adt_newgrp_login;
- adt_passwd_t adt_passwd;
- adt_pool_export_t adt_pool_export;
- adt_pool_import_t adt_pool_import;
- adt_printer_add_t adt_printer_add;
- adt_printer_delete_t adt_printer_delete;
- adt_printer_modify_t adt_printer_modify;
- adt_prof_cmd_t adt_prof_cmd;
- adt_remove_t adt_remove;
- adt_rlogin_t adt_rlogin;
- adt_role_login_t adt_role_login;
- adt_role_logout_t adt_role_logout;
- adt_scheduledjob_add_t adt_scheduledjob_add;
- adt_scheduledjob_delete_t adt_scheduledjob_delete;
- adt_scheduledjob_modify_t adt_scheduledjob_modify;
- adt_screenlock_t adt_screenlock;
- adt_screenunlock_t adt_screenunlock;
- adt_serialport_add_t adt_serialport_add;
- adt_serialport_delete_t adt_serialport_delete;
- adt_serialport_modify_t adt_serialport_modify;
- adt_ssh_t adt_ssh;
- adt_su_t adt_su;
- adt_su_logout_t adt_su_logout;
- adt_telnet_t adt_telnet;
- adt_uauth_t adt_uauth;
- adt_usermgr_add_t adt_usermgr_add;
- adt_usermgr_delete_t adt_usermgr_delete;
- adt_usermgr_modify_t adt_usermgr_modify;
- adt_zlogin_t adt_zlogin;
- adt_zone_state_t adt_zone_state;
-};
-
-
-#ifndef ADT_PRIVATE
-#define ADT_PRIVATE
-
-/*
- * These interfaces are project private and will change without
- * notice as needed for the BSM API project.
- */
-
-extern void adt_get_auid(const adt_session_data_t *, au_id_t *);
-extern void adt_set_auid(const adt_session_data_t *, const au_id_t);
-
-extern void adt_get_mask(const adt_session_data_t *, au_mask_t *);
-extern void adt_set_mask(const adt_session_data_t *, const au_mask_t *);
-
-extern void adt_get_termid(const adt_session_data_t *, au_tid_addr_t *);
-extern void adt_set_termid(const adt_session_data_t *,
- const au_tid_addr_t *);
-
-extern void adt_get_asid(const adt_session_data_t *, au_asid_t *);
-extern void adt_set_asid(const adt_session_data_t *, const au_asid_t);
-
-#endif
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _ADT_EVENT_H */
diff --git a/usr/src/lib/libbsm/common/adt_xlate.c b/usr/src/lib/libbsm/common/adt_xlate.c
deleted file mode 100644
index b3565f6f12..0000000000
--- a/usr/src/lib/libbsm/common/adt_xlate.c
+++ /dev/null
@@ -1,1186 +0,0 @@
-/*
- * 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
- * or http://www.opensolaris.org/os/licensing.
- * 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
- */
-/*
- * adt_xlate.c
- *
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- *
- * AUTOMATICALLY GENERATED CODE; DO NOT EDIT; CONTACT AUDIT PROJECT
- */
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include <bsm/libbsm.h>
-#include <adt_xlate.h>
-#include <libintl.h>
-
-#ifndef _PRAUDIT
-/* Internal data type definitions */
-
-static datadef adr0[1] = {{ADT_MSG, ADT_LIST_LOGIN_TEXT}};
-static datadef adr1[1] = {{ADT_CHARSTAR, sizeof (char *)}};
-static datadef adr2[3] = {{ADT_INT, sizeof (int)},
- {ADT_CHAR2STAR, sizeof (char **)},
- {ADT_CHAR2STAR, sizeof (char **)}};
-static datadef adr3[8] = {{ADT_UID, sizeof (uid_t)},
- {ADT_UID, sizeof (uid_t)},
- {ADT_GID, sizeof (gid_t)},
- {ADT_UID, sizeof (uid_t)},
- {ADT_GID, sizeof (gid_t)},
- {ADT_PID, sizeof (pid_t)},
- {ADT_UINT32, sizeof (au_asid_t)},
- {ADT_TERMIDSTAR, sizeof (au_tid_addr_t *)}};
-static datadef adr4[1] = {{ADT_PRIVSTAR, sizeof (priv_set_t *)}};
-static datadef adr5[4] = {{ADT_UINT32, sizeof (uint32_t)},
- {ADT_UINT16, sizeof (uint16_t)},
- {ADT_UINT16, sizeof (uint16_t)},
- {ADT_UINT32ARRAY, 4 * sizeof (uint32_t)}};
-static datadef adr6[1] = {{ADT_MLABELSTAR, sizeof (m_label_t *)}};
-
-/* External event structure to internal event structure */
-
-static struct entry XX_admin_authenticate[3] = {
- {AUT_SUBJECT, 1, NULL, &(XX_admin_authenticate[1]),
- 0, 0, 0, NULL},
- {AUT_TEXT, 1, &adr0[0], &(XX_admin_authenticate[2]),
- 0, 0, 0, NULL},
- {AUT_RETURN, 1, NULL, NULL,
- 0, 0, 0, NULL}
-};
-static struct translation X_admin_authenticate = {
- 0,
- ADT_admin_authenticate,
- AUE_admin_authenticate,
- 3,
- &XX_admin_authenticate[0],
- &XX_admin_authenticate[0]
-};
-static struct entry XX_attach[6] = {
- {AUT_SUBJECT, 1, NULL, &(XX_attach[1]),
- 0, 0, 0, NULL},
- {AUT_UAUTH, 1, &adr1[0], &(XX_attach[2]),
- 0, 1, 0, NULL},
- {AUT_PATH, 1, &adr1[0], &(XX_attach[3]),
- 0, 1, 0, NULL},
- {AUT_PATH, 1, &adr1[0], &(XX_attach[4]),
- 0, 1, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_attach[5]),
- 0, 0, 0, NULL},
- {AUT_RETURN, 1, NULL, NULL,
- 0, 0, 0, NULL}
-};
-static struct translation X_attach = {
- 0,
- ADT_attach,
- AUE_attach,
- 6,
- &XX_attach[0],
- &XX_attach[0]
-};
-static struct entry XX_detach[6] = {
- {AUT_SUBJECT, 1, NULL, &(XX_detach[1]),
- 0, 0, 0, NULL},
- {AUT_UAUTH, 1, &adr1[0], &(XX_detach[2]),
- 0, 1, 0, NULL},
- {AUT_PATH, 1, &adr1[0], &(XX_detach[3]),
- 0, 1, 0, NULL},
- {AUT_PATH, 1, &adr1[0], &(XX_detach[4]),
- 0, 1, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_detach[5]),
- 0, 0, 0, NULL},
- {AUT_RETURN, 1, NULL, NULL,
- 0, 0, 0, NULL}
-};
-static struct translation X_detach = {
- 0,
- ADT_detach,
- AUE_detach,
- 6,
- &XX_detach[0],
- &XX_detach[0]
-};
-static struct entry XX_dladm_create_secobj[5] = {
- {AUT_SUBJECT, 1, NULL, &(XX_dladm_create_secobj[1]),
- 0, 0, 0, NULL},
- {AUT_UAUTH, 1, &adr1[0], &(XX_dladm_create_secobj[2]),
- 0, 1, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_dladm_create_secobj[3]),
- 0, 1, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_dladm_create_secobj[4]),
- 0, 1, 0, NULL},
- {AUT_RETURN, 1, NULL, NULL,
- 0, 0, 0, NULL}
-};
-static struct translation X_dladm_create_secobj = {
- 0,
- ADT_dladm_create_secobj,
- AUE_dladm_create_secobj,
- 5,
- &XX_dladm_create_secobj[0],
- &XX_dladm_create_secobj[0]
-};
-static struct entry XX_dladm_delete_secobj[5] = {
- {AUT_SUBJECT, 1, NULL, &(XX_dladm_delete_secobj[1]),
- 0, 0, 0, NULL},
- {AUT_UAUTH, 1, &adr1[0], &(XX_dladm_delete_secobj[2]),
- 0, 1, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_dladm_delete_secobj[3]),
- 0, 1, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_dladm_delete_secobj[4]),
- 0, 1, 0, NULL},
- {AUT_RETURN, 1, NULL, NULL,
- 0, 0, 0, NULL}
-};
-static struct translation X_dladm_delete_secobj = {
- 0,
- ADT_dladm_delete_secobj,
- AUE_dladm_delete_secobj,
- 5,
- &XX_dladm_delete_secobj[0],
- &XX_dladm_delete_secobj[0]
-};
-static struct entry XX_file_copy[7] = {
- {AUT_SUBJECT, 1, NULL, &(XX_file_copy[1]),
- 0, 0, 0, NULL},
- {AUT_UAUTH, 1, &adr1[0], &(XX_file_copy[2]),
- 0, 1, 0, NULL},
- {AUT_PATH, 1, &adr1[0], &(XX_file_copy[3]),
- 0, 1, 0, NULL},
- {AUT_LABEL, 1, &adr6[0], &(XX_file_copy[4]),
- 0, 1, 0, NULL},
- {AUT_PATH, 1, &adr1[0], &(XX_file_copy[5]),
- 0, 1, 0, NULL},
- {AUT_LABEL, 1, &adr6[0], &(XX_file_copy[6]),
- 0, 1, 0, NULL},
- {AUT_RETURN, 1, NULL, NULL,
- 0, 0, 0, NULL}
-};
-static struct translation X_file_copy = {
- 0,
- ADT_file_copy,
- AUE_file_copy,
- 7,
- &XX_file_copy[0],
- &XX_file_copy[0]
-};
-static struct entry XX_file_relabel[6] = {
- {AUT_SUBJECT, 1, NULL, &(XX_file_relabel[1]),
- 0, 0, 0, NULL},
- {AUT_UAUTH, 1, &adr1[0], &(XX_file_relabel[2]),
- 0, 1, 0, NULL},
- {AUT_PATH, 1, &adr1[0], &(XX_file_relabel[3]),
- 0, 1, 0, NULL},
- {AUT_LABEL, 1, &adr6[0], &(XX_file_relabel[4]),
- 0, 1, 0, NULL},
- {AUT_LABEL, 1, &adr6[0], &(XX_file_relabel[5]),
- 0, 1, 0, NULL},
- {AUT_RETURN, 1, NULL, NULL,
- 0, 0, 0, NULL}
-};
-static struct translation X_file_relabel = {
- 0,
- ADT_file_relabel,
- AUE_file_relabel,
- 6,
- &XX_file_relabel[0],
- &XX_file_relabel[0]
-};
-static struct entry XX_filesystem_add[7] = {
- {AUT_SUBJECT, 1, NULL, &(XX_filesystem_add[1]),
- 0, 0, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_filesystem_add[2]),
- 0, 1, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_filesystem_add[3]),
- 0, 0, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_filesystem_add[4]),
- 0, 1, 0, NULL},
- {AUT_UAUTH, 1, &adr1[0], &(XX_filesystem_add[5]),
- 0, 0, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_filesystem_add[6]),
- 0, 1, 0, NULL},
- {AUT_RETURN, 1, NULL, NULL,
- 0, 0, 0, NULL}
-};
-static struct translation X_filesystem_add = {
- 0,
- ADT_filesystem_add,
- AUE_filesystem_add,
- 7,
- &XX_filesystem_add[0],
- &XX_filesystem_add[0]
-};
-static struct entry XX_filesystem_delete[7] = {
- {AUT_SUBJECT, 1, NULL, &(XX_filesystem_delete[1]),
- 0, 0, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_filesystem_delete[2]),
- 0, 1, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_filesystem_delete[3]),
- 0, 0, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_filesystem_delete[4]),
- 0, 1, 0, NULL},
- {AUT_UAUTH, 1, &adr1[0], &(XX_filesystem_delete[5]),
- 0, 0, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_filesystem_delete[6]),
- 0, 1, 0, NULL},
- {AUT_RETURN, 1, NULL, NULL,
- 0, 0, 0, NULL}
-};
-static struct translation X_filesystem_delete = {
- 0,
- ADT_filesystem_delete,
- AUE_filesystem_delete,
- 7,
- &XX_filesystem_delete[0],
- &XX_filesystem_delete[0]
-};
-static struct entry XX_filesystem_modify[7] = {
- {AUT_SUBJECT, 1, NULL, &(XX_filesystem_modify[1]),
- 0, 0, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_filesystem_modify[2]),
- 0, 1, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_filesystem_modify[3]),
- 0, 0, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_filesystem_modify[4]),
- 0, 1, 0, NULL},
- {AUT_UAUTH, 1, &adr1[0], &(XX_filesystem_modify[5]),
- 0, 0, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_filesystem_modify[6]),
- 0, 1, 0, NULL},
- {AUT_RETURN, 1, NULL, NULL,
- 0, 0, 0, NULL}
-};
-static struct translation X_filesystem_modify = {
- 0,
- ADT_filesystem_modify,
- AUE_filesystem_modify,
- 7,
- &XX_filesystem_modify[0],
- &XX_filesystem_modify[0]
-};
-static struct entry XX_inetd_connect[6] = {
- {AUT_SUBJECT, 1, NULL, &(XX_inetd_connect[1]),
- 0, 0, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_inetd_connect[2]),
- 0, 0, 0, NULL},
- {AUT_TID, 4, &adr5[0], &(XX_inetd_connect[3]),
- 0, 1, 0, NULL},
- {ADT_CMD_ALT, 1, &adr1[0], &(XX_inetd_connect[4]),
- 0, 1, 0, NULL},
- {ADT_AUT_PRIV_E, 1, &adr4[0], &(XX_inetd_connect[5]),
- 0, 1, 0, NULL},
- {AUT_RETURN, 1, NULL, NULL,
- 0, 0, 0, NULL}
-};
-static struct translation X_inetd_connect = {
- 0,
- ADT_inetd_connect,
- AUE_inetd_connect,
- 6,
- &XX_inetd_connect[0],
- &XX_inetd_connect[0]
-};
-static struct entry XX_inetd_copylimit[4] = {
- {AUT_SUBJECT, 1, NULL, &(XX_inetd_copylimit[1]),
- 0, 0, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_inetd_copylimit[2]),
- 0, 0, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_inetd_copylimit[3]),
- 0, 1, 0, NULL},
- {AUT_RETURN, 1, NULL, NULL,
- 0, 0, 0, NULL}
-};
-static struct translation X_inetd_copylimit = {
- 0,
- ADT_inetd_copylimit,
- AUE_inetd_copylimit,
- 4,
- &XX_inetd_copylimit[0],
- &XX_inetd_copylimit[0]
-};
-static struct entry XX_inetd_failrate[4] = {
- {AUT_SUBJECT, 1, NULL, &(XX_inetd_failrate[1]),
- 0, 0, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_inetd_failrate[2]),
- 0, 0, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_inetd_failrate[3]),
- 0, 1, 0, NULL},
- {AUT_RETURN, 1, NULL, NULL,
- 0, 0, 0, NULL}
-};
-static struct translation X_inetd_failrate = {
- 0,
- ADT_inetd_failrate,
- AUE_inetd_failrate,
- 4,
- &XX_inetd_failrate[0],
- &XX_inetd_failrate[0]
-};
-static struct entry XX_inetd_ratelimit[4] = {
- {AUT_SUBJECT, 1, NULL, &(XX_inetd_ratelimit[1]),
- 0, 0, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_inetd_ratelimit[2]),
- 0, 0, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_inetd_ratelimit[3]),
- 0, 1, 0, NULL},
- {AUT_RETURN, 1, NULL, NULL,
- 0, 0, 0, NULL}
-};
-static struct translation X_inetd_ratelimit = {
- 0,
- ADT_inetd_ratelimit,
- AUE_inetd_ratelimit,
- 4,
- &XX_inetd_ratelimit[0],
- &XX_inetd_ratelimit[0]
-};
-static struct entry XX_init_solaris[3] = {
- {AUT_SUBJECT, 1, NULL, &(XX_init_solaris[1]),
- 0, 0, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_init_solaris[2]),
- 0, 0, 0, NULL},
- {AUT_RETURN, 1, NULL, NULL,
- 0, 0, 0, NULL}
-};
-static struct translation X_init_solaris = {
- 0,
- ADT_init_solaris,
- AUE_init_solaris,
- 3,
- &XX_init_solaris[0],
- &XX_init_solaris[0]
-};
-static struct entry XX_login[3] = {
- {AUT_SUBJECT, 1, NULL, &(XX_login[1]),
- 0, 0, 0, NULL},
- {AUT_TEXT, 1, &adr0[0], &(XX_login[2]),
- 0, 0, 0, NULL},
- {AUT_RETURN, 1, NULL, NULL,
- 0, 0, 0, NULL}
-};
-static struct translation X_login = {
- 0,
- ADT_login,
- AUE_login,
- 3,
- &XX_login[0],
- &XX_login[0]
-};
-static struct entry XX_logout[3] = {
- {AUT_SUBJECT, 1, NULL, &(XX_logout[1]),
- 0, 0, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_logout[2]),
- 0, 0, 0, "logout %s"},
- {AUT_RETURN, 1, NULL, NULL,
- 0, 0, 0, NULL}
-};
-static struct translation X_logout = {
- 0,
- ADT_logout,
- AUE_logout,
- 3,
- &XX_logout[0],
- &XX_logout[0]
-};
-static struct entry XX_network_add[7] = {
- {AUT_SUBJECT, 1, NULL, &(XX_network_add[1]),
- 0, 0, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_network_add[2]),
- 0, 1, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_network_add[3]),
- 0, 0, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_network_add[4]),
- 0, 1, 0, NULL},
- {AUT_UAUTH, 1, &adr1[0], &(XX_network_add[5]),
- 0, 0, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_network_add[6]),
- 0, 1, 0, NULL},
- {AUT_RETURN, 1, NULL, NULL,
- 0, 0, 0, NULL}
-};
-static struct translation X_network_add = {
- 0,
- ADT_network_add,
- AUE_network_add,
- 7,
- &XX_network_add[0],
- &XX_network_add[0]
-};
-static struct entry XX_network_delete[7] = {
- {AUT_SUBJECT, 1, NULL, &(XX_network_delete[1]),
- 0, 0, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_network_delete[2]),
- 0, 1, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_network_delete[3]),
- 0, 0, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_network_delete[4]),
- 0, 1, 0, NULL},
- {AUT_UAUTH, 1, &adr1[0], &(XX_network_delete[5]),
- 0, 0, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_network_delete[6]),
- 0, 1, 0, NULL},
- {AUT_RETURN, 1, NULL, NULL,
- 0, 0, 0, NULL}
-};
-static struct translation X_network_delete = {
- 0,
- ADT_network_delete,
- AUE_network_delete,
- 7,
- &XX_network_delete[0],
- &XX_network_delete[0]
-};
-static struct entry XX_network_modify[7] = {
- {AUT_SUBJECT, 1, NULL, &(XX_network_modify[1]),
- 0, 0, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_network_modify[2]),
- 0, 1, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_network_modify[3]),
- 0, 0, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_network_modify[4]),
- 0, 1, 0, NULL},
- {AUT_UAUTH, 1, &adr1[0], &(XX_network_modify[5]),
- 0, 0, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_network_modify[6]),
- 0, 1, 0, NULL},
- {AUT_RETURN, 1, NULL, NULL,
- 0, 0, 0, NULL}
-};
-static struct translation X_network_modify = {
- 0,
- ADT_network_modify,
- AUE_network_modify,
- 7,
- &XX_network_modify[0],
- &XX_network_modify[0]
-};
-static struct entry XX_newgrp_login[3] = {
- {AUT_SUBJECT, 1, NULL, &(XX_newgrp_login[1]),
- 0, 0, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_newgrp_login[2]),
- 0, 1, 0, NULL},
- {AUT_RETURN, 1, NULL, NULL,
- 0, 0, 0, NULL}
-};
-static struct translation X_newgrp_login = {
- 0,
- ADT_newgrp_login,
- AUE_newgrp_login,
- 3,
- &XX_newgrp_login[0],
- &XX_newgrp_login[0]
-};
-static struct entry XX_passwd[3] = {
- {AUT_SUBJECT, 1, NULL, &(XX_passwd[1]),
- 0, 0, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_passwd[2]),
- 0, 0, 0, NULL},
- {AUT_RETURN, 1, NULL, NULL,
- 0, 0, 0, NULL}
-};
-static struct translation X_passwd = {
- 0,
- ADT_passwd,
- AUE_passwd,
- 3,
- &XX_passwd[0],
- &XX_passwd[0]
-};
-static struct entry XX_pool_export[5] = {
- {AUT_SUBJECT, 1, NULL, &(XX_pool_export[1]),
- 0, 0, 0, NULL},
- {AUT_UAUTH, 1, &adr1[0], &(XX_pool_export[2]),
- 0, 1, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_pool_export[3]),
- 0, 1, 0, NULL},
- {AUT_PATH, 1, &adr1[0], &(XX_pool_export[4]),
- 0, 1, 0, NULL},
- {AUT_RETURN, 1, NULL, NULL,
- 0, 0, 0, NULL}
-};
-static struct translation X_pool_export = {
- 0,
- ADT_pool_export,
- AUE_pool_export,
- 5,
- &XX_pool_export[0],
- &XX_pool_export[0]
-};
-static struct entry XX_pool_import[5] = {
- {AUT_SUBJECT, 1, NULL, &(XX_pool_import[1]),
- 0, 0, 0, NULL},
- {AUT_UAUTH, 1, &adr1[0], &(XX_pool_import[2]),
- 0, 1, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_pool_import[3]),
- 0, 1, 0, NULL},
- {AUT_PATH, 1, &adr1[0], &(XX_pool_import[4]),
- 0, 1, 0, NULL},
- {AUT_RETURN, 1, NULL, NULL,
- 0, 0, 0, NULL}
-};
-static struct translation X_pool_import = {
- 0,
- ADT_pool_import,
- AUE_pool_import,
- 5,
- &XX_pool_import[0],
- &XX_pool_import[0]
-};
-static struct entry XX_printer_add[7] = {
- {AUT_SUBJECT, 1, NULL, &(XX_printer_add[1]),
- 0, 0, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_printer_add[2]),
- 0, 1, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_printer_add[3]),
- 0, 0, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_printer_add[4]),
- 0, 1, 0, NULL},
- {AUT_UAUTH, 1, &adr1[0], &(XX_printer_add[5]),
- 0, 0, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_printer_add[6]),
- 0, 1, 0, NULL},
- {AUT_RETURN, 1, NULL, NULL,
- 0, 0, 0, NULL}
-};
-static struct translation X_printer_add = {
- 0,
- ADT_printer_add,
- AUE_printer_add,
- 7,
- &XX_printer_add[0],
- &XX_printer_add[0]
-};
-static struct entry XX_printer_delete[7] = {
- {AUT_SUBJECT, 1, NULL, &(XX_printer_delete[1]),
- 0, 0, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_printer_delete[2]),
- 0, 1, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_printer_delete[3]),
- 0, 0, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_printer_delete[4]),
- 0, 1, 0, NULL},
- {AUT_UAUTH, 1, &adr1[0], &(XX_printer_delete[5]),
- 0, 0, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_printer_delete[6]),
- 0, 1, 0, NULL},
- {AUT_RETURN, 1, NULL, NULL,
- 0, 0, 0, NULL}
-};
-static struct translation X_printer_delete = {
- 0,
- ADT_printer_delete,
- AUE_printer_delete,
- 7,
- &XX_printer_delete[0],
- &XX_printer_delete[0]
-};
-static struct entry XX_printer_modify[7] = {
- {AUT_SUBJECT, 1, NULL, &(XX_printer_modify[1]),
- 0, 0, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_printer_modify[2]),
- 0, 1, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_printer_modify[3]),
- 0, 0, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_printer_modify[4]),
- 0, 1, 0, NULL},
- {AUT_UAUTH, 1, &adr1[0], &(XX_printer_modify[5]),
- 0, 0, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_printer_modify[6]),
- 0, 1, 0, NULL},
- {AUT_RETURN, 1, NULL, NULL,
- 0, 0, 0, NULL}
-};
-static struct translation X_printer_modify = {
- 0,
- ADT_printer_modify,
- AUE_printer_modify,
- 7,
- &XX_printer_modify[0],
- &XX_printer_modify[0]
-};
-static struct entry XX_prof_cmd[8] = {
- {AUT_SUBJECT, 1, NULL, &(XX_prof_cmd[1]),
- 0, 0, 0, NULL},
- {AUT_PATH, 1, &adr1[0], &(XX_prof_cmd[2]),
- 0, 1, 0, NULL},
- {AUT_PATH, 1, &adr1[0], &(XX_prof_cmd[3]),
- 0, 1, 0, NULL},
- {AUT_CMD, 3, &adr2[0], &(XX_prof_cmd[4]),
- 0, 1, 0, NULL},
- {AUT_PROCESS, 8, &adr3[0], &(XX_prof_cmd[5]),
- 0, 1, 0, NULL},
- {ADT_AUT_PRIV_L, 1, &adr4[0], &(XX_prof_cmd[6]),
- 0, 0, 0, NULL},
- {ADT_AUT_PRIV_I, 1, &adr4[0], &(XX_prof_cmd[7]),
- 0, 0, 0, NULL},
- {AUT_RETURN, 1, NULL, NULL,
- 0, 0, 0, NULL}
-};
-static struct translation X_prof_cmd = {
- 0,
- ADT_prof_cmd,
- AUE_prof_cmd,
- 8,
- &XX_prof_cmd[0],
- &XX_prof_cmd[0]
-};
-static struct entry XX_remove[5] = {
- {AUT_SUBJECT, 1, NULL, &(XX_remove[1]),
- 0, 0, 0, NULL},
- {AUT_UAUTH, 1, &adr1[0], &(XX_remove[2]),
- 0, 1, 0, NULL},
- {AUT_PATH, 1, &adr1[0], &(XX_remove[3]),
- 0, 0, 0, NULL},
- {AUT_PATH, 1, &adr1[0], &(XX_remove[4]),
- 0, 1, 0, NULL},
- {AUT_RETURN, 1, NULL, NULL,
- 0, 0, 0, NULL}
-};
-static struct translation X_remove = {
- 0,
- ADT_remove,
- AUE_remove,
- 5,
- &XX_remove[0],
- &XX_remove[0]
-};
-static struct entry XX_rlogin[3] = {
- {AUT_SUBJECT, 1, NULL, &(XX_rlogin[1]),
- 0, 0, 0, NULL},
- {AUT_TEXT, 1, &adr0[0], &(XX_rlogin[2]),
- 0, 0, 0, NULL},
- {AUT_RETURN, 1, NULL, NULL,
- 0, 0, 0, NULL}
-};
-static struct translation X_rlogin = {
- 0,
- ADT_rlogin,
- AUE_rlogin,
- 3,
- &XX_rlogin[0],
- &XX_rlogin[0]
-};
-static struct entry XX_role_login[3] = {
- {AUT_SUBJECT, 1, NULL, &(XX_role_login[1]),
- 0, 0, 0, NULL},
- {AUT_TEXT, 1, &adr0[0], &(XX_role_login[2]),
- 0, 0, 0, NULL},
- {AUT_RETURN, 1, NULL, NULL,
- 0, 0, 0, NULL}
-};
-static struct translation X_role_login = {
- 0,
- ADT_role_login,
- AUE_role_login,
- 3,
- &XX_role_login[0],
- &XX_role_login[0]
-};
-static struct entry XX_role_logout[2] = {
- {AUT_SUBJECT, 1, NULL, &(XX_role_logout[1]),
- 0, 0, 0, NULL},
- {AUT_RETURN, 1, NULL, NULL,
- 0, 0, 0, NULL}
-};
-static struct translation X_role_logout = {
- 0,
- ADT_role_logout,
- AUE_role_logout,
- 2,
- &XX_role_logout[0],
- &XX_role_logout[0]
-};
-static struct entry XX_scheduledjob_add[7] = {
- {AUT_SUBJECT, 1, NULL, &(XX_scheduledjob_add[1]),
- 0, 0, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_scheduledjob_add[2]),
- 0, 1, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_scheduledjob_add[3]),
- 0, 0, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_scheduledjob_add[4]),
- 0, 1, 0, NULL},
- {AUT_UAUTH, 1, &adr1[0], &(XX_scheduledjob_add[5]),
- 0, 0, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_scheduledjob_add[6]),
- 0, 1, 0, NULL},
- {AUT_RETURN, 1, NULL, NULL,
- 0, 0, 0, NULL}
-};
-static struct translation X_scheduledjob_add = {
- 0,
- ADT_scheduledjob_add,
- AUE_scheduledjob_add,
- 7,
- &XX_scheduledjob_add[0],
- &XX_scheduledjob_add[0]
-};
-static struct entry XX_scheduledjob_delete[7] = {
- {AUT_SUBJECT, 1, NULL, &(XX_scheduledjob_delete[1]),
- 0, 0, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_scheduledjob_delete[2]),
- 0, 1, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_scheduledjob_delete[3]),
- 0, 0, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_scheduledjob_delete[4]),
- 0, 1, 0, NULL},
- {AUT_UAUTH, 1, &adr1[0], &(XX_scheduledjob_delete[5]),
- 0, 0, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_scheduledjob_delete[6]),
- 0, 1, 0, NULL},
- {AUT_RETURN, 1, NULL, NULL,
- 0, 0, 0, NULL}
-};
-static struct translation X_scheduledjob_delete = {
- 0,
- ADT_scheduledjob_delete,
- AUE_scheduledjob_delete,
- 7,
- &XX_scheduledjob_delete[0],
- &XX_scheduledjob_delete[0]
-};
-static struct entry XX_scheduledjob_modify[7] = {
- {AUT_SUBJECT, 1, NULL, &(XX_scheduledjob_modify[1]),
- 0, 0, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_scheduledjob_modify[2]),
- 0, 1, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_scheduledjob_modify[3]),
- 0, 0, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_scheduledjob_modify[4]),
- 0, 1, 0, NULL},
- {AUT_UAUTH, 1, &adr1[0], &(XX_scheduledjob_modify[5]),
- 0, 0, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_scheduledjob_modify[6]),
- 0, 1, 0, NULL},
- {AUT_RETURN, 1, NULL, NULL,
- 0, 0, 0, NULL}
-};
-static struct translation X_scheduledjob_modify = {
- 0,
- ADT_scheduledjob_modify,
- AUE_scheduledjob_modify,
- 7,
- &XX_scheduledjob_modify[0],
- &XX_scheduledjob_modify[0]
-};
-static struct entry XX_screenlock[2] = {
- {AUT_SUBJECT, 1, NULL, &(XX_screenlock[1]),
- 0, 0, 0, NULL},
- {AUT_RETURN, 1, NULL, NULL,
- 0, 0, 0, NULL}
-};
-static struct translation X_screenlock = {
- 0,
- ADT_screenlock,
- AUE_screenlock,
- 2,
- &XX_screenlock[0],
- &XX_screenlock[0]
-};
-static struct entry XX_screenunlock[2] = {
- {AUT_SUBJECT, 1, NULL, &(XX_screenunlock[1]),
- 0, 0, 0, NULL},
- {AUT_RETURN, 1, NULL, NULL,
- 0, 0, 0, NULL}
-};
-static struct translation X_screenunlock = {
- 0,
- ADT_screenunlock,
- AUE_screenunlock,
- 2,
- &XX_screenunlock[0],
- &XX_screenunlock[0]
-};
-static struct entry XX_serialport_add[7] = {
- {AUT_SUBJECT, 1, NULL, &(XX_serialport_add[1]),
- 0, 0, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_serialport_add[2]),
- 0, 1, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_serialport_add[3]),
- 0, 0, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_serialport_add[4]),
- 0, 1, 0, NULL},
- {AUT_UAUTH, 1, &adr1[0], &(XX_serialport_add[5]),
- 0, 0, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_serialport_add[6]),
- 0, 1, 0, NULL},
- {AUT_RETURN, 1, NULL, NULL,
- 0, 0, 0, NULL}
-};
-static struct translation X_serialport_add = {
- 0,
- ADT_serialport_add,
- AUE_serialport_add,
- 7,
- &XX_serialport_add[0],
- &XX_serialport_add[0]
-};
-static struct entry XX_serialport_delete[7] = {
- {AUT_SUBJECT, 1, NULL, &(XX_serialport_delete[1]),
- 0, 0, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_serialport_delete[2]),
- 0, 1, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_serialport_delete[3]),
- 0, 0, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_serialport_delete[4]),
- 0, 1, 0, NULL},
- {AUT_UAUTH, 1, &adr1[0], &(XX_serialport_delete[5]),
- 0, 0, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_serialport_delete[6]),
- 0, 1, 0, NULL},
- {AUT_RETURN, 1, NULL, NULL,
- 0, 0, 0, NULL}
-};
-static struct translation X_serialport_delete = {
- 0,
- ADT_serialport_delete,
- AUE_serialport_delete,
- 7,
- &XX_serialport_delete[0],
- &XX_serialport_delete[0]
-};
-static struct entry XX_serialport_modify[7] = {
- {AUT_SUBJECT, 1, NULL, &(XX_serialport_modify[1]),
- 0, 0, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_serialport_modify[2]),
- 0, 1, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_serialport_modify[3]),
- 0, 0, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_serialport_modify[4]),
- 0, 1, 0, NULL},
- {AUT_UAUTH, 1, &adr1[0], &(XX_serialport_modify[5]),
- 0, 0, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_serialport_modify[6]),
- 0, 1, 0, NULL},
- {AUT_RETURN, 1, NULL, NULL,
- 0, 0, 0, NULL}
-};
-static struct translation X_serialport_modify = {
- 0,
- ADT_serialport_modify,
- AUE_serialport_modify,
- 7,
- &XX_serialport_modify[0],
- &XX_serialport_modify[0]
-};
-static struct entry XX_ssh[3] = {
- {AUT_SUBJECT, 1, NULL, &(XX_ssh[1]),
- 0, 0, 0, NULL},
- {AUT_TEXT, 1, &adr0[0], &(XX_ssh[2]),
- 0, 0, 0, NULL},
- {AUT_RETURN, 1, NULL, NULL,
- 0, 0, 0, NULL}
-};
-static struct translation X_ssh = {
- 0,
- ADT_ssh,
- AUE_ssh,
- 3,
- &XX_ssh[0],
- &XX_ssh[0]
-};
-static struct entry XX_su[3] = {
- {AUT_SUBJECT, 1, NULL, &(XX_su[1]),
- 0, 0, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_su[2]),
- 0, 0, 0, NULL},
- {AUT_RETURN, 1, NULL, NULL,
- 0, 0, 0, NULL}
-};
-static struct translation X_su = {
- 0,
- ADT_su,
- AUE_su,
- 3,
- &XX_su[0],
- &XX_su[0]
-};
-static struct entry XX_su_logout[2] = {
- {AUT_SUBJECT, 1, NULL, &(XX_su_logout[1]),
- 0, 0, 0, NULL},
- {AUT_RETURN, 1, NULL, NULL,
- 0, 0, 0, NULL}
-};
-static struct translation X_su_logout = {
- 0,
- ADT_su_logout,
- AUE_su_logout,
- 2,
- &XX_su_logout[0],
- &XX_su_logout[0]
-};
-static struct entry XX_telnet[3] = {
- {AUT_SUBJECT, 1, NULL, &(XX_telnet[1]),
- 0, 0, 0, NULL},
- {AUT_TEXT, 1, &adr0[0], &(XX_telnet[2]),
- 0, 0, 0, NULL},
- {AUT_RETURN, 1, NULL, NULL,
- 0, 0, 0, NULL}
-};
-static struct translation X_telnet = {
- 0,
- ADT_telnet,
- AUE_telnet,
- 3,
- &XX_telnet[0],
- &XX_telnet[0]
-};
-static struct entry XX_uauth[4] = {
- {AUT_SUBJECT, 1, NULL, &(XX_uauth[1]),
- 0, 0, 0, NULL},
- {AUT_UAUTH, 1, &adr1[0], &(XX_uauth[2]),
- 0, 1, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_uauth[3]),
- 0, 1, 0, NULL},
- {AUT_RETURN, 1, NULL, NULL,
- 0, 0, 0, NULL}
-};
-static struct translation X_uauth = {
- 0,
- ADT_uauth,
- AUE_uauth,
- 4,
- &XX_uauth[0],
- &XX_uauth[0]
-};
-static struct entry XX_usermgr_add[7] = {
- {AUT_SUBJECT, 1, NULL, &(XX_usermgr_add[1]),
- 0, 0, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_usermgr_add[2]),
- 0, 1, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_usermgr_add[3]),
- 0, 0, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_usermgr_add[4]),
- 0, 1, 0, NULL},
- {AUT_UAUTH, 1, &adr1[0], &(XX_usermgr_add[5]),
- 0, 0, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_usermgr_add[6]),
- 0, 1, 0, NULL},
- {AUT_RETURN, 1, NULL, NULL,
- 0, 0, 0, NULL}
-};
-static struct translation X_usermgr_add = {
- 0,
- ADT_usermgr_add,
- AUE_usermgr_add,
- 7,
- &XX_usermgr_add[0],
- &XX_usermgr_add[0]
-};
-static struct entry XX_usermgr_delete[7] = {
- {AUT_SUBJECT, 1, NULL, &(XX_usermgr_delete[1]),
- 0, 0, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_usermgr_delete[2]),
- 0, 1, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_usermgr_delete[3]),
- 0, 0, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_usermgr_delete[4]),
- 0, 1, 0, NULL},
- {AUT_UAUTH, 1, &adr1[0], &(XX_usermgr_delete[5]),
- 0, 0, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_usermgr_delete[6]),
- 0, 1, 0, NULL},
- {AUT_RETURN, 1, NULL, NULL,
- 0, 0, 0, NULL}
-};
-static struct translation X_usermgr_delete = {
- 0,
- ADT_usermgr_delete,
- AUE_usermgr_delete,
- 7,
- &XX_usermgr_delete[0],
- &XX_usermgr_delete[0]
-};
-static struct entry XX_usermgr_modify[7] = {
- {AUT_SUBJECT, 1, NULL, &(XX_usermgr_modify[1]),
- 0, 0, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_usermgr_modify[2]),
- 0, 1, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_usermgr_modify[3]),
- 0, 0, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_usermgr_modify[4]),
- 0, 1, 0, NULL},
- {AUT_UAUTH, 1, &adr1[0], &(XX_usermgr_modify[5]),
- 0, 0, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_usermgr_modify[6]),
- 0, 1, 0, NULL},
- {AUT_RETURN, 1, NULL, NULL,
- 0, 0, 0, NULL}
-};
-static struct translation X_usermgr_modify = {
- 0,
- ADT_usermgr_modify,
- AUE_usermgr_modify,
- 7,
- &XX_usermgr_modify[0],
- &XX_usermgr_modify[0]
-};
-static struct entry XX_zlogin[3] = {
- {AUT_SUBJECT, 1, NULL, &(XX_zlogin[1]),
- 0, 0, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_zlogin[2]),
- 0, 0, 0, NULL},
- {AUT_RETURN, 1, NULL, NULL,
- 0, 0, 0, NULL}
-};
-static struct translation X_zlogin = {
- 0,
- ADT_zlogin,
- AUE_zlogin,
- 3,
- &XX_zlogin[0],
- &XX_zlogin[0]
-};
-static struct entry XX_zone_state[4] = {
- {AUT_SUBJECT, 1, NULL, &(XX_zone_state[1]),
- 0, 0, 0, NULL},
- {AUT_TEXT, 1, &adr1[0], &(XX_zone_state[2]),
- 0, 1, 0, NULL},
- {AUT_ZONENAME, 1, &adr1[0], &(XX_zone_state[3]),
- 0, 1, 0, NULL},
- {AUT_RETURN, 1, NULL, NULL,
- 0, 0, 0, NULL}
-};
-static struct translation X_zone_state = {
- 0,
- ADT_zone_state,
- AUE_zone_state,
- 4,
- &XX_zone_state[0],
- &XX_zone_state[0]
-};
-struct translation *xlate_table[51] = {
- &X_admin_authenticate,
- &X_attach,
- &X_detach,
- &X_dladm_create_secobj,
- &X_dladm_delete_secobj,
- &X_file_copy,
- &X_file_relabel,
- &X_filesystem_add,
- &X_filesystem_delete,
- &X_filesystem_modify,
- &X_inetd_connect,
- &X_inetd_copylimit,
- &X_inetd_failrate,
- &X_inetd_ratelimit,
- &X_init_solaris,
- &X_login,
- &X_logout,
- &X_network_add,
- &X_network_delete,
- &X_network_modify,
- &X_newgrp_login,
- &X_passwd,
- &X_pool_export,
- &X_pool_import,
- &X_printer_add,
- &X_printer_delete,
- &X_printer_modify,
- &X_prof_cmd,
- &X_remove,
- &X_rlogin,
- &X_role_login,
- &X_role_logout,
- &X_scheduledjob_add,
- &X_scheduledjob_delete,
- &X_scheduledjob_modify,
- &X_screenlock,
- &X_screenunlock,
- &X_serialport_add,
- &X_serialport_delete,
- &X_serialport_modify,
- &X_ssh,
- &X_su,
- &X_su_logout,
- &X_telnet,
- &X_uauth,
- &X_usermgr_add,
- &X_usermgr_delete,
- &X_usermgr_modify,
- &X_zlogin,
- &X_zone_state,
- NULL
-};
-
-void
-adt_preload(au_event_t event_id, adt_event_data_t *event_data)
-{
- switch (event_id) {
- case ADT_prof_cmd:
- event_data->adt_prof_cmd.proc_auid = AU_NOAUDITID;
- event_data->adt_prof_cmd.proc_euid = AU_NOAUDITID;
- event_data->adt_prof_cmd.proc_egid = AU_NOAUDITID;
- event_data->adt_prof_cmd.proc_ruid = AU_NOAUDITID;
- event_data->adt_prof_cmd.proc_rgid = AU_NOAUDITID;
- break;
- default:
- break;
- }
-}
-#endif
-
-/* message lists */
-
-static char *msg_fail_value[24] = {
- "Attribute update",
- "Password update",
- "bad username",
- "authorization failed",
- "bad uid",
- "unknown failure",
- "password expired",
- "Account is locked",
- "Bad dial up",
- "Invalid ID",
- "Invalid password",
- "Not on console",
- "Too many failed attempts",
- "Protocol failure",
- "Excluded user",
- "No anonymous",
- "Invalid command",
- "Standard input not a tty line",
- "Program failure",
- "chdir to home directory",
- "Input line too long.",
- "login device override",
- "authorization bypass",
- "login disabled"
-};
-/* Deprecated message list */
-static char *msg_login_text[10] = {
- NULL,
- "Account is locked",
- "Bad dial up",
- "Invalid ID",
- "Invalid password",
- "Not on console",
- "Too many failed attempts",
- "Protocol failure",
- "Excluded user",
- "No anonymous"
-};
-
-struct msg_text adt_msg_text[3] = {
- {0, -1, NULL, -2000},
- {0, 23, msg_fail_value, -1000},
- {0, 9, msg_login_text, 0}
-};
diff --git a/usr/src/lib/libbsm/xmlHandlers.pm b/usr/src/lib/libbsm/xmlHandlers.pm
new file mode 100644
index 0000000000..fbac981438
--- /dev/null
+++ b/usr/src/lib/libbsm/xmlHandlers.pm
@@ -0,0 +1,323 @@
+#
+# 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
+# or http://www.opensolaris.org/os/licensing.
+# 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 2007 Sun Microsystems, Inc. All rights reserved.
+# Use is subject to license terms.
+#
+# ident "%Z%%M% %I% %E% SMI"
+#
+
+# <t> xmlHandlers -- package for generating a tree from an XML doc
+
+use XML::Parser;
+
+package xmlHandlers;
+
+$level = -1;
+
+%endCallback = ();
+%startCallback = ();
+
+$currentObj = 0;
+@objStack = ();
+
+1;
+
+# <s> methods
+
+# pkg reference, object name (tag), optional fileName.
+
+
+sub new {
+ my $pkg = shift;
+ my $parent = shift; # ref to parent object
+ my $class = shift; # for debug use
+
+ my @kids = (); # list of child objects
+
+ push (@objStack, $parent);
+ $currentObj = bless {'class' => $class,
+ 'kids' => \@kids,
+# 'parent' => $parent,
+ 'attributes' => 0,
+ 'content' => ''}, $pkg;
+
+ if (@_) { # if fileName passed, go!
+ die "parent for document creation must be null"
+ if ($parent);
+ executeXML (shift);
+ }
+ return $currentObj;
+}
+
+# we'll call you when your object is started
+# class method
+
+sub registerStartCallback {
+ my $objName = shift; # call me when you get <objName>
+ my $callback = shift; # \&foo($objRef, $source);
+
+ if ($startCallback{$objName}) {
+ print STDERR "duplicate callback for $objName\n";
+ return;
+ }
+ $startCallback{$objName} = $callback;
+}
+
+
+# we'll call you when your object is completed
+# class method
+
+sub registerEndCallback {
+ my $objName = shift; # call me when you get </objName>
+ my $callback = shift; # \&foo($objRef);
+
+ if ($endCallback{$objName}) {
+ print STDERR "duplicate callback for $objName\n";
+ return;
+ }
+ $endCallback{$objName} = $callback;
+}
+
+sub start {
+}
+sub end {
+}
+
+sub char {
+ my ($obj, $class, $string) = @_;
+
+
+}
+
+sub add {
+ my $parent = shift;
+ my $kid = shift;
+
+ push (@{$parent->{'kids'}}, $kid);
+# $kid->{'parent'} = $parent;
+}
+
+# <s> internal functions
+sub executeXML {
+ my $file = shift;
+
+ # ErrorContext - 0 don't report errors
+ # - other = number of lines to display
+ # ParseparamEnt - 1 allow parsing of dtd
+ my $parser = XML::Parser->new(ErrorContext => 1,
+ ParseParamEnt => 1);
+
+ $parser->setHandlers (Char => \&charHandler,
+ Start => \&startHandler,
+ Default => \&defaultHandler,
+ End => \&endHandler,
+ Proc => \&procHandler,
+ Comment => \&commentHandler,
+ ExternEnt => \&externalHandler);
+
+ $parser->parsefile ($file);
+}
+
+sub charHandler {
+ my ($xmlObj, $string) = @_;
+
+ chomp $string;
+ $string =~ s/^\s+//;
+ $string =~ s/\s+$//;
+ unless ($string =~ /^\s*$/) {
+# print "charHandler: $currentObj->{'class'} $string\n" if $main::debug;
+ $currentObj->{'content'} .= ' ' if ($currentObj->{'content'});
+ $currentObj->{'content'} .= $string;
+ }
+}
+
+# create new object and attach to tree
+
+sub startHandler {
+ my $xmlObj = shift;
+ my $tag = shift;
+
+ my $obj;
+ my $parent = $currentObj;
+
+ $obj = new xmlHandlers($currentObj, $tag);
+
+ $parent->add ($obj);
+
+ $obj->processAttributes ($tag, @_);
+
+ my $functionRef;
+ if ($functionRef = $startCallback{$tag}) {
+ &$functionRef($obj, 'start');
+ }
+ elsif ($main::debug) {
+# print "no start callback for $tag\n";
+ }
+}
+
+sub endHandler {
+ my $xmlObj = shift;
+ my $element = shift;
+
+# print "end tag $element\n" if $main::debug;
+
+ my $functionRef;
+ if ($functionRef = $endCallback{$element}) {
+ &$functionRef($currentObj, 'end');
+ }
+ elsif ($main::debug) {
+# print "no end callback for $element\n";
+ }
+# $currentObj = $currentObj->{'parent'};
+ $currentObj = pop (@objStack);
+}
+
+sub defaultHandler {
+ my ($obj, $string) = @_;
+
+ unless (!$main::debug || ($string =~ /^\s*$/)) {
+ if ($string =~ /<\?xml/) {
+ $string =~ s/<\?\S+\s+(.*)/$1/;
+ my (%parameters) =
+ parseProcInstruction ($string);
+ print STDERR "Got call to default, guessed what to do: $string\n";
+ }
+ else {
+ print STDERR "Got call to default, didn't know what to do: $string\n";
+ }
+ }
+}
+
+sub externalHandler {
+ my ($obj, $base, $sysid, $pubid) = @_;
+
+ $base = '' if !$base;
+ $pubid = '' if !$pubid;
+ print "external: base $base\nexternal: sysid $sysid\nexternal: pubid $pubid\n";
+}
+
+sub commentHandler {
+ my ($obj, $element) = @_;
+
+ return unless $main::debug;
+
+ unless ($element =~ /^\s*$/) {
+ print "comment: $element\n";
+ }
+}
+
+sub procHandler {
+ my $xmlObj = shift;
+ my $target = shift;
+ my $data = shift;
+
+ my (%parameters) =
+ parseProcInstruction ($data);
+
+ $currentObj->processAttributes ($target, $data, @_);
+}
+#<s> misc subs
+
+sub parseProcInstruction {
+ my ($args) = @_;
+
+ my (@outputArray) = ();
+
+ while ($args =~ s/([^ =]+)=\"([^"]+)\"(.*)/$3/) { # "
+ push (@outputArray, $1);
+ push (@outputArray, $2);
+ }
+ return (@outputArray);
+}
+
+sub processAttributes {
+ my $pkg = shift;
+ my ($element, %content) = @_;
+
+# print "processAttributes: element = $element\n" if $main::debug;
+
+ my $hashCount = 0;
+ foreach $attributeName (keys %content) {
+ if ($attributeName =~ /^\s*$/) {
+ delete $content{$attributeName}; # remove null entries
+ next;
+ }
+ $hashCount++;
+# print "attribute: $attributeName = $content{$attributeName}\n"
+# if $main::debug;
+ }
+ if ($hashCount && $pkg->{'attributes'}) {
+ print STDERR "need to write attribute merge logic\n";
+ }
+ else {
+ $pkg->{'attributes'} = \%content;
+ }
+}
+
+sub getKid {
+ my $pkg = shift;
+ my $whichKid = shift;
+
+ my @kids = $pkg->getKids();
+ my $kid;
+ foreach $kid (@kids) {
+ my $class = $kid->getClass();
+ return $kid if $class eq $whichKid;
+ }
+ return undef;
+}
+
+sub getKids {
+ my $pkg = shift;
+
+ return @{$pkg->{'kids'}};
+}
+
+sub getAttributes {
+ my $pkg = shift;
+
+ my $ref = $pkg->{'attributes'};
+
+ return %$ref;
+}
+
+sub getAttr {
+ my $pkg = shift;
+ my $attr = shift;
+
+ my $ref = $pkg->{'attributes'};
+
+ return $$ref{$attr};
+}
+
+sub getClass {
+ my $pkg = shift;
+
+ return $pkg->{'class'};
+}
+
+sub getContent {
+ my $pkg = shift;
+
+ my $content = $pkg->{'content'};
+ return $content ? $content : undef;
+}