11573Srgrimes/* 21573Srgrimes * Copyright (c) 2005, PADL Software Pty Ltd. 31573Srgrimes * All rights reserved. 41573Srgrimes * 51573Srgrimes * Portions Copyright (c) 2009 Apple Inc. All rights reserved. 61573Srgrimes * 71573Srgrimes * Redistribution and use in source and binary forms, with or without 81573Srgrimes * modification, are permitted provided that the following conditions 91573Srgrimes * are met: 101573Srgrimes * 111573Srgrimes * 1. Redistributions of source code must retain the above copyright 121573Srgrimes * notice, this list of conditions and the following disclaimer. 131573Srgrimes * 141573Srgrimes * 2. Redistributions in binary form must reproduce the above copyright 151573Srgrimes * notice, this list of conditions and the following disclaimer in the 161573Srgrimes * documentation and/or other materials provided with the distribution. 171573Srgrimes * 181573Srgrimes * 3. Neither the name of PADL Software nor the names of its contributors 191573Srgrimes * may be used to endorse or promote products derived from this software 201573Srgrimes * without specific prior written permission. 211573Srgrimes * 221573Srgrimes * THIS SOFTWARE IS PROVIDED BY PADL SOFTWARE AND CONTRIBUTORS ``AS IS'' AND 231573Srgrimes * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 241573Srgrimes * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 251573Srgrimes * ARE DISCLAIMED. IN NO EVENT SHALL PADL SOFTWARE OR CONTRIBUTORS BE LIABLE 261573Srgrimes * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 271573Srgrimes * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 281573Srgrimes * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 291573Srgrimes * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 301573Srgrimes * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 311573Srgrimes * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 321573Srgrimes * SUCH DAMAGE. 3350476Speter */ 341573Srgrimes 351573Srgrimes#ifndef __KCM_H__ 361573Srgrimes#define __KCM_H__ 371573Srgrimes 381573Srgrimes/* 391573Srgrimes * KCM protocol definitions 401573Srgrimes */ 411573Srgrimes 4259510Sphantom#define KCM_PROTOCOL_VERSION_MAJOR 2 4359510Sphantom#define KCM_PROTOCOL_VERSION_MINOR 0 441573Srgrimes 4584306Srutypedef unsigned char kcmuuid_t[16]; 461573Srgrimes 4744491Sbdetypedef enum kcm_operation { 481573Srgrimes KCM_OP_NOOP, 4944491Sbde KCM_OP_GET_NAME, 501573Srgrimes KCM_OP_RESOLVE, 511573Srgrimes KCM_OP_GEN_NEW, 521573Srgrimes KCM_OP_INITIALIZE, 531573Srgrimes KCM_OP_DESTROY, 541573Srgrimes KCM_OP_STORE, 551573Srgrimes KCM_OP_RETRIEVE, 56131504Sru KCM_OP_GET_PRINCIPAL, 57131504Sru KCM_OP_GET_CRED_UUID_LIST, 581573Srgrimes KCM_OP_GET_CRED_BY_UUID, 591573Srgrimes KCM_OP_REMOVE_CRED, 601573Srgrimes KCM_OP_SET_FLAGS, 611573Srgrimes KCM_OP_CHOWN, 621573Srgrimes KCM_OP_CHMOD, 631573Srgrimes KCM_OP_GET_INITIAL_TICKET, 641573Srgrimes KCM_OP_GET_TICKET, 651573Srgrimes KCM_OP_MOVE_CACHE, 6679754Sdd KCM_OP_GET_CACHE_UUID_LIST, 671573Srgrimes KCM_OP_GET_CACHE_BY_UUID, 681573Srgrimes KCM_OP_GET_DEFAULT_CACHE, 691573Srgrimes KCM_OP_SET_DEFAULT_CACHE, 701573Srgrimes KCM_OP_GET_KDC_OFFSET, 711573Srgrimes KCM_OP_SET_KDC_OFFSET, 7279754Sdd /* NTLM operations */ 731573Srgrimes KCM_OP_ADD_NTLM_CRED, 741573Srgrimes KCM_OP_HAVE_NTLM_CRED, 751573Srgrimes KCM_OP_DEL_NTLM_CRED, 761573Srgrimes KCM_OP_DO_NTLM_AUTH, 771573Srgrimes KCM_OP_GET_NTLM_USER_LIST, 7879754Sdd KCM_OP_MAX 791573Srgrimes} kcm_operation; 801573Srgrimes 811573Srgrimes#define _PATH_KCM_SOCKET "/var/run/.kcm_socket" 821573Srgrimes#define _PATH_KCM_DOOR "/var/run/.kcm_door" 831573Srgrimes 841573Srgrimes#define KCM_NTLM_FLAG_SESSIONKEY 1 851573Srgrimes#define KCM_NTLM_FLAG_NTLM2_SESSION 2 861573Srgrimes#define KCM_NTLM_FLAG_KEYEX 4 871573Srgrimes#define KCM_NTLM_FLAG_AV_GUEST 8 881573Srgrimes 891573Srgrimes#endif /* __KCM_H__ */ 901573Srgrimes 911573Srgrimes