1*7c478bd9Sstevel@tonic-gate /* 2*7c478bd9Sstevel@tonic-gate * CDDL HEADER START 3*7c478bd9Sstevel@tonic-gate * 4*7c478bd9Sstevel@tonic-gate * The contents of this file are subject to the terms of the 5*7c478bd9Sstevel@tonic-gate * Common Development and Distribution License, Version 1.0 only 6*7c478bd9Sstevel@tonic-gate * (the "License"). You may not use this file except in compliance 7*7c478bd9Sstevel@tonic-gate * with the License. 8*7c478bd9Sstevel@tonic-gate * 9*7c478bd9Sstevel@tonic-gate * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 10*7c478bd9Sstevel@tonic-gate * or http://www.opensolaris.org/os/licensing. 11*7c478bd9Sstevel@tonic-gate * See the License for the specific language governing permissions 12*7c478bd9Sstevel@tonic-gate * and limitations under the License. 13*7c478bd9Sstevel@tonic-gate * 14*7c478bd9Sstevel@tonic-gate * When distributing Covered Code, include this CDDL HEADER in each 15*7c478bd9Sstevel@tonic-gate * file and include the License file at usr/src/OPENSOLARIS.LICENSE. 16*7c478bd9Sstevel@tonic-gate * If applicable, add the following below this CDDL HEADER, with the 17*7c478bd9Sstevel@tonic-gate * fields enclosed by brackets "[]" replaced with your own identifying 18*7c478bd9Sstevel@tonic-gate * information: Portions Copyright [yyyy] [name of copyright owner] 19*7c478bd9Sstevel@tonic-gate * 20*7c478bd9Sstevel@tonic-gate * CDDL HEADER END 21*7c478bd9Sstevel@tonic-gate */ 22*7c478bd9Sstevel@tonic-gate /* 23*7c478bd9Sstevel@tonic-gate * Copyright 2003 Sun Microsystems, Inc. All rights reserved. 24*7c478bd9Sstevel@tonic-gate * Use is subject to license terms. 25*7c478bd9Sstevel@tonic-gate */ 26*7c478bd9Sstevel@tonic-gate 27*7c478bd9Sstevel@tonic-gate #ifndef _SYSTOKEN_H 28*7c478bd9Sstevel@tonic-gate #define _SYSTOKEN_H 29*7c478bd9Sstevel@tonic-gate 30*7c478bd9Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 31*7c478bd9Sstevel@tonic-gate 32*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus 33*7c478bd9Sstevel@tonic-gate extern "C" { 34*7c478bd9Sstevel@tonic-gate #endif 35*7c478bd9Sstevel@tonic-gate 36*7c478bd9Sstevel@tonic-gate #include "sysplugin.h" 37*7c478bd9Sstevel@tonic-gate #include <bsm/adt.h> 38*7c478bd9Sstevel@tonic-gate 39*7c478bd9Sstevel@tonic-gate /* 40*7c478bd9Sstevel@tonic-gate * parse_context -- doc and cur are for XML input, chunk and 41*7c478bd9Sstevel@tonic-gate * remaining for "plain text input, i.e., the traditiona 42*7c478bd9Sstevel@tonic-gate * output from praudit 43*7c478bd9Sstevel@tonic-gate */ 44*7c478bd9Sstevel@tonic-gate 45*7c478bd9Sstevel@tonic-gate struct parse_context { 46*7c478bd9Sstevel@tonic-gate adr_t adr; /* input buffer pointers */ 47*7c478bd9Sstevel@tonic-gate uint32_t id; /* message sequence number */ 48*7c478bd9Sstevel@tonic-gate tosyslog_t out; /* output data */ 49*7c478bd9Sstevel@tonic-gate }; 50*7c478bd9Sstevel@tonic-gate typedef struct parse_context parse_context_t; 51*7c478bd9Sstevel@tonic-gate 52*7c478bd9Sstevel@tonic-gate #define AU_TEXT_NAME " text " 53*7c478bd9Sstevel@tonic-gate 54*7c478bd9Sstevel@tonic-gate #ifdef useless 55*7c478bd9Sstevel@tonic-gate /* 56*7c478bd9Sstevel@tonic-gate * the following *_ar_token() functions parallel the *_token()( 57*7c478bd9Sstevel@tonic-gate * functions defined in praudit/toktable.h 58*7c478bd9Sstevel@tonic-gate */ 59*7c478bd9Sstevel@tonic-gate 60*7c478bd9Sstevel@tonic-gate /* 61*7c478bd9Sstevel@tonic-gate * These tokens are the same for all versions of Solaris 62*7c478bd9Sstevel@tonic-gate */ 63*7c478bd9Sstevel@tonic-gate 64*7c478bd9Sstevel@tonic-gate /* 65*7c478bd9Sstevel@tonic-gate * Control tokens 66*7c478bd9Sstevel@tonic-gate */ 67*7c478bd9Sstevel@tonic-gate 68*7c478bd9Sstevel@tonic-gate extern void file_token(adr_t *, uint64_t, uint64_t); 69*7c478bd9Sstevel@tonic-gate extern void trailer_token(adr_t *, parse_context_t *); 70*7c478bd9Sstevel@tonic-gate extern void header_token(adr_t *, parse_context_t *); 71*7c478bd9Sstevel@tonic-gate extern void header32_ex_token(adr_t *, parse_context_t *); 72*7c478bd9Sstevel@tonic-gate 73*7c478bd9Sstevel@tonic-gate /* 74*7c478bd9Sstevel@tonic-gate * Data tokens 75*7c478bd9Sstevel@tonic-gate */ 76*7c478bd9Sstevel@tonic-gate 77*7c478bd9Sstevel@tonic-gate extern void arbitrary_data_token(adr_t *, parse_context_t *); 78*7c478bd9Sstevel@tonic-gate extern void s5_IPC_token(adr_t *, parse_context_t *); 79*7c478bd9Sstevel@tonic-gate extern void path_token(adr_t *, parse_context_t *); 80*7c478bd9Sstevel@tonic-gate extern void subject32_token(); 81*7c478bd9Sstevel@tonic-gate extern void process32_token(); 82*7c478bd9Sstevel@tonic-gate extern void return_value32_token(); 83*7c478bd9Sstevel@tonic-gate extern void text_token(adr_t *, parse_context_t *); 84*7c478bd9Sstevel@tonic-gate extern void opaque_token(adr_t *, parse_context_t *); 85*7c478bd9Sstevel@tonic-gate extern void ip_addr_token(); 86*7c478bd9Sstevel@tonic-gate extern void ip_token(adr_t *, parse_context_t *); 87*7c478bd9Sstevel@tonic-gate extern void iport_token(adr_t *, parse_context_t *); 88*7c478bd9Sstevel@tonic-gate extern void argument32_token(); 89*7c478bd9Sstevel@tonic-gate extern void socket_token(); 90*7c478bd9Sstevel@tonic-gate extern void sequence_token(adr_t *, parse_context_t *); 91*7c478bd9Sstevel@tonic-gate 92*7c478bd9Sstevel@tonic-gate /* 93*7c478bd9Sstevel@tonic-gate * Modifier tokens 94*7c478bd9Sstevel@tonic-gate */ 95*7c478bd9Sstevel@tonic-gate 96*7c478bd9Sstevel@tonic-gate extern void acl_token(adr_t *, parse_context_t *); 97*7c478bd9Sstevel@tonic-gate extern void attribute_token(adr_t *, parse_context_t *); 98*7c478bd9Sstevel@tonic-gate extern void s5_IPC_perm_token(adr_t *, parse_context_t *); 99*7c478bd9Sstevel@tonic-gate extern void group_token(); 100*7c478bd9Sstevel@tonic-gate extern void ilabel_token(adr_t *, parse_context_t *); 101*7c478bd9Sstevel@tonic-gate extern void slabel_token(adr_t *, parse_context_t *); 102*7c478bd9Sstevel@tonic-gate extern void clearance_token(adr_t *, parse_context_t *); 103*7c478bd9Sstevel@tonic-gate extern void privilege_token(adr_t *, parse_context_t *); 104*7c478bd9Sstevel@tonic-gate extern void useofpriv_token(adr_t *, parse_context_t *); 105*7c478bd9Sstevel@tonic-gate extern void zonename_token(adr_t *, parse_context_t *); 106*7c478bd9Sstevel@tonic-gate extern void liaison_token(adr_t *, parse_context_t *); 107*7c478bd9Sstevel@tonic-gate extern void newgroup_token(adr_t *, parse_context_t *); 108*7c478bd9Sstevel@tonic-gate extern void exec_args_token(adr_t *, parse_context_t *); 109*7c478bd9Sstevel@tonic-gate extern void exec_env_token(adr_t *, parse_context_t *); 110*7c478bd9Sstevel@tonic-gate extern void attribute32_token(adr_t *, parse_context_t *); 111*7c478bd9Sstevel@tonic-gate extern void useofauth_token(adr_t *, parse_context_t *); 112*7c478bd9Sstevel@tonic-gate 113*7c478bd9Sstevel@tonic-gate /* 114*7c478bd9Sstevel@tonic-gate * X windows tokens 115*7c478bd9Sstevel@tonic-gate */ 116*7c478bd9Sstevel@tonic-gate 117*7c478bd9Sstevel@tonic-gate extern void xatom_token(adr_t *, parse_context_t *); 118*7c478bd9Sstevel@tonic-gate extern void xselect_token(adr_t *, parse_context_t *); 119*7c478bd9Sstevel@tonic-gate extern void xcolormap_token(adr_t *, parse_context_t *); 120*7c478bd9Sstevel@tonic-gate extern void xcursor_token(adr_t *, parse_context_t *); 121*7c478bd9Sstevel@tonic-gate extern void xfont_token(adr_t *, parse_context_t *); 122*7c478bd9Sstevel@tonic-gate extern void xgc_token(adr_t *, parse_context_t *); 123*7c478bd9Sstevel@tonic-gate extern void xpixmap_token(adr_t *, parse_context_t *); 124*7c478bd9Sstevel@tonic-gate extern void xproperty_token(adr_t *, parse_context_t *); 125*7c478bd9Sstevel@tonic-gate extern void xwindow_token(adr_t *, parse_context_t *); 126*7c478bd9Sstevel@tonic-gate extern void xclient_token(adr_t *, parse_context_t *); 127*7c478bd9Sstevel@tonic-gate 128*7c478bd9Sstevel@tonic-gate /* 129*7c478bd9Sstevel@tonic-gate * Command tokens 130*7c478bd9Sstevel@tonic-gate */ 131*7c478bd9Sstevel@tonic-gate 132*7c478bd9Sstevel@tonic-gate extern void cmd_token(adr_t *, parse_context_t *); 133*7c478bd9Sstevel@tonic-gate extern void exit_token(adr_t *, parse_context_t *); 134*7c478bd9Sstevel@tonic-gate 135*7c478bd9Sstevel@tonic-gate /* 136*7c478bd9Sstevel@tonic-gate * Miscellaneous tokens 137*7c478bd9Sstevel@tonic-gate */ 138*7c478bd9Sstevel@tonic-gate 139*7c478bd9Sstevel@tonic-gate extern void host_token(adr_t *, parse_context_t *); 140*7c478bd9Sstevel@tonic-gate 141*7c478bd9Sstevel@tonic-gate /* 142*7c478bd9Sstevel@tonic-gate * Solaris64 tokens 143*7c478bd9Sstevel@tonic-gate */ 144*7c478bd9Sstevel@tonic-gate 145*7c478bd9Sstevel@tonic-gate extern void argument64_token(adr_t *, parse_context_t *); 146*7c478bd9Sstevel@tonic-gate extern void return64_token(adr_t *, parse_context_t *); 147*7c478bd9Sstevel@tonic-gate extern void attribute64_token(adr_t *, parse_context_t *); 148*7c478bd9Sstevel@tonic-gate extern void header64_token(adr_t *, parse_context_t *); 149*7c478bd9Sstevel@tonic-gate extern void subject64_token(adr_t *, parse_context_t *); 150*7c478bd9Sstevel@tonic-gate extern void process64_token(adr_t *, parse_context_t *); 151*7c478bd9Sstevel@tonic-gate extern void file64_token(adr_t *, parse_context_t *); 152*7c478bd9Sstevel@tonic-gate 153*7c478bd9Sstevel@tonic-gate /* 154*7c478bd9Sstevel@tonic-gate * Extended network address tokens 155*7c478bd9Sstevel@tonic-gate */ 156*7c478bd9Sstevel@tonic-gate 157*7c478bd9Sstevel@tonic-gate extern void header64_ex_token(); 158*7c478bd9Sstevel@tonic-gate extern void subject32_ex_token(); 159*7c478bd9Sstevel@tonic-gate extern void process32_ex_token(); 160*7c478bd9Sstevel@tonic-gate extern void subject64_ex_token(adr_t *, parse_context_t *); 161*7c478bd9Sstevel@tonic-gate extern void process64_ex_token(adr_t *, parse_context_t *); 162*7c478bd9Sstevel@tonic-gate extern void ip_addr_ex_token(adr_t *, parse_context_t *); 163*7c478bd9Sstevel@tonic-gate extern void socket_ex_token(adr_t *, parse_context_t *); 164*7c478bd9Sstevel@tonic-gate #endif 165*7c478bd9Sstevel@tonic-gate 166*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus 167*7c478bd9Sstevel@tonic-gate } 168*7c478bd9Sstevel@tonic-gate #endif 169*7c478bd9Sstevel@tonic-gate 170*7c478bd9Sstevel@tonic-gate #endif /* _SYSTOKEN_H */ 171