2N/Adnl
2N/Adnl CDDL HEADER START
2N/Adnl
2N/Adnl The contents of this file are subject to the terms of the
2N/Adnl Common Development and Distribution License (the "License").
2N/Adnl You may not use this file except in compliance with the License.
2N/Adnl
2N/Adnl You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2N/Adnl or http://www.opensolaris.org/os/licensing.
2N/Adnl See the License for the specific language governing permissions
2N/Adnl and limitations under the License.
2N/Adnl
2N/Adnl When distributing Covered Code, include this CDDL HEADER in each
2N/Adnl file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2N/Adnl If applicable, add the following below this CDDL HEADER, with the
2N/Adnl fields enclosed by brackets "[]" replaced with your own identifying
2N/Adnl information: Portions Copyright [yyyy] [name of copyright owner]
2N/Adnl
2N/Adnl CDDL HEADER END
2N/A
2N/Adnl
2N/Adnl Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
2N/Adnl
2N/Adivert(-1)
2N/A
2N/Adnl This file contains definitions for the intermediate format shared between
2N/Adnl the Kerberos mech and DTrace. The definitions for DTrace end up in the
2N/Adnl library support file, kerberos.d. The definitions for the Kerberos mech are
2N/Adnl built into mech_krb5.so.1. If kerberos.d and mech_krb5.so.1 fall out of sync
2N/Adnl the kerberos provider will no longer work (as DTrace will not know the
2N/Adnl format of the arguments it copies in from mech_krb5 when a probe fires).
2N/Adnl This file is run through m4 twice:
2N/Adnl
2N/Adnl 1) By directly generating kerberos_dtrace_impl.h which is included in
2N/Adnl mech_krb5.
2N/Adnl 2) By being included in kerberos.d.m4 and thus ending up in kerberos.d used
2N/Adnl by DTrace.
2N/A
2N/Adnl A DTrace library support file should support both 32bit and 64bit data
2N/Adnl models for user processes. One way of determining what data model a
2N/Adnl particular process is using is to look at curthread->t_procp->p_model.
2N/Adnl Unfortunately this will only work in the global zone as it requires
2N/Adnl privileges which cannot be assigned to a local zone. In order to work around
2N/Adnl this limitation the data structures below are arranged so that they are
2N/Adnl identical when built as 32bit or 64bit. When building 32bit code
2N/Adnl (sparc/i386) any pointers are padded out to 64bits. All structures are
2N/Adnl padded out to 8 bytes (see various "uint32_t _pad"). This has the added
2N/Adnl advantage of simplifying the library support file as it no longer has to
2N/Adnl support different paths for 32bit and 64bit. The main downsides to doing it
2N/Adnl this way are added complexity and the strict requirement that all data
2N/Adnl structures are zero'ed out before use (as pointers must be padded on 32bit).
2N/A
2N/Aifelse(
2N/Asparc, 1,
2N/A`define(`PTR',`uint32_t _pad_$2;
2N/A $1 *$2')',
2N/A
2N/Ai386, 1,
2N/A`define(`PTR',`$1 *$2;
2N/A uint32_t _pad_$2')',
2N/A
2N/A`define(`PTR',`$1 *$2')')
2N/A
2N/Adivert(0)dnl
2N/Adnl
2N/Adnl These data structures closely match the external DTrace interfaces.
2N/Adnl
2N/Atypedef struct k5_krbinfo {
2N/A PTR(char, message_type);
2N/A PTR(const char, message_id);
2N/A PTR(char, message);
2N/A uint32_t message_length;
2N/A uint8_t version;
2N/A} k5_krbinfo_t;
2N/A
2N/Atypedef struct k5_kerrorinfo {
2N/A PTR(char, error_code);
2N/A PTR(char, client);
2N/A PTR(char, server);
2N/A PTR(char, e_text);
2N/A PTR(char, e_data);
2N/A uint32_t ctime;
2N/A uint32_t cusec;
2N/A uint32_t stime;
2N/A uint32_t susec;
2N/A} k5_kerrorinfo_t;
2N/A
2N/Atypedef struct k5_kdcrepinfo {
2N/A PTR(char, padata_types);
2N/A PTR(char, client);
2N/A PTR(char, enc_part_etype);
2N/A PTR(char, enc_key_type);
2N/A PTR(unsigned char, enc_key_value);
2N/A PTR(char, enc_last_req);
2N/A PTR(char, enc_flags);
2N/A PTR(char, enc_server);
2N/A PTR(char, enc_caddr);
2N/A uint32_t enc_part_kvno;
2N/A uint32_t enc_key_length;
2N/A uint32_t enc_nonce;
2N/A uint32_t enc_key_expiration;
2N/A uint32_t enc_authtime;
2N/A uint32_t enc_starttime;
2N/A uint32_t enc_endtime;
2N/A uint32_t enc_renew_till;
2N/A} k5_kdcrepinfo_t;
2N/A
2N/Atypedef struct k5_kaprepinfo {
2N/A PTR(char, enc_part_etype);
2N/A PTR(char, enc_subkey_type);
2N/A PTR(unsigned char, enc_subkey_value);
2N/A uint32_t enc_part_kvno;
2N/A uint32_t enc_ctime;
2N/A uint32_t enc_cusec;
2N/A uint32_t enc_subkey_length;
2N/A uint32_t enc_seq_number;
2N/A uint32_t _pad;
2N/A} k5_kaprepinfo_t;
2N/A
2N/Atypedef struct k5_kauthenticatorinfo {
2N/A PTR(char, client);
2N/A PTR(char, cksum_type);
2N/A PTR(unsigned char, cksum_value);
2N/A PTR(char, subkey_type);
2N/A PTR(unsigned char, subkey_value);
2N/A PTR(char, authorization_data);
2N/A uint32_t cksum_length;
2N/A uint32_t cusec;
2N/A uint32_t ctime;
2N/A uint32_t subkey_length;
2N/A uint32_t seq_number;
2N/A uint32_t _pad;
2N/A} k5_kauthenticatorinfo_t;
2N/A
2N/Atypedef struct k5_ksafeinfo {
2N/A PTR(char, user_data);
2N/A PTR(char, s_address);
2N/A PTR(char, r_address);
2N/A PTR(char, cksum_type);
2N/A PTR(unsigned char, cksum_value);
2N/A uint32_t user_data_length;
2N/A uint32_t timestamp;
2N/A uint32_t usec;
2N/A uint32_t seq_number;
2N/A uint32_t cksum_length;
2N/A uint32_t _pad;
2N/A} k5_ksafeinfo_t;
2N/A
2N/Atypedef struct k5_kprivinfo {
2N/A PTR(char, enc_part_etype);
2N/A PTR(char, enc_user_data);
2N/A PTR(char, enc_s_address);
2N/A PTR(char, enc_r_address);
2N/A uint32_t enc_part_kvno;
2N/A uint32_t enc_user_data_length;
2N/A uint32_t enc_timestamp;
2N/A uint32_t enc_usec;
2N/A uint32_t enc_seq_number;
2N/A uint32_t _pad;
2N/A} k5_kprivinfo_t;
2N/A
2N/Atypedef struct k5_kcredinfo {
2N/A PTR(char, enc_part_etype);
2N/A PTR(char, enc_s_address);
2N/A PTR(char, enc_r_address);
2N/A uint32_t enc_part_kvno;
2N/A uint32_t tickets;
2N/A uint32_t enc_nonce;
2N/A uint32_t enc_timestamp;
2N/A uint32_t enc_usec;
2N/A uint32_t _pad;
2N/A} k5_kcredinfo_t;
2N/A
2N/Atypedef struct k5_kconninfo {
2N/A PTR(char, remote);
2N/A PTR(char, local);
2N/A PTR(char, protocol);
2N/A PTR(char, type);
2N/A uint16_t localport;
2N/A uint16_t remoteport;
2N/A uint32_t _pad;
2N/A} k5_kconninfo_t;
2N/A
2N/Atypedef struct k5_kticketinfo {
2N/A PTR(char, server);
2N/A PTR(char, enc_part_etype);
2N/A PTR(char, enc_flags);
2N/A PTR(char, enc_key_type);
2N/A PTR(unsigned char, enc_key_value);
2N/A PTR(char, enc_client);
2N/A PTR(char, enc_transited);
2N/A PTR(char, enc_transited_type);
2N/A PTR(char, enc_addresses);
2N/A PTR(char, enc_authorization_data);
2N/A uint32_t enc_part_kvno;
2N/A uint32_t enc_key_length;
2N/A uint32_t enc_authtime;
2N/A uint32_t enc_starttime;
2N/A uint32_t enc_endtime;
2N/A uint32_t enc_renew_till;
2N/A} k5_kticketinfo_t;
2N/A
2N/Atypedef struct k5_kdcreqinfo {
2N/A PTR(char, padata_types);
2N/A PTR(char, kdc_options);
2N/A PTR(char, client);
2N/A PTR(char, server);
2N/A PTR(char, etype);
2N/A PTR(char, addresses);
2N/A PTR(char, authorization_data);
2N/A uint32_t from;
2N/A uint32_t till;
2N/A uint32_t rtime;
2N/A uint32_t nonce;
2N/A uint32_t num_additional_tickets;
2N/A uint32_t _pad;
2N/A} k5_kdcreqinfo_t;
2N/A
2N/Atypedef struct k5_kapreqinfo {
2N/A PTR(char, ap_options);
2N/A PTR(char, authenticator_etype);
2N/A uint32_t authenticator_kvno;
2N/A uint32_t _pad;
2N/A} k5_kapreqinfo_t;
2N/A
2N/Atypedef struct k5_trace {
2N/A PTR(k5_krbinfo_t, info);
2N/A PTR(void, arg);
2N/A PTR(k5_kticketinfo_t, tkt);
2N/A PTR(k5_kauthenticatorinfo_t, auth);
2N/A} k5_trace_t;