toktable.c revision 8f9294f315395bcb89119429b2e5496111ce4976
5cff782560a1c3cf913ba5574a5123a299f3315emh * CDDL HEADER START
5cff782560a1c3cf913ba5574a5123a299f3315emh * The contents of this file are subject to the terms of the
5cff782560a1c3cf913ba5574a5123a299f3315emh * Common Development and Distribution License (the "License").
5cff782560a1c3cf913ba5574a5123a299f3315emh * You may not use this file except in compliance with the License.
5cff782560a1c3cf913ba5574a5123a299f3315emh * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
5cff782560a1c3cf913ba5574a5123a299f3315emh * See the License for the specific language governing permissions
5cff782560a1c3cf913ba5574a5123a299f3315emh * and limitations under the License.
5cff782560a1c3cf913ba5574a5123a299f3315emh * When distributing Covered Code, include this CDDL HEADER in each
5cff782560a1c3cf913ba5574a5123a299f3315emh * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
5cff782560a1c3cf913ba5574a5123a299f3315emh * If applicable, add the following below this CDDL HEADER, with the
5cff782560a1c3cf913ba5574a5123a299f3315emh * fields enclosed by brackets "[]" replaced with your own identifying
5cff782560a1c3cf913ba5574a5123a299f3315emh * information: Portions Copyright [yyyy] [name of copyright owner]
5cff782560a1c3cf913ba5574a5123a299f3315emh * CDDL HEADER END
c210ded489f4b4bd3e26ba118f5603c41a5c8c02esaxe * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
5cff782560a1c3cf913ba5574a5123a299f3315emh * Use is subject to license terms.
5cff782560a1c3cf913ba5574a5123a299f3315emh#pragma ident "%Z%%M% %I% %E% SMI"
5cff782560a1c3cf913ba5574a5123a299f3315emh * Solaris Audit Token Table.
5cff782560a1c3cf913ba5574a5123a299f3315emh#define table_init(i, n, f, t) \
5cff782560a1c3cf913ba5574a5123a299f3315emh/* table_initx is for entries which need name different from tagname */
5cff782560a1c3cf913ba5574a5123a299f3315emh * Initialize the table of tokens & other tags.
5cff782560a1c3cf913ba5574a5123a299f3315emh * TRANSLATION_NOTE
5cff782560a1c3cf913ba5574a5123a299f3315emh * These names refer to different type of audit tokens.
5cff782560a1c3cf913ba5574a5123a299f3315emh * To gain a better understanding of each token, read
5cff782560a1c3cf913ba5574a5123a299f3315emh * System Administration Guide: Security Services >> Solaris Auditing
5cff782560a1c3cf913ba5574a5123a299f3315emh (void) gettext("file"); /* to force out the translation note */
5cff782560a1c3cf913ba5574a5123a299f3315emh * Control token types
5cff782560a1c3cf913ba5574a5123a299f3315emh table_init(AUT_OTHER_FILE32, "file", file_token, T_EXTENDED);
5cff782560a1c3cf913ba5574a5123a299f3315emh table_init(AUT_OHEADER, "old_header", NOFUNC, T_EXTENDED);
5cff782560a1c3cf913ba5574a5123a299f3315emh table_init(AUT_TRAILER, "trailer", trailer_token, T_UNKNOWN);
5cff782560a1c3cf913ba5574a5123a299f3315emh * Data token types
5cff782560a1c3cf913ba5574a5123a299f3315emh table_init(AUT_DATA, "arbitrary", arbitrary_data_token, T_EXTENDED);
5cff782560a1c3cf913ba5574a5123a299f3315emh table_init(AUT_XATPATH, "path_attr", path_attr_token, T_ELEMENT);
5cff782560a1c3cf913ba5574a5123a299f3315emh table_init(AUT_SUBJECT32, "subject", subject32_token, T_ENCLOSED);
5cff782560a1c3cf913ba5574a5123a299f3315emh table_init(AUT_PROCESS32, "process", process32_token, T_ENCLOSED);
5cff782560a1c3cf913ba5574a5123a299f3315emh table_init(AUT_RETURN32, "return", return_value32_token, T_ENCLOSED);
5cff782560a1c3cf913ba5574a5123a299f3315emh table_init(AUT_OPAQUE, "opaque", opaque_token, T_ELEMENT);
5cff782560a1c3cf913ba5574a5123a299f3315emh table_init(AUT_ARG32, "argument", argument32_token, T_ENCLOSED);
5cff782560a1c3cf913ba5574a5123a299f3315emh table_init(AUT_SEQ, "sequence", sequence_token, T_ENCLOSED);
5cff782560a1c3cf913ba5574a5123a299f3315emh table_init(AUT_ZONENAME, "zone", zonename_token, T_ENCLOSED);
5cff782560a1c3cf913ba5574a5123a299f3315emh * Modifier token types
5cff782560a1c3cf913ba5574a5123a299f3315emh table_init(AUT_ATTR, "attribute", attribute_token, T_ENCLOSED);
5cff782560a1c3cf913ba5574a5123a299f3315emh table_init(AUT_IPC_PERM, "IPC_perm", s5_IPC_perm_token, T_ENCLOSED);
5cff782560a1c3cf913ba5574a5123a299f3315emh table_initx(AUT_LABEL, "sensitivity label", "sensitivity_label",
5cff782560a1c3cf913ba5574a5123a299f3315emh table_init(AUT_PRIV, "privilege", privilege_token, T_EXTENDED);
5cff782560a1c3cf913ba5574a5123a299f3315emh table_initx(AUT_UPRIV, "use of privilege", "use_of_privilege",
5cff782560a1c3cf913ba5574a5123a299f3315emh table_init(AUT_LIAISON, "liaison", liaison_token, T_ELEMENT);
5cff782560a1c3cf913ba5574a5123a299f3315emh table_init(AUT_NEWGROUPS, "group", newgroup_token, T_ELEMENT);
5cff782560a1c3cf913ba5574a5123a299f3315emh table_init(AUT_EXEC_ARGS, "exec_args", exec_args_token, T_ELEMENT);
5cff782560a1c3cf913ba5574a5123a299f3315emh table_init(AUT_EXEC_ENV, "exec_env", exec_env_token, T_ELEMENT);
5cff782560a1c3cf913ba5574a5123a299f3315emh table_init(AUT_ATTR32, "attribute", attribute32_token, T_ENCLOSED);
5cff782560a1c3cf913ba5574a5123a299f3315emh * X windows token types
5cff782560a1c3cf913ba5574a5123a299f3315emh table_initx(AUT_XATOM, "X atom", "X_atom", xatom_token, T_ELEMENT);
5cff782560a1c3cf913ba5574a5123a299f3315emh table_initx(AUT_XOBJ, "X object", "X_object", NOFUNC, T_UNKNOWN);
5cff782560a1c3cf913ba5574a5123a299f3315emh table_initx(AUT_XPROTO, "X protocol", "X_protocol", NOFUNC, T_UNKNOWN);
5cff782560a1c3cf913ba5574a5123a299f3315emh table_initx(AUT_XFONT, "X font", "X_font", xfont_token, T_ENCLOSED);
5cff782560a1c3cf913ba5574a5123a299f3315emh table_initx(AUT_XGC, "X graphic context", "X_graphic_context",
5cff782560a1c3cf913ba5574a5123a299f3315emh * Command token types
5cff782560a1c3cf913ba5574a5123a299f3315emh * Miscellaneous token types
5cff782560a1c3cf913ba5574a5123a299f3315emh * Solaris64 token types
5cff782560a1c3cf913ba5574a5123a299f3315emh table_init(AUT_ARG64, "argument", argument64_token, T_ENCLOSED);
5cff782560a1c3cf913ba5574a5123a299f3315emh table_init(AUT_RETURN64, "return", return_value64_token, T_ENCLOSED);
5cff782560a1c3cf913ba5574a5123a299f3315emh table_init(AUT_ATTR64, "attribute", attribute64_token, T_ENCLOSED);
5cff782560a1c3cf913ba5574a5123a299f3315emh table_init(AUT_SUBJECT64, "subject", subject64_token, T_ENCLOSED);
5cff782560a1c3cf913ba5574a5123a299f3315emh table_init(AUT_PROCESS64, "process", process64_token, T_ENCLOSED);
5cff782560a1c3cf913ba5574a5123a299f3315emh table_init(AUT_OTHER_FILE64, "file", file64_token, T_EXTENDED);
5cff782560a1c3cf913ba5574a5123a299f3315emh * Extended network address token types
5cff782560a1c3cf913ba5574a5123a299f3315emh table_init(AUT_SUBJECT32_EX, "subject", subject32_ex_token, T_ENCLOSED);
5cff782560a1c3cf913ba5574a5123a299f3315emh table_init(AUT_PROCESS32_EX, "process", process32_ex_token, T_ENCLOSED);
5cff782560a1c3cf913ba5574a5123a299f3315emh table_init(AUT_SUBJECT64_EX, "subject", subject64_ex_token, T_ENCLOSED);
5cff782560a1c3cf913ba5574a5123a299f3315emh table_init(AUT_PROCESS64_EX, "process", process64_ex_token, T_ENCLOSED);
5cff782560a1c3cf913ba5574a5123a299f3315emh table_init(AUT_SOCKET_EX, "socket", socket_ex_token, T_ENCLOSED);
5cff782560a1c3cf913ba5574a5123a299f3315emh * Done with tokens above here. Now do remaining tags.
5cff782560a1c3cf913ba5574a5123a299f3315emh table_init(TAG_AUID, "audit-uid", pa_pw_uid, T_ATTRIBUTE);
5cff782560a1c3cf913ba5574a5123a299f3315emh table_init(TAG_TID32_EX, "tid", pa_tid32_ex, T_ATTRIBUTE);
5cff782560a1c3cf913ba5574a5123a299f3315emh table_init(TAG_TID64_EX, "tid", pa_tid64_ex, T_ATTRIBUTE);
5cff782560a1c3cf913ba5574a5123a299f3315emh table_init(TAG_IP_LOCAL, "local-port", pa_adr_u_short, T_ATTRIBUTE);
5cff782560a1c3cf913ba5574a5123a299f3315emh table_init(TAG_IP_REMOTE, "remote-port", pa_adr_u_short, T_ATTRIBUTE);
5cff782560a1c3cf913ba5574a5123a299f3315emh table_init(TAG_RETVAL, "retval", pa_adr_int32, T_ATTRIBUTE);
5cff782560a1c3cf913ba5574a5123a299f3315emh table_init(TAG_SETTYPE, "set-type", pa_adr_string, T_ATTRIBUTE);
5cff782560a1c3cf913ba5574a5123a299f3315emh /* Sub-element of groups & newgroups token: */
5cff782560a1c3cf913ba5574a5123a299f3315emh table_init(TAG_XCUID, "xcreator-uid", pa_pw_uid, T_ATTRIBUTE);
5cff782560a1c3cf913ba5574a5123a299f3315emh table_init(TAG_XSELTEXT, "x_sel_text", pa_adr_string, T_ELEMENT);
5cff782560a1c3cf913ba5574a5123a299f3315emh table_init(TAG_XSELTYPE, "x_sel_type", pa_adr_string, T_ELEMENT);
5cff782560a1c3cf913ba5574a5123a299f3315emh table_init(TAG_XSELDATA, "x_sel_data", pa_adr_string, T_ELEMENT);
5cff782560a1c3cf913ba5574a5123a299f3315emh table_init(TAG_ARGNUM, "arg-num", pa_adr_byte, T_ATTRIBUTE);
5cff782560a1c3cf913ba5574a5123a299f3315emh table_init(TAG_ARGVAL32, "value", pa_adr_int32hex, T_ATTRIBUTE);
5cff782560a1c3cf913ba5574a5123a299f3315emh table_init(TAG_ARGVAL64, "value", pa_adr_int64hex, T_ATTRIBUTE);
5cff782560a1c3cf913ba5574a5123a299f3315emh table_init(TAG_ARGDESC, "desc", pa_adr_string, T_ATTRIBUTE);
5cff782560a1c3cf913ba5574a5123a299f3315emh table_init(TAG_NODEID32, "nodeid", pa_adr_int32, T_ATTRIBUTE);
5cff782560a1c3cf913ba5574a5123a299f3315emh table_init(TAG_NODEID64, "nodeid", pa_adr_int64, T_ATTRIBUTE);
5cff782560a1c3cf913ba5574a5123a299f3315emh table_init(TAG_DEVICE32, "device", pa_adr_u_int32, T_ATTRIBUTE);
5cff782560a1c3cf913ba5574a5123a299f3315emh table_init(TAG_DEVICE64, "device", pa_adr_u_int64, T_ATTRIBUTE);
5cff782560a1c3cf913ba5574a5123a299f3315emh table_init(TAG_SEQNUM, "seq-num", pa_adr_u_int32, T_ATTRIBUTE);
5cff782560a1c3cf913ba5574a5123a299f3315emh table_init(TAG_ZONENAME, "name", pa_adr_string, T_ATTRIBUTE);
5cff782560a1c3cf913ba5574a5123a299f3315emh table_init(TAG_CUID, "creator-uid", pa_pw_uid, T_ATTRIBUTE);
5cff782560a1c3cf913ba5574a5123a299f3315emh table_init(TAG_CGID, "creator-gid", pa_gr_uid, T_ATTRIBUTE);
5cff782560a1c3cf913ba5574a5123a299f3315emh table_init(TAG_KEY, "key", pa_adr_int32hex, T_ATTRIBUTE);
5cff782560a1c3cf913ba5574a5123a299f3315emh table_init(TAG_IPVERS, "version", pa_adr_charhex, T_ATTRIBUTE);
5cff782560a1c3cf913ba5574a5123a299f3315emh table_init(TAG_IPSERV, "service_type", pa_adr_charhex, T_ATTRIBUTE);
5cff782560a1c3cf913ba5574a5123a299f3315emh table_init(TAG_IPOFFS, "offset", pa_adr_u_short, T_ATTRIBUTE);
5cff782560a1c3cf913ba5574a5123a299f3315emh table_init(TAG_IPTTL, "time_to_live", pa_adr_charhex, T_ATTRIBUTE);
5cff782560a1c3cf913ba5574a5123a299f3315emh table_init(TAG_IPPROTO, "protocol", pa_adr_charhex, T_ATTRIBUTE);
5cff782560a1c3cf913ba5574a5123a299f3315emh table_init(TAG_IPCKSUM, "cksum", pa_adr_u_short, T_ATTRIBUTE);
5cff782560a1c3cf913ba5574a5123a299f3315emh table_init(TAG_IPSRC, "src_addr", pa_adr_int32hex, T_ATTRIBUTE);
5cff782560a1c3cf913ba5574a5123a299f3315emh table_init(TAG_IPDEST, "dest_addr", pa_adr_int32hex, T_ATTRIBUTE);
5cff782560a1c3cf913ba5574a5123a299f3315emh table_init(TAG_SOCKTYPE, "type", pa_adr_shorthex, T_ATTRIBUTE);
5cff782560a1c3cf913ba5574a5123a299f3315emh table_init(TAG_SOCKPORT, "port", pa_adr_shorthex, T_ATTRIBUTE);
5cff782560a1c3cf913ba5574a5123a299f3315emh table_init(TAG_SOCKEXDOM, "sock_domain", pa_adr_shorthex, T_ATTRIBUTE);
5cff782560a1c3cf913ba5574a5123a299f3315emh table_init(TAG_SOCKEXTYPE, "sock_type", pa_adr_shorthex, T_ATTRIBUTE);
5cff782560a1c3cf913ba5574a5123a299f3315emh table_init(TAG_SOCKEXLPORT, "lport", NOFUNC, T_ATTRIBUTE);
5cff782560a1c3cf913ba5574a5123a299f3315emh table_init(TAG_SOCKEXLADDR, "laddr", NOFUNC, T_ATTRIBUTE);
5cff782560a1c3cf913ba5574a5123a299f3315emh table_init(TAG_SOCKEXFPORT, "fport", NOFUNC, T_ATTRIBUTE);
5cff782560a1c3cf913ba5574a5123a299f3315emh table_init(TAG_SOCKEXFADDR, "faddr", NOFUNC, T_ATTRIBUTE);
5cff782560a1c3cf913ba5574a5123a299f3315emh table_init(TAG_IPCTYPE, "ipc-type", NOFUNC, T_ATTRIBUTE);
5cff782560a1c3cf913ba5574a5123a299f3315emh table_init(TAG_IPCID, "ipc-id", pa_adr_int32, T_ATTRIBUTE);
5cff782560a1c3cf913ba5574a5123a299f3315emh#endif /* _PRAUDIT */