From 9a085b0b80d1528e2b7a65ae8a4647cffff74a0c Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Tue, 27 Dec 2011 22:00:22 +1100 Subject: [PATCH] auth/kerberos: Move gssapi_parse.c to the top level This will help with writing a gensec module for the s3 gse layer. Andrew Bartlett --- {source4/auth => auth}/kerberos/gssapi_parse.c | 10 ++++------ auth/kerberos/wscript_build | 4 ++-- libcli/auth/krb5_wrap.h | 4 ++++ source4/auth/kerberos/wscript_build | 4 ++-- 4 files changed, 12 insertions(+), 10 deletions(-) rename {source4/auth => auth}/kerberos/gssapi_parse.c (99%) diff --git a/source4/auth/kerberos/gssapi_parse.c b/auth/kerberos/gssapi_parse.c similarity index 99% rename from source4/auth/kerberos/gssapi_parse.c rename to auth/kerberos/gssapi_parse.c index b538d822d1..6e9eddced6 100644 --- a/source4/auth/kerberos/gssapi_parse.c +++ b/auth/kerberos/gssapi_parse.c @@ -1,4 +1,4 @@ -/* +/* Unix SMB/CIFS implementation. simple GSSAPI wrappers @@ -6,17 +6,17 @@ Copyright (C) Andrew Tridgell 2001 Copyright (C) Jim McDonough 2002 Copyright (C) Luke Howard 2003 - + This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. - + This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - + You should have received a copy of the GNU General Public License along with this program. If not, see . */ @@ -117,5 +117,3 @@ bool gensec_gssapi_check_oid(const DATA_BLOB *blob, const char *oid) return ret; } - - diff --git a/auth/kerberos/wscript_build b/auth/kerberos/wscript_build index 2421b1654f..fe38b76c0c 100644 --- a/auth/kerberos/wscript_build +++ b/auth/kerberos/wscript_build @@ -1,3 +1,3 @@ bld.SAMBA_SUBSYSTEM('KRB5_PAC', - source='gssapi_pac.c kerberos_pac.c', - deps='gssapi_krb5 krb5 ndr-krb5pac com_err') + source='gssapi_pac.c kerberos_pac.c gssapi_parse.c', + deps='gssapi_krb5 krb5 ndr-krb5pac com_err asn1util') diff --git a/libcli/auth/krb5_wrap.h b/libcli/auth/krb5_wrap.h index 82769aede9..affb892b57 100644 --- a/libcli/auth/krb5_wrap.h +++ b/libcli/auth/krb5_wrap.h @@ -77,3 +77,7 @@ NTSTATUS gssapi_obtain_pac_blob(TALLOC_CTX *mem_ctx, gss_ctx_id_t gssapi_context, gss_name_t gss_client_name, DATA_BLOB *pac_data); +DATA_BLOB gensec_gssapi_gen_krb5_wrap(TALLOC_CTX *mem_ctx, const DATA_BLOB *ticket, const uint8_t tok_id[2]); + +bool gensec_gssapi_parse_krb5_wrap(TALLOC_CTX *mem_ctx, const DATA_BLOB *blob, DATA_BLOB *ticket, uint8_t tok_id[2]); +bool gensec_gssapi_check_oid(const DATA_BLOB *blob, const char *oid); diff --git a/source4/auth/kerberos/wscript_build b/source4/auth/kerberos/wscript_build index 90e8560573..989614e804 100644 --- a/source4/auth/kerberos/wscript_build +++ b/source4/auth/kerberos/wscript_build @@ -1,10 +1,10 @@ #!/usr/bin/env python bld.SAMBA_LIBRARY('authkrb5', - source='kerberos.c kerberos_heimdal.c kerberos_pac.c gssapi_parse.c krb5_init_context.c keytab_copy.c', + source='kerberos.c kerberos_heimdal.c kerberos_pac.c krb5_init_context.c keytab_copy.c', autoproto='proto.h', public_deps='krb5 ndr-krb5pac samba_socket LIBCLI_RESOLVE com_err asn1', - deps='asn1util auth_sam_reply tevent LIBPACKET ndr ldb KRB5_WRAP errors', + deps='auth_sam_reply tevent LIBPACKET ndr ldb KRB5_WRAP errors', private_library=True ) -- 2.34.1