1/* 2 * Copyright (c) 2006 - 2008, 2010 Apple Inc. All rights reserved. 3 * 4 * @APPLE_LICENSE_HEADER_START@ 5 * 6 * This file contains Original Code and/or Modifications of Original Code 7 * as defined in and that are subject to the Apple Public Source License 8 * Version 2.0 (the 'License'). You may not use this file except in 9 * compliance with the License. Please obtain a copy of the License at 10 * http://www.opensource.apple.com/apsl/ and read it before using this 11 * file. 12 * 13 * The Original Code and all software distributed under the License are 14 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 15 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, 16 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, 17 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 18 * Please see the License for the specific language governing rights and 19 * limitations under the License. 20 * 21 * @APPLE_LICENSE_HEADER_END@ 22 */ 23#ifndef SMB_GSS_H 24#define SMB_GSS_H 25 26#define GSS_MACH_MAX_RETRIES 3 27#define SKEYLEN 8 28 29#ifndef GSS_S_COMPLETE 30#define GSS_S_COMPLETE 0 31#endif 32 33#ifndef GSS_S_CONTINUE_NEEDED 34#define GSS_S_CONTINUE_NEEDED 1 35#endif 36 37#define SMB_USE_GSS(vp) (IPC_PORT_VALID((vp)->vc_gss.gss_mp)) 38#define SMB_GSS_CONTINUE_NEEDED(p) ((p)->gss_major == GSS_S_CONTINUE_NEEDED) 39#define SMB_GSS_ERROR(p) ((p)->gss_major != GSS_S_COMPLETE && \ 40 (p)->gss_major != GSS_S_CONTINUE_NEEDED) 41#define SMB_GSS_COMPLETE(p) ((p)->gss_major == GSS_S_COMPLETE) 42int smb_gss_negotiate(struct smb_vc *vcp, vfs_context_t context); 43int smb_gss_ssnsetup(struct smb_vc *vcp, vfs_context_t context); 44void smb_gss_destroy(struct smb_gss *gp); 45 46void smb_gss_ref_cred(struct smb_vc *vcp); 47void smb_gss_rel_cred(struct smb_vc *vcp); 48 49#ifdef SMB_DEBUG 50//#define DEBUG_TURN_OFF_EXT_SEC 1 51#endif // SMB_DEBUG 52 53#endif 54