Initial Windows port
This commit is contained in:
committed by
Love Hornquist Astrand
parent
25a2ac726b
commit
b1063ea8fc
@@ -0,0 +1,442 @@
|
||||
########################################################################
|
||||
#
|
||||
# Copyright (c) 2009, Secure Endpoints Inc.
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions
|
||||
# are met:
|
||||
#
|
||||
# - Redistributions of source code must retain the above copyright
|
||||
# notice, this list of conditions and the following disclaimer.
|
||||
#
|
||||
# - Redistributions in binary form must reproduce the above copyright
|
||||
# notice, this list of conditions and the following disclaimer in
|
||||
# the documentation and/or other materials provided with the
|
||||
# distribution.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
# FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
# COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||
# BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
||||
# ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
||||
# POSSIBILITY OF SUCH DAMAGE.
|
||||
#
|
||||
|
||||
RELDIR=lib\krb5
|
||||
|
||||
!include ../../windows/NTMakefile.w32
|
||||
|
||||
libkrb5_OBJS = \
|
||||
$(OBJ)\acache.obj \
|
||||
$(OBJ)\acl.obj \
|
||||
$(OBJ)\add_et_list.obj \
|
||||
$(OBJ)\addr_families.obj \
|
||||
$(OBJ)\aname_to_localname.obj \
|
||||
$(OBJ)\appdefault.obj \
|
||||
$(OBJ)\asn1_glue.obj \
|
||||
$(OBJ)\auth_context.obj \
|
||||
$(OBJ)\build_ap_req.obj \
|
||||
$(OBJ)\build_auth.obj \
|
||||
$(OBJ)\cache.obj \
|
||||
$(OBJ)\changepw.obj \
|
||||
$(OBJ)\codec.obj \
|
||||
$(OBJ)\config_file.obj \
|
||||
$(OBJ)\config_file_netinfo.obj \
|
||||
$(OBJ)\convert_creds.obj \
|
||||
$(OBJ)\constants.obj \
|
||||
$(OBJ)\context.obj \
|
||||
$(OBJ)\copy_host_realm.obj \
|
||||
$(OBJ)\crc.obj \
|
||||
$(OBJ)\creds.obj \
|
||||
$(OBJ)\crypto.obj \
|
||||
$(OBJ)\data.obj \
|
||||
$(OBJ)\digest.obj \
|
||||
$(OBJ)\eai_to_heim_errno.obj \
|
||||
$(OBJ)\error_string.obj \
|
||||
$(OBJ)\expand_hostname.obj \
|
||||
$(OBJ)\expand_path_w32.obj \
|
||||
$(OBJ)\fcache.obj \
|
||||
$(OBJ)\free.obj \
|
||||
$(OBJ)\free_host_realm.obj \
|
||||
$(OBJ)\generate_seq_number.obj \
|
||||
$(OBJ)\generate_subkey.obj \
|
||||
$(OBJ)\get_addrs.obj \
|
||||
$(OBJ)\get_cred.obj \
|
||||
$(OBJ)\get_default_principal.obj \
|
||||
$(OBJ)\get_default_realm.obj \
|
||||
$(OBJ)\get_for_creds.obj \
|
||||
$(OBJ)\get_host_realm.obj \
|
||||
$(OBJ)\get_in_tkt.obj \
|
||||
$(OBJ)\get_in_tkt_pw.obj \
|
||||
$(OBJ)\get_in_tkt_with_keytab.obj \
|
||||
$(OBJ)\get_in_tkt_with_skey.obj \
|
||||
$(OBJ)\get_port.obj \
|
||||
$(OBJ)\init_creds.obj \
|
||||
$(OBJ)\init_creds_pw.obj \
|
||||
$(OBJ)\kcm.obj \
|
||||
$(OBJ)\keyblock.obj \
|
||||
$(OBJ)\keytab.obj \
|
||||
$(OBJ)\keytab_any.obj \
|
||||
$(OBJ)\keytab_file.obj \
|
||||
$(OBJ)\keytab_keyfile.obj \
|
||||
$(OBJ)\keytab_krb4.obj \
|
||||
$(OBJ)\keytab_memory.obj \
|
||||
$(OBJ)\krbhst.obj \
|
||||
$(OBJ)\kuserok.obj \
|
||||
$(OBJ)\log.obj \
|
||||
$(OBJ)\mcache.obj \
|
||||
$(OBJ)\misc.obj \
|
||||
$(OBJ)\mk_error.obj \
|
||||
$(OBJ)\mk_priv.obj \
|
||||
$(OBJ)\mk_rep.obj \
|
||||
$(OBJ)\mk_req.obj \
|
||||
$(OBJ)\mk_req_ext.obj \
|
||||
$(OBJ)\mk_safe.obj \
|
||||
$(OBJ)\mit_glue.obj \
|
||||
$(OBJ)\net_read.obj \
|
||||
$(OBJ)\net_write.obj \
|
||||
$(OBJ)\n-fold.obj \
|
||||
$(OBJ)\pac.obj \
|
||||
$(OBJ)\padata.obj \
|
||||
$(OBJ)\pkinit.obj \
|
||||
$(OBJ)\principal.obj \
|
||||
$(OBJ)\prog_setup.obj \
|
||||
$(OBJ)\prompter_posix.obj \
|
||||
$(OBJ)\rd_cred.obj \
|
||||
$(OBJ)\rd_error.obj \
|
||||
$(OBJ)\rd_priv.obj \
|
||||
$(OBJ)\rd_rep.obj \
|
||||
$(OBJ)\rd_req.obj \
|
||||
$(OBJ)\rd_safe.obj \
|
||||
$(OBJ)\read_message.obj \
|
||||
$(OBJ)\recvauth.obj \
|
||||
$(OBJ)\replay.obj \
|
||||
$(OBJ)\scache.obj \
|
||||
$(OBJ)\send_to_kdc.obj \
|
||||
$(OBJ)\sendauth.obj \
|
||||
$(OBJ)\set_default_realm.obj \
|
||||
$(OBJ)\sock_principal.obj \
|
||||
$(OBJ)\store.obj \
|
||||
$(OBJ)\store_emem.obj \
|
||||
$(OBJ)\store_fd.obj \
|
||||
$(OBJ)\store_mem.obj \
|
||||
$(OBJ)\plugin.obj \
|
||||
$(OBJ)\ticket.obj \
|
||||
$(OBJ)\time.obj \
|
||||
$(OBJ)\transited.obj \
|
||||
$(OBJ)\v4_glue.obj \
|
||||
$(OBJ)\verify_init.obj \
|
||||
$(OBJ)\verify_user.obj \
|
||||
$(OBJ)\version.obj \
|
||||
$(OBJ)\warn.obj \
|
||||
$(OBJ)\write_message.obj
|
||||
|
||||
libkrb5_gen_OBJS= \
|
||||
$(OBJ)\krb5_err.obj \
|
||||
$(OBJ)\krb_err.obj \
|
||||
$(OBJ)\heim_err.obj \
|
||||
$(OBJ)\k524_err.obj
|
||||
|
||||
INCFILES= \
|
||||
$(INCDIR)\heim_err.h \
|
||||
$(INCDIR)\heim_threads.h \
|
||||
$(INCDIR)\k524_err.h \
|
||||
$(INCDIR)\krb_err.h \
|
||||
$(INCDIR)\krb5.h \
|
||||
$(INCDIR)\krb5_ccapi.h \
|
||||
$(INCDIR)\krb5_err.h \
|
||||
$(INCDIR)\krb5_locl.h \
|
||||
$(INCDIR)\krb5-protos.h \
|
||||
$(INCDIR)\krb5-private.h
|
||||
|
||||
all:: $(INCFILES)
|
||||
|
||||
clean::
|
||||
-$(RM) $(INCFILES)
|
||||
|
||||
dist_libkrb5_la_SOURCES = \
|
||||
acache.c \
|
||||
acl.c \
|
||||
add_et_list.c \
|
||||
addr_families.c \
|
||||
aname_to_localname.c \
|
||||
appdefault.c \
|
||||
asn1_glue.c \
|
||||
auth_context.c \
|
||||
build_ap_req.c \
|
||||
build_auth.c \
|
||||
cache.c \
|
||||
changepw.c \
|
||||
codec.c \
|
||||
config_file.c \
|
||||
config_file_netinfo.c \
|
||||
convert_creds.c \
|
||||
constants.c \
|
||||
context.c \
|
||||
copy_host_realm.c \
|
||||
crc.c \
|
||||
creds.c \
|
||||
crypto.c \
|
||||
doxygen.c \
|
||||
data.c \
|
||||
digest.c \
|
||||
eai_to_heim_errno.c \
|
||||
error_string.c \
|
||||
expand_hostname.c \
|
||||
expand_path_w32.c \
|
||||
fcache.c \
|
||||
free.c \
|
||||
free_host_realm.c \
|
||||
generate_seq_number.c \
|
||||
generate_subkey.c \
|
||||
get_addrs.c \
|
||||
get_cred.c \
|
||||
get_default_principal.c \
|
||||
get_default_realm.c \
|
||||
get_for_creds.c \
|
||||
get_host_realm.c \
|
||||
get_in_tkt.c \
|
||||
get_in_tkt_pw.c \
|
||||
get_in_tkt_with_keytab.c \
|
||||
get_in_tkt_with_skey.c \
|
||||
get_port.c \
|
||||
heim_threads.h \
|
||||
init_creds.c \
|
||||
init_creds_pw.c \
|
||||
kcm.c \
|
||||
kcm.h \
|
||||
keyblock.c \
|
||||
keytab.c \
|
||||
keytab_any.c \
|
||||
keytab_file.c \
|
||||
keytab_keyfile.c \
|
||||
keytab_krb4.c \
|
||||
keytab_memory.c \
|
||||
krb5_locl.h \
|
||||
krb5-v4compat.h \
|
||||
krbhst.c \
|
||||
kuserok.c \
|
||||
log.c \
|
||||
mcache.c \
|
||||
misc.c \
|
||||
mk_error.c \
|
||||
mk_priv.c \
|
||||
mk_rep.c \
|
||||
mk_req.c \
|
||||
mk_req_ext.c \
|
||||
mk_safe.c \
|
||||
mit_glue.c \
|
||||
net_read.c \
|
||||
net_write.c \
|
||||
n-fold.c \
|
||||
pac.c \
|
||||
padata.c \
|
||||
pkinit.c \
|
||||
principal.c \
|
||||
prog_setup.c \
|
||||
prompter_posix.c \
|
||||
rd_cred.c \
|
||||
rd_error.c \
|
||||
rd_priv.c \
|
||||
rd_rep.c \
|
||||
rd_req.c \
|
||||
rd_safe.c \
|
||||
read_message.c \
|
||||
recvauth.c \
|
||||
replay.c \
|
||||
scache.c \
|
||||
send_to_kdc.c \
|
||||
sendauth.c \
|
||||
set_default_realm.c \
|
||||
sock_principal.c \
|
||||
store.c \
|
||||
store-int.h \
|
||||
store_emem.c \
|
||||
store_fd.c \
|
||||
store_mem.c \
|
||||
plugin.c \
|
||||
ticket.c \
|
||||
time.c \
|
||||
transited.c \
|
||||
v4_glue.c \
|
||||
verify_init.c \
|
||||
verify_user.c \
|
||||
version.c \
|
||||
warn.c \
|
||||
write_message.c
|
||||
|
||||
$(OBJ)\krb5-protos.h: $(dist_libkrb5_la_SOURCES)
|
||||
$(PERL) ..\..\cf\make-proto.pl -E KRB5_LIB -q -P remove -o $(OBJ)\krb5-protos.h $(dist_libkrb5_la_SOURCES) || $(RM) -f krb5-protos.h
|
||||
|
||||
$(OBJ)\krb5-private.h: $(dist_libkrb5_la_SOURCES)
|
||||
$(PERL) ..\..\cf\make-proto.pl -q -P remove -p $(OBJ)\krb5-private.h $(dist_libkrb5_la_SOURCES) || $(RM) -f krb5-private.h
|
||||
|
||||
$(OBJ)\krb5_err.c $(OBJ)\krb5_err.h: krb5_err.et
|
||||
cd $(OBJ)
|
||||
$(BINDIR)\compile_et.exe $(SRCDIR)\krb5_err.et
|
||||
cd $(SRCDIR)
|
||||
|
||||
$(OBJ)\krb_err.c $(OBJ)\krb_err.h: krb_err.et
|
||||
cd $(OBJ)
|
||||
$(BINDIR)\compile_et.exe $(SRCDIR)\krb_err.et
|
||||
cd $(SRCDIR)
|
||||
|
||||
$(OBJ)\heim_err.c $(OBJ)\heim_err.h: heim_err.et
|
||||
cd $(OBJ)
|
||||
$(BINDIR)\compile_et.exe $(SRCDIR)\heim_err.et
|
||||
cd $(SRCDIR)
|
||||
|
||||
$(OBJ)\k524_err.c $(OBJ)\k524_err.h: k524_err.et
|
||||
cd $(OBJ)
|
||||
$(BINDIR)\compile_et.exe $(SRCDIR)\k524_err.et
|
||||
cd $(SRCDIR)
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
# libkrb5
|
||||
|
||||
!ifdef STATICLIBS
|
||||
|
||||
$(LIBKRB5): $(libkrb5_OBJS) $(libkrb5_gen_OBJS)
|
||||
$(LIBCON)
|
||||
|
||||
all:: $(LIBKRB5)
|
||||
|
||||
clean::
|
||||
-$(RM) $(LIBKRB5)
|
||||
|
||||
!else
|
||||
|
||||
DLLDEPS= \
|
||||
$(LIBROKEN) \
|
||||
$(LIBASN1) \
|
||||
$(LIBSQLITE) \
|
||||
$(LIBCOMERR) \
|
||||
$(LIBHCRYPTO) \
|
||||
$(LIBHX509) \
|
||||
$(LIBWIND)
|
||||
|
||||
DLLSDKDEPS= \
|
||||
$(PTHREAD_LIB) \
|
||||
secur32.lib \
|
||||
shell32.lib
|
||||
|
||||
$(LIBKRB5): $(BINDIR)\libkrb5.dll
|
||||
|
||||
$(BINDIR)\libkrb5.dll: $(libkrb5_OBJS) $(libkrb5_gen_OBJS) $(DLLDEPS)
|
||||
$(DLLGUILINK_C) -out:$(BINDIR)\libkrb5.dll -implib:$(LIBKRB5) \
|
||||
$(DLLDEPS) $(DLLSDKDEPS) -def:libkrb5-exports.def @<<
|
||||
$(libkrb5_OBJS: =
|
||||
)
|
||||
$(libkrb5_gen_OBJS: =
|
||||
)
|
||||
<<
|
||||
$(_VC_MANIFEST_EMBED_DLL)
|
||||
$(_VC_MANIFEST_CLEAN)
|
||||
$(_CODESIGN)
|
||||
|
||||
all:: $(BINDIR)\libkrb5.dll
|
||||
|
||||
clean::
|
||||
-$(RM) $(BINDIR)\libkrb5.dll
|
||||
-$(RM) $(LIBKRB5)
|
||||
|
||||
!endif
|
||||
|
||||
all:: $(BINDIR)\verify_krb5_conf.exe
|
||||
|
||||
clean::
|
||||
-$(RM) $(BINDIR)\verify_krb5_conf.exe
|
||||
|
||||
$(BINDIR)\verify_krb5_conf.exe: $(OBJ)\verify_krb5_conf.obj $(LIBKRB5) $(LIBROKEN) $(LIBVERS)
|
||||
$(EXECONLINK)
|
||||
$(_VC_MANIFEST_EMBED_EXE)
|
||||
$(_VC_MANIFEST_CLEAN)
|
||||
$(_CODESIGN)
|
||||
|
||||
{}.c{$(OBJ)}.obj:
|
||||
$(C2OBJ) -DBUILD_KRB5_LIB
|
||||
|
||||
{$(OBJ)}.c{$(OBJ)}.obj:
|
||||
$(C2OBJ) -DBUILD_KRB5_LIB
|
||||
|
||||
#----------------------------------------------------------------------
|
||||
# Tests
|
||||
|
||||
test:: test-binaries test-run
|
||||
|
||||
test_binaries = \
|
||||
$(OBJ)\krbhst-test.exe \
|
||||
$(OBJ)\test_alname.exe \
|
||||
$(OBJ)\test_crypto.exe \
|
||||
$(OBJ)\test_get_addrs.exe \
|
||||
$(OBJ)\test_kuserok.exe \
|
||||
$(OBJ)\test_renew.exe \
|
||||
$(OBJ)\test_forward.exe \
|
||||
$(OBJ)\aes-test.exe \
|
||||
$(OBJ)\derived-key-test.exe \
|
||||
$(OBJ)\n-fold-test.exe \
|
||||
$(OBJ)\name-45-test.exe \
|
||||
$(OBJ)\parse-name-test.exe \
|
||||
$(OBJ)\store-test.exe \
|
||||
$(OBJ)\string-to-key-test.exe \
|
||||
$(OBJ)\test_acl.exe \
|
||||
$(OBJ)\test_addr.exe \
|
||||
$(OBJ)\test_cc.exe \
|
||||
$(OBJ)\test_config.exe \
|
||||
$(OBJ)\test_hostname.exe \
|
||||
$(OBJ)\test_prf.exe \
|
||||
$(OBJ)\test_store.exe \
|
||||
$(OBJ)\test_crypto_wrapping.exe \
|
||||
$(OBJ)\test_keytab.exe \
|
||||
$(OBJ)\test_mem.exe \
|
||||
$(OBJ)\test_pac.exe \
|
||||
$(OBJ)\test_plugin.exe \
|
||||
$(OBJ)\test_princ.exe \
|
||||
$(OBJ)\test_pkinit_dh2key.exe \
|
||||
$(OBJ)\test_pknistkdf.exe \
|
||||
$(OBJ)\test_time.exe
|
||||
|
||||
test-binaries: $(test_binaries)
|
||||
|
||||
test-run:
|
||||
cd $(OBJ)
|
||||
aes-test.exe
|
||||
derived-key-test.exe
|
||||
n-fold-test.exe
|
||||
name-45-test.exe
|
||||
parse-name-test.exe
|
||||
store-test.exe
|
||||
string-to-key-test.exe
|
||||
test_acl.exe
|
||||
-test_addr.exe
|
||||
test_cc.exe
|
||||
test_config.exe
|
||||
test_prf.exe
|
||||
test_store.exe
|
||||
test_crypto_wrapping.exe
|
||||
test_keytab.exe
|
||||
test_mem.exe
|
||||
test_pac.exe
|
||||
test_plugin.exe
|
||||
test_princ.exe
|
||||
test_pkinit_dh2key.exe
|
||||
test_pknistkdf.exe
|
||||
test_time.exe
|
||||
cd $(SRCDIR)
|
||||
|
||||
$(test_binaries): $$(@R).obj
|
||||
$(EXECONLINK) $(LIBKRB5) $(LIBVERS) $(LIBROKEN) $(LIBHCRYPTO) $(LIBASN1)
|
||||
$(_VC_MANIFEST_EMBED_EXE)
|
||||
$(_VC_MANIFEST_CLEAN)
|
||||
|
||||
$(test_binaries:.exe=.obj): $$(@B).c
|
||||
$(C2OBJ_C) -Fo$@ -Fd$(@D)\ $** -DBlah
|
||||
|
||||
|
||||
+2
-2
@@ -198,7 +198,7 @@ acl_match_acl(krb5_context context,
|
||||
* @ingroup krb5_support
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_acl_match_string(krb5_context context,
|
||||
const char *string,
|
||||
const char *format,
|
||||
@@ -241,7 +241,7 @@ krb5_acl_match_string(krb5_context context,
|
||||
* @ingroup krb5_support
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_acl_match_file(krb5_context context,
|
||||
const char *file,
|
||||
const char *format,
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
* @ingroup krb5
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_add_et_list (krb5_context context,
|
||||
void (*func)(struct et_list **))
|
||||
{
|
||||
|
||||
+20
-30
@@ -175,16 +175,8 @@ ipv4_parse_addr (krb5_context context, const char *address, krb5_address *addr)
|
||||
return -1;
|
||||
} else
|
||||
p = address;
|
||||
#ifdef HAVE_INET_ATON
|
||||
if(inet_aton(p, &a) == 0)
|
||||
return -1;
|
||||
#elif defined(HAVE_INET_ADDR)
|
||||
a.s_addr = inet_addr(p);
|
||||
if(a.s_addr == INADDR_NONE)
|
||||
return -1;
|
||||
#else
|
||||
return -1;
|
||||
#endif
|
||||
addr->addr_type = KRB5_ADDRESS_INET;
|
||||
if(krb5_data_alloc(&addr->address, 4) != 0)
|
||||
return -1;
|
||||
@@ -339,9 +331,7 @@ static int
|
||||
ipv6_print_addr (const krb5_address *addr, char *str, size_t len)
|
||||
{
|
||||
char buf[128], buf2[3];
|
||||
#ifdef HAVE_INET_NTOP
|
||||
if(inet_ntop(AF_INET6, addr->address.data, buf, sizeof(buf)) == NULL)
|
||||
#endif
|
||||
{
|
||||
/* XXX this is pretty ugly, but better than abort() */
|
||||
int i;
|
||||
@@ -790,7 +780,7 @@ find_atype(int atype)
|
||||
* @ingroup krb5_address
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_sockaddr2address (krb5_context context,
|
||||
const struct sockaddr *sa, krb5_address *addr)
|
||||
{
|
||||
@@ -818,7 +808,7 @@ krb5_sockaddr2address (krb5_context context,
|
||||
* @ingroup krb5_address
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_sockaddr2port (krb5_context context,
|
||||
const struct sockaddr *sa, int16_t *port)
|
||||
{
|
||||
@@ -853,7 +843,7 @@ krb5_sockaddr2port (krb5_context context,
|
||||
* @ingroup krb5_address
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_addr2sockaddr (krb5_context context,
|
||||
const krb5_address *addr,
|
||||
struct sockaddr *sa,
|
||||
@@ -889,7 +879,7 @@ krb5_addr2sockaddr (krb5_context context,
|
||||
* @ingroup krb5_address
|
||||
*/
|
||||
|
||||
size_t KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION size_t KRB5_LIB_CALL
|
||||
krb5_max_sockaddr_size (void)
|
||||
{
|
||||
if (max_sockaddr_size == 0) {
|
||||
@@ -913,7 +903,7 @@ krb5_max_sockaddr_size (void)
|
||||
* @ingroup krb5_address
|
||||
*/
|
||||
|
||||
krb5_boolean KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL
|
||||
krb5_sockaddr_uninteresting(const struct sockaddr *sa)
|
||||
{
|
||||
struct addr_operations *a = find_af(sa->sa_family);
|
||||
@@ -941,7 +931,7 @@ krb5_sockaddr_uninteresting(const struct sockaddr *sa)
|
||||
* @ingroup krb5_address
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_h_addr2sockaddr (krb5_context context,
|
||||
int af,
|
||||
const char *addr, struct sockaddr *sa,
|
||||
@@ -972,7 +962,7 @@ krb5_h_addr2sockaddr (krb5_context context,
|
||||
* @ingroup krb5_address
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_h_addr2addr (krb5_context context,
|
||||
int af,
|
||||
const char *haddr, krb5_address *addr)
|
||||
@@ -1003,7 +993,7 @@ krb5_h_addr2addr (krb5_context context,
|
||||
* @ingroup krb5_address
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_anyaddr (krb5_context context,
|
||||
int af,
|
||||
struct sockaddr *sa,
|
||||
@@ -1038,7 +1028,7 @@ krb5_anyaddr (krb5_context context,
|
||||
* @ingroup krb5_address
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_print_address (const krb5_address *addr,
|
||||
char *str, size_t len, size_t *ret_len)
|
||||
{
|
||||
@@ -1088,7 +1078,7 @@ krb5_print_address (const krb5_address *addr,
|
||||
* @ingroup krb5_address
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_parse_address(krb5_context context,
|
||||
const char *string,
|
||||
krb5_addresses *addresses)
|
||||
@@ -1169,7 +1159,7 @@ krb5_parse_address(krb5_context context,
|
||||
* @ingroup krb5_address
|
||||
*/
|
||||
|
||||
int KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION int KRB5_LIB_CALL
|
||||
krb5_address_order(krb5_context context,
|
||||
const krb5_address *addr1,
|
||||
const krb5_address *addr2)
|
||||
@@ -1218,7 +1208,7 @@ krb5_address_order(krb5_context context,
|
||||
* @ingroup krb5_address
|
||||
*/
|
||||
|
||||
krb5_boolean KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL
|
||||
krb5_address_compare(krb5_context context,
|
||||
const krb5_address *addr1,
|
||||
const krb5_address *addr2)
|
||||
@@ -1239,7 +1229,7 @@ krb5_address_compare(krb5_context context,
|
||||
* @ingroup krb5_address
|
||||
*/
|
||||
|
||||
krb5_boolean KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL
|
||||
krb5_address_search(krb5_context context,
|
||||
const krb5_address *addr,
|
||||
const krb5_addresses *addrlist)
|
||||
@@ -1264,7 +1254,7 @@ krb5_address_search(krb5_context context,
|
||||
* @ingroup krb5_address
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_free_address(krb5_context context,
|
||||
krb5_address *address)
|
||||
{
|
||||
@@ -1288,7 +1278,7 @@ krb5_free_address(krb5_context context,
|
||||
* @ingroup krb5_address
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_free_addresses(krb5_context context,
|
||||
krb5_addresses *addresses)
|
||||
{
|
||||
@@ -1314,7 +1304,7 @@ krb5_free_addresses(krb5_context context,
|
||||
* @ingroup krb5_address
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_copy_address(krb5_context context,
|
||||
const krb5_address *inaddr,
|
||||
krb5_address *outaddr)
|
||||
@@ -1338,7 +1328,7 @@ krb5_copy_address(krb5_context context,
|
||||
* @ingroup krb5_address
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_copy_addresses(krb5_context context,
|
||||
const krb5_addresses *inaddr,
|
||||
krb5_addresses *outaddr)
|
||||
@@ -1365,7 +1355,7 @@ krb5_copy_addresses(krb5_context context,
|
||||
* @ingroup krb5_address
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_append_addresses(krb5_context context,
|
||||
krb5_addresses *dest,
|
||||
const krb5_addresses *source)
|
||||
@@ -1409,7 +1399,7 @@ krb5_append_addresses(krb5_context context,
|
||||
* @ingroup krb5_address
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_make_addrport (krb5_context context,
|
||||
krb5_address **res, const krb5_address *addr, int16_t port)
|
||||
{
|
||||
@@ -1476,7 +1466,7 @@ krb5_make_addrport (krb5_context context,
|
||||
* @ingroup krb5_address
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_address_prefixlen_boundary(krb5_context context,
|
||||
const krb5_address *inaddr,
|
||||
unsigned long prefixlen,
|
||||
|
||||
@@ -31,9 +31,9 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <krb5_locl.h>
|
||||
#include "krb5_locl.h"
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_aname_to_localname (krb5_context context,
|
||||
krb5_const_principal aname,
|
||||
size_t lnsize,
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
#include "krb5_locl.h"
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_appdefault_boolean(krb5_context context, const char *appname,
|
||||
krb5_const_realm realm, const char *option,
|
||||
krb5_boolean def_val, krb5_boolean *ret_val)
|
||||
@@ -119,7 +119,7 @@ krb5_appdefault_string(krb5_context context, const char *appname,
|
||||
*ret_val = NULL;
|
||||
}
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_appdefault_time(krb5_context context, const char *appname,
|
||||
krb5_const_realm realm, const char *option,
|
||||
time_t def_val, time_t *ret_val)
|
||||
|
||||
@@ -37,14 +37,14 @@
|
||||
|
||||
#include "krb5_locl.h"
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
_krb5_principal2principalname (PrincipalName *p,
|
||||
const krb5_principal from)
|
||||
{
|
||||
return copy_PrincipalName(&from->name, p);
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
_krb5_principalname2krb5_principal (krb5_context context,
|
||||
krb5_principal *principal,
|
||||
const PrincipalName from,
|
||||
|
||||
+34
-34
@@ -33,7 +33,7 @@
|
||||
|
||||
#include "krb5_locl.h"
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_auth_con_init(krb5_context context,
|
||||
krb5_auth_context *auth_context)
|
||||
{
|
||||
@@ -64,7 +64,7 @@ krb5_auth_con_init(krb5_context context,
|
||||
return 0;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_auth_con_free(krb5_context context,
|
||||
krb5_auth_context auth_context)
|
||||
{
|
||||
@@ -86,7 +86,7 @@ krb5_auth_con_free(krb5_context context,
|
||||
return 0;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_auth_con_setflags(krb5_context context,
|
||||
krb5_auth_context auth_context,
|
||||
int32_t flags)
|
||||
@@ -96,7 +96,7 @@ krb5_auth_con_setflags(krb5_context context,
|
||||
}
|
||||
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_auth_con_getflags(krb5_context context,
|
||||
krb5_auth_context auth_context,
|
||||
int32_t *flags)
|
||||
@@ -105,7 +105,7 @@ krb5_auth_con_getflags(krb5_context context,
|
||||
return 0;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_auth_con_addflags(krb5_context context,
|
||||
krb5_auth_context auth_context,
|
||||
int32_t addflags,
|
||||
@@ -117,7 +117,7 @@ krb5_auth_con_addflags(krb5_context context,
|
||||
return 0;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_auth_con_removeflags(krb5_context context,
|
||||
krb5_auth_context auth_context,
|
||||
int32_t removeflags,
|
||||
@@ -129,7 +129,7 @@ krb5_auth_con_removeflags(krb5_context context,
|
||||
return 0;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_auth_con_setaddrs(krb5_context context,
|
||||
krb5_auth_context auth_context,
|
||||
krb5_address *local_addr,
|
||||
@@ -154,7 +154,7 @@ krb5_auth_con_setaddrs(krb5_context context,
|
||||
return 0;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_auth_con_genaddrs(krb5_context context,
|
||||
krb5_auth_context auth_context,
|
||||
int fd, int flags)
|
||||
@@ -216,7 +216,7 @@ krb5_auth_con_genaddrs(krb5_context context,
|
||||
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_auth_con_setaddrs_from_fd (krb5_context context,
|
||||
krb5_auth_context auth_context,
|
||||
void *p_fd)
|
||||
@@ -230,7 +230,7 @@ krb5_auth_con_setaddrs_from_fd (krb5_context context,
|
||||
return krb5_auth_con_genaddrs(context, auth_context, fd, flags);
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_auth_con_getaddrs(krb5_context context,
|
||||
krb5_auth_context auth_context,
|
||||
krb5_address **local_addr,
|
||||
@@ -273,7 +273,7 @@ copy_key(krb5_context context,
|
||||
return 0;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_auth_con_getkey(krb5_context context,
|
||||
krb5_auth_context auth_context,
|
||||
krb5_keyblock **keyblock)
|
||||
@@ -281,7 +281,7 @@ krb5_auth_con_getkey(krb5_context context,
|
||||
return copy_key(context, auth_context->keyblock, keyblock);
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_auth_con_getlocalsubkey(krb5_context context,
|
||||
krb5_auth_context auth_context,
|
||||
krb5_keyblock **keyblock)
|
||||
@@ -289,7 +289,7 @@ krb5_auth_con_getlocalsubkey(krb5_context context,
|
||||
return copy_key(context, auth_context->local_subkey, keyblock);
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_auth_con_getremotesubkey(krb5_context context,
|
||||
krb5_auth_context auth_context,
|
||||
krb5_keyblock **keyblock)
|
||||
@@ -297,7 +297,7 @@ krb5_auth_con_getremotesubkey(krb5_context context,
|
||||
return copy_key(context, auth_context->remote_subkey, keyblock);
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_auth_con_setkey(krb5_context context,
|
||||
krb5_auth_context auth_context,
|
||||
krb5_keyblock *keyblock)
|
||||
@@ -307,7 +307,7 @@ krb5_auth_con_setkey(krb5_context context,
|
||||
return copy_key(context, keyblock, &auth_context->keyblock);
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_auth_con_setlocalsubkey(krb5_context context,
|
||||
krb5_auth_context auth_context,
|
||||
krb5_keyblock *keyblock)
|
||||
@@ -317,7 +317,7 @@ krb5_auth_con_setlocalsubkey(krb5_context context,
|
||||
return copy_key(context, keyblock, &auth_context->local_subkey);
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_auth_con_generatelocalsubkey(krb5_context context,
|
||||
krb5_auth_context auth_context,
|
||||
krb5_keyblock *key)
|
||||
@@ -337,7 +337,7 @@ krb5_auth_con_generatelocalsubkey(krb5_context context,
|
||||
}
|
||||
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_auth_con_setremotesubkey(krb5_context context,
|
||||
krb5_auth_context auth_context,
|
||||
krb5_keyblock *keyblock)
|
||||
@@ -347,7 +347,7 @@ krb5_auth_con_setremotesubkey(krb5_context context,
|
||||
return copy_key(context, keyblock, &auth_context->remote_subkey);
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_auth_con_setcksumtype(krb5_context context,
|
||||
krb5_auth_context auth_context,
|
||||
krb5_cksumtype cksumtype)
|
||||
@@ -356,7 +356,7 @@ krb5_auth_con_setcksumtype(krb5_context context,
|
||||
return 0;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_auth_con_getcksumtype(krb5_context context,
|
||||
krb5_auth_context auth_context,
|
||||
krb5_cksumtype *cksumtype)
|
||||
@@ -365,7 +365,7 @@ krb5_auth_con_getcksumtype(krb5_context context,
|
||||
return 0;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_auth_con_setkeytype (krb5_context context,
|
||||
krb5_auth_context auth_context,
|
||||
krb5_keytype keytype)
|
||||
@@ -374,7 +374,7 @@ krb5_auth_con_setkeytype (krb5_context context,
|
||||
return 0;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_auth_con_getkeytype (krb5_context context,
|
||||
krb5_auth_context auth_context,
|
||||
krb5_keytype *keytype)
|
||||
@@ -384,7 +384,7 @@ krb5_auth_con_getkeytype (krb5_context context,
|
||||
}
|
||||
|
||||
#if 0
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_auth_con_setenctype(krb5_context context,
|
||||
krb5_auth_context auth_context,
|
||||
krb5_enctype etype)
|
||||
@@ -398,7 +398,7 @@ krb5_auth_con_setenctype(krb5_context context,
|
||||
return 0;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_auth_con_getenctype(krb5_context context,
|
||||
krb5_auth_context auth_context,
|
||||
krb5_enctype *etype)
|
||||
@@ -407,7 +407,7 @@ krb5_auth_con_getenctype(krb5_context context,
|
||||
}
|
||||
#endif
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_auth_con_getlocalseqnumber(krb5_context context,
|
||||
krb5_auth_context auth_context,
|
||||
int32_t *seqnumber)
|
||||
@@ -416,7 +416,7 @@ krb5_auth_con_getlocalseqnumber(krb5_context context,
|
||||
return 0;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_auth_con_setlocalseqnumber (krb5_context context,
|
||||
krb5_auth_context auth_context,
|
||||
int32_t seqnumber)
|
||||
@@ -425,7 +425,7 @@ krb5_auth_con_setlocalseqnumber (krb5_context context,
|
||||
return 0;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_FUNCTION
|
||||
krb5_auth_con_getremoteseqnumber(krb5_context context,
|
||||
krb5_auth_context auth_context,
|
||||
int32_t *seqnumber)
|
||||
@@ -434,7 +434,7 @@ krb5_auth_con_getremoteseqnumber(krb5_context context,
|
||||
return 0;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_auth_con_setremoteseqnumber (krb5_context context,
|
||||
krb5_auth_context auth_context,
|
||||
int32_t seqnumber)
|
||||
@@ -444,7 +444,7 @@ krb5_auth_con_setremoteseqnumber (krb5_context context,
|
||||
}
|
||||
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_auth_con_getauthenticator(krb5_context context,
|
||||
krb5_auth_context auth_context,
|
||||
krb5_authenticator *authenticator)
|
||||
@@ -461,7 +461,7 @@ krb5_auth_con_getauthenticator(krb5_context context,
|
||||
}
|
||||
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_free_authenticator(krb5_context context,
|
||||
krb5_authenticator *authenticator)
|
||||
{
|
||||
@@ -471,7 +471,7 @@ krb5_free_authenticator(krb5_context context,
|
||||
}
|
||||
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_auth_con_setuserkey(krb5_context context,
|
||||
krb5_auth_context auth_context,
|
||||
krb5_keyblock *keyblock)
|
||||
@@ -481,7 +481,7 @@ krb5_auth_con_setuserkey(krb5_context context,
|
||||
return krb5_copy_keyblock(context, keyblock, &auth_context->keyblock);
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_auth_con_getrcache(krb5_context context,
|
||||
krb5_auth_context auth_context,
|
||||
krb5_rcache *rcache)
|
||||
@@ -490,7 +490,7 @@ krb5_auth_con_getrcache(krb5_context context,
|
||||
return 0;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_auth_con_setrcache(krb5_context context,
|
||||
krb5_auth_context auth_context,
|
||||
krb5_rcache rcache)
|
||||
@@ -501,7 +501,7 @@ krb5_auth_con_setrcache(krb5_context context,
|
||||
|
||||
#if 0 /* not implemented */
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_auth_con_initivector(krb5_context context,
|
||||
krb5_auth_context auth_context)
|
||||
{
|
||||
@@ -509,7 +509,7 @@ krb5_auth_con_initivector(krb5_context context,
|
||||
}
|
||||
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_auth_con_setivector(krb5_context context,
|
||||
krb5_auth_context auth_context,
|
||||
krb5_pointer ivector)
|
||||
|
||||
@@ -31,9 +31,9 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <krb5_locl.h>
|
||||
#include "krb5_locl.h"
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_build_ap_req (krb5_context context,
|
||||
krb5_enctype enctype,
|
||||
krb5_creds *cred,
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <krb5_locl.h>
|
||||
#include "krb5_locl.h"
|
||||
|
||||
static krb5_error_code
|
||||
make_etypelist(krb5_context context,
|
||||
@@ -99,14 +99,14 @@ make_etypelist(krb5_context context,
|
||||
return 0;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
_krb5_build_authenticator(krb5_context context,
|
||||
krb5_auth_context auth_context,
|
||||
krb5_enctype enctype,
|
||||
krb5_creds *cred,
|
||||
Checksum *cksum,
|
||||
krb5_data *result,
|
||||
krb5_key_usage usage)
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
_krb5_build_authenticator (krb5_context context,
|
||||
krb5_auth_context auth_context,
|
||||
krb5_enctype enctype,
|
||||
krb5_creds *cred,
|
||||
Checksum *cksum,
|
||||
krb5_data *result,
|
||||
krb5_key_usage usage)
|
||||
{
|
||||
Authenticator auth;
|
||||
u_char *buf = NULL;
|
||||
|
||||
+92
-45
@@ -114,7 +114,7 @@ main (int argc, char **argv)
|
||||
* @ingroup krb5_ccache
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_cc_register(krb5_context context,
|
||||
const krb5_cc_ops *ops,
|
||||
krb5_boolean override)
|
||||
@@ -186,13 +186,34 @@ allocate_ccache (krb5_context context,
|
||||
krb5_ccache *id)
|
||||
{
|
||||
krb5_error_code ret;
|
||||
char * exp_residual = NULL;
|
||||
|
||||
ret = _krb5_cc_allocate(context, ops, id);
|
||||
#ifdef KRB5_USE_PATH_TOKENS
|
||||
ret = _krb5_expand_path_tokens(context, residual, &exp_residual);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
residual = exp_residual;
|
||||
#endif
|
||||
|
||||
ret = _krb5_cc_allocate(context, ops, id);
|
||||
if (ret) {
|
||||
#ifdef KRB5_USE_PATH_TOKENS
|
||||
if (exp_residual)
|
||||
free(exp_residual);
|
||||
#endif
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = (*id)->ops->resolve(context, id, residual);
|
||||
if(ret)
|
||||
free(*id);
|
||||
|
||||
#ifdef KRB5_USE_PATH_TOKENS
|
||||
if (exp_residual)
|
||||
free(exp_residual);
|
||||
#endif
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -211,7 +232,7 @@ allocate_ccache (krb5_context context,
|
||||
*/
|
||||
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_cc_resolve(krb5_context context,
|
||||
const char *name,
|
||||
krb5_ccache *id)
|
||||
@@ -251,7 +272,7 @@ krb5_cc_resolve(krb5_context context,
|
||||
* @ingroup krb5_ccache
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_cc_new_unique(krb5_context context, const char *type,
|
||||
const char *hint, krb5_ccache *id)
|
||||
{
|
||||
@@ -283,7 +304,7 @@ krb5_cc_new_unique(krb5_context context, const char *type,
|
||||
*/
|
||||
|
||||
|
||||
const char* KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION const char* KRB5_LIB_CALL
|
||||
krb5_cc_get_name(krb5_context context,
|
||||
krb5_ccache id)
|
||||
{
|
||||
@@ -297,7 +318,7 @@ krb5_cc_get_name(krb5_context context,
|
||||
*/
|
||||
|
||||
|
||||
const char* KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION const char* KRB5_LIB_CALL
|
||||
krb5_cc_get_type(krb5_context context,
|
||||
krb5_ccache id)
|
||||
{
|
||||
@@ -317,7 +338,7 @@ krb5_cc_get_type(krb5_context context,
|
||||
*/
|
||||
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_cc_get_full_name(krb5_context context,
|
||||
krb5_ccache id,
|
||||
char **str)
|
||||
@@ -368,6 +389,7 @@ krb5_cc_get_ops(krb5_context context, krb5_ccache id)
|
||||
krb5_error_code
|
||||
_krb5_expand_default_cc_name(krb5_context context, const char *str, char **res)
|
||||
{
|
||||
#ifndef KRB5_USE_PATH_TOKENS
|
||||
size_t tlen, len = 0;
|
||||
char *tmp, *tmp2, *append;
|
||||
|
||||
@@ -385,7 +407,8 @@ _krb5_expand_default_cc_name(krb5_context context, const char *str, char **res)
|
||||
} else if (tmp) {
|
||||
tmp2 = strchr(tmp, '}');
|
||||
if (tmp2 == NULL) {
|
||||
free(*res);
|
||||
if (*res)
|
||||
free(*res);
|
||||
*res = NULL;
|
||||
krb5_set_error_message(context, KRB5_CONFIG_BADFORMAT,
|
||||
"variable missing }");
|
||||
@@ -396,7 +419,8 @@ _krb5_expand_default_cc_name(krb5_context context, const char *str, char **res)
|
||||
else if (strncasecmp(tmp, "%{null}", 7) == 0)
|
||||
append = strdup("");
|
||||
else {
|
||||
free(*res);
|
||||
if (*res)
|
||||
free(*res);
|
||||
*res = NULL;
|
||||
krb5_set_error_message(context,
|
||||
KRB5_CONFIG_BADFORMAT,
|
||||
@@ -411,7 +435,8 @@ _krb5_expand_default_cc_name(krb5_context context, const char *str, char **res)
|
||||
str = NULL;
|
||||
}
|
||||
if (append == NULL) {
|
||||
free(*res);
|
||||
if (*res)
|
||||
free(*res);
|
||||
*res = NULL;
|
||||
krb5_set_error_message(context, ENOMEM,
|
||||
N_("malloc: out of memory", ""));
|
||||
@@ -422,7 +447,8 @@ _krb5_expand_default_cc_name(krb5_context context, const char *str, char **res)
|
||||
tmp = realloc(*res, len + tlen + 1);
|
||||
if (tmp == NULL) {
|
||||
free(append);
|
||||
free(*res);
|
||||
if (*res)
|
||||
free(*res);
|
||||
*res = NULL;
|
||||
krb5_set_error_message(context, ENOMEM,
|
||||
N_("malloc: out of memory", ""));
|
||||
@@ -434,6 +460,13 @@ _krb5_expand_default_cc_name(krb5_context context, const char *str, char **res)
|
||||
free(append);
|
||||
}
|
||||
return 0;
|
||||
#else /* _WIN32 */
|
||||
/* On Windows, we use the more generic _krb5_expand_path_tokens()
|
||||
function which also handles path tokens in addition to %{uid}
|
||||
and %{null} */
|
||||
|
||||
return _krb5_expand_path_tokens(context, str, res);
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -517,7 +550,7 @@ krb5_cc_support_switch(krb5_context context, const char *type)
|
||||
* @ingroup krb5_ccache
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_cc_set_default_name(krb5_context context, const char *name)
|
||||
{
|
||||
krb5_error_code ret = 0;
|
||||
@@ -573,6 +606,20 @@ krb5_cc_set_default_name(krb5_context context, const char *name)
|
||||
return ENOMEM;
|
||||
}
|
||||
|
||||
#ifdef KRB5_USE_PATH_TOKENS
|
||||
{
|
||||
char * exp_p = NULL;
|
||||
|
||||
if (_krb5_expand_path_tokens(context, p, &exp_p) == 0) {
|
||||
free (p);
|
||||
p = exp_p;
|
||||
} else {
|
||||
free (p);
|
||||
return EINVAL;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (context->default_cc_name)
|
||||
free(context->default_cc_name);
|
||||
|
||||
@@ -591,7 +638,7 @@ krb5_cc_set_default_name(krb5_context context, const char *name)
|
||||
*/
|
||||
|
||||
|
||||
const char* KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION const char* KRB5_LIB_CALL
|
||||
krb5_cc_default_name(krb5_context context)
|
||||
{
|
||||
if (context->default_cc_name == NULL || environment_changed(context))
|
||||
@@ -609,7 +656,7 @@ krb5_cc_default_name(krb5_context context)
|
||||
*/
|
||||
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_cc_default(krb5_context context,
|
||||
krb5_ccache *id)
|
||||
{
|
||||
@@ -631,7 +678,7 @@ krb5_cc_default(krb5_context context,
|
||||
*/
|
||||
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_cc_initialize(krb5_context context,
|
||||
krb5_ccache id,
|
||||
krb5_principal primary_principal)
|
||||
@@ -649,7 +696,7 @@ krb5_cc_initialize(krb5_context context,
|
||||
*/
|
||||
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_cc_destroy(krb5_context context,
|
||||
krb5_ccache id)
|
||||
{
|
||||
@@ -669,7 +716,7 @@ krb5_cc_destroy(krb5_context context,
|
||||
*/
|
||||
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_cc_close(krb5_context context,
|
||||
krb5_ccache id)
|
||||
{
|
||||
@@ -688,7 +735,7 @@ krb5_cc_close(krb5_context context,
|
||||
*/
|
||||
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_cc_store_cred(krb5_context context,
|
||||
krb5_ccache id,
|
||||
krb5_creds *creds)
|
||||
@@ -714,7 +761,7 @@ krb5_cc_store_cred(krb5_context context,
|
||||
*/
|
||||
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_cc_retrieve_cred(krb5_context context,
|
||||
krb5_ccache id,
|
||||
krb5_flags whichfields,
|
||||
@@ -752,7 +799,7 @@ krb5_cc_retrieve_cred(krb5_context context,
|
||||
*/
|
||||
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_cc_get_principal(krb5_context context,
|
||||
krb5_ccache id,
|
||||
krb5_principal *principal)
|
||||
@@ -770,7 +817,7 @@ krb5_cc_get_principal(krb5_context context,
|
||||
*/
|
||||
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_cc_start_seq_get (krb5_context context,
|
||||
const krb5_ccache id,
|
||||
krb5_cc_cursor *cursor)
|
||||
@@ -788,7 +835,7 @@ krb5_cc_start_seq_get (krb5_context context,
|
||||
*/
|
||||
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_cc_next_cred (krb5_context context,
|
||||
const krb5_ccache id,
|
||||
krb5_cc_cursor *cursor,
|
||||
@@ -804,7 +851,7 @@ krb5_cc_next_cred (krb5_context context,
|
||||
*/
|
||||
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_cc_end_seq_get (krb5_context context,
|
||||
const krb5_ccache id,
|
||||
krb5_cc_cursor *cursor)
|
||||
@@ -819,7 +866,7 @@ krb5_cc_end_seq_get (krb5_context context,
|
||||
*/
|
||||
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_cc_remove_cred(krb5_context context,
|
||||
krb5_ccache id,
|
||||
krb5_flags which,
|
||||
@@ -842,7 +889,7 @@ krb5_cc_remove_cred(krb5_context context,
|
||||
*/
|
||||
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_cc_set_flags(krb5_context context,
|
||||
krb5_ccache id,
|
||||
krb5_flags flags)
|
||||
@@ -856,7 +903,7 @@ krb5_cc_set_flags(krb5_context context,
|
||||
* @ingroup krb5_ccache
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_cc_get_flags(krb5_context context,
|
||||
krb5_ccache id,
|
||||
krb5_flags *flags)
|
||||
@@ -881,7 +928,7 @@ krb5_cc_get_flags(krb5_context context,
|
||||
* @ingroup krb5_ccache
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_cc_copy_match_f(krb5_context context,
|
||||
const krb5_ccache from,
|
||||
krb5_ccache to,
|
||||
@@ -934,7 +981,7 @@ krb5_cc_copy_match_f(krb5_context context,
|
||||
* @ingroup @krb5_ccache
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_cc_copy_cache(krb5_context context,
|
||||
const krb5_ccache from,
|
||||
krb5_ccache to)
|
||||
@@ -949,7 +996,7 @@ krb5_cc_copy_cache(krb5_context context,
|
||||
*/
|
||||
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_cc_get_version(krb5_context context,
|
||||
const krb5_ccache id)
|
||||
{
|
||||
@@ -966,7 +1013,7 @@ krb5_cc_get_version(krb5_context context,
|
||||
*/
|
||||
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_cc_clear_mcred(krb5_creds *mcred)
|
||||
{
|
||||
memset(mcred, 0, sizeof(*mcred));
|
||||
@@ -1034,7 +1081,7 @@ struct krb5_cc_cache_cursor_data {
|
||||
*/
|
||||
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_cc_cache_get_first (krb5_context context,
|
||||
const char *type,
|
||||
krb5_cc_cache_cursor *cursor)
|
||||
@@ -1092,7 +1139,7 @@ krb5_cc_cache_get_first (krb5_context context,
|
||||
*/
|
||||
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_cc_cache_next (krb5_context context,
|
||||
krb5_cc_cache_cursor cursor,
|
||||
krb5_ccache *id)
|
||||
@@ -1109,7 +1156,7 @@ krb5_cc_cache_next (krb5_context context,
|
||||
*/
|
||||
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_cc_cache_end_seq_get (krb5_context context,
|
||||
krb5_cc_cache_cursor cursor)
|
||||
{
|
||||
@@ -1135,7 +1182,7 @@ krb5_cc_cache_end_seq_get (krb5_context context,
|
||||
*/
|
||||
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_cc_cache_match (krb5_context context,
|
||||
krb5_principal client,
|
||||
krb5_ccache *id)
|
||||
@@ -1269,7 +1316,7 @@ build_conf_principals(krb5_context context, krb5_ccache id,
|
||||
* @ingroup krb5_ccache
|
||||
*/
|
||||
|
||||
krb5_boolean KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL
|
||||
krb5_is_config_principal(krb5_context context,
|
||||
krb5_const_principal principal)
|
||||
{
|
||||
@@ -1297,7 +1344,7 @@ krb5_is_config_principal(krb5_context context,
|
||||
* @ingroup krb5_ccache
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_cc_set_config(krb5_context context, krb5_ccache id,
|
||||
krb5_const_principal principal,
|
||||
const char *name, krb5_data *data)
|
||||
@@ -1345,7 +1392,7 @@ out:
|
||||
*/
|
||||
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_cc_get_config(krb5_context context, krb5_ccache id,
|
||||
krb5_const_principal principal,
|
||||
const char *name, krb5_data *data)
|
||||
@@ -1393,7 +1440,7 @@ struct krb5_cccol_cursor_data {
|
||||
* @ingroup krb5_ccache
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_cccol_cursor_new(krb5_context context, krb5_cccol_cursor *cursor)
|
||||
{
|
||||
*cursor = calloc(1, sizeof(**cursor));
|
||||
@@ -1425,7 +1472,7 @@ krb5_cccol_cursor_new(krb5_context context, krb5_cccol_cursor *cursor)
|
||||
*/
|
||||
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_cccol_cursor_next(krb5_context context, krb5_cccol_cursor cursor,
|
||||
krb5_ccache *cache)
|
||||
{
|
||||
@@ -1476,7 +1523,7 @@ krb5_cccol_cursor_next(krb5_context context, krb5_cccol_cursor cursor,
|
||||
* @ingroup krb5_ccache
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_cccol_cursor_free(krb5_context context, krb5_cccol_cursor *cursor)
|
||||
{
|
||||
krb5_cccol_cursor c = *cursor;
|
||||
@@ -1503,7 +1550,7 @@ krb5_cccol_cursor_free(krb5_context context, krb5_cccol_cursor *cursor)
|
||||
*/
|
||||
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_cc_last_change_time(krb5_context context,
|
||||
krb5_ccache id,
|
||||
krb5_timestamp *mtime)
|
||||
@@ -1526,7 +1573,7 @@ krb5_cc_last_change_time(krb5_context context,
|
||||
* @ingroup krb5_ccache
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_cccol_last_change_time(krb5_context context,
|
||||
const char *type,
|
||||
krb5_timestamp *mtime)
|
||||
@@ -1567,7 +1614,7 @@ krb5_cccol_last_change_time(krb5_context context,
|
||||
* @ingroup krb5_ccache
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_cc_get_friendly_name(krb5_context context,
|
||||
krb5_ccache id,
|
||||
char **name)
|
||||
@@ -1604,7 +1651,7 @@ krb5_cc_get_friendly_name(krb5_context context,
|
||||
* @ingroup krb5_ccache
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_cc_set_friendly_name(krb5_context context,
|
||||
krb5_ccache id,
|
||||
const char *name)
|
||||
@@ -1632,7 +1679,7 @@ krb5_cc_set_friendly_name(krb5_context context,
|
||||
* @ingroup krb5_ccache
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_cc_get_lifetime(krb5_context context, krb5_ccache id, time_t *t)
|
||||
{
|
||||
krb5_cc_cursor cursor;
|
||||
|
||||
+5
-5
@@ -33,7 +33,7 @@
|
||||
|
||||
#define KRB5_DEPRECATED
|
||||
|
||||
#include <krb5_locl.h>
|
||||
#include "krb5_locl.h"
|
||||
|
||||
#undef __attribute__
|
||||
#define __attribute__(X)
|
||||
@@ -684,7 +684,7 @@ find_chpw_proto(const char *name)
|
||||
* @ingroup @krb5_deprecated
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_change_password (krb5_context context,
|
||||
krb5_creds *creds,
|
||||
const char *newpw,
|
||||
@@ -726,7 +726,7 @@ krb5_change_password (krb5_context context,
|
||||
* @ingroup @krb5
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_set_password(krb5_context context,
|
||||
krb5_creds *creds,
|
||||
const char *newpw,
|
||||
@@ -769,7 +769,7 @@ krb5_set_password(krb5_context context,
|
||||
*
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_set_password_using_ccache(krb5_context context,
|
||||
krb5_ccache ccache,
|
||||
const char *newpw,
|
||||
@@ -834,7 +834,7 @@ krb5_set_password_using_ccache(krb5_context context,
|
||||
*
|
||||
*/
|
||||
|
||||
const char* KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION const char* KRB5_LIB_CALL
|
||||
krb5_passwd_result_to_string (krb5_context context,
|
||||
int result)
|
||||
{
|
||||
|
||||
+16
-16
@@ -37,7 +37,7 @@
|
||||
|
||||
#ifndef HEIMDAL_SMALLER
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_decode_EncTicketPart (krb5_context context,
|
||||
const void *data,
|
||||
size_t length,
|
||||
@@ -48,7 +48,7 @@ krb5_decode_EncTicketPart (krb5_context context,
|
||||
return decode_EncTicketPart(data, length, t, len);
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_encode_EncTicketPart (krb5_context context,
|
||||
void *data,
|
||||
size_t length,
|
||||
@@ -59,7 +59,7 @@ krb5_encode_EncTicketPart (krb5_context context,
|
||||
return encode_EncTicketPart(data, length, t, len);
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_decode_EncASRepPart (krb5_context context,
|
||||
const void *data,
|
||||
size_t length,
|
||||
@@ -70,7 +70,7 @@ krb5_decode_EncASRepPart (krb5_context context,
|
||||
return decode_EncASRepPart(data, length, t, len);
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_encode_EncASRepPart (krb5_context context,
|
||||
void *data,
|
||||
size_t length,
|
||||
@@ -81,7 +81,7 @@ krb5_encode_EncASRepPart (krb5_context context,
|
||||
return encode_EncASRepPart(data, length, t, len);
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_decode_EncTGSRepPart (krb5_context context,
|
||||
const void *data,
|
||||
size_t length,
|
||||
@@ -92,7 +92,7 @@ krb5_decode_EncTGSRepPart (krb5_context context,
|
||||
return decode_EncTGSRepPart(data, length, t, len);
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_encode_EncTGSRepPart (krb5_context context,
|
||||
void *data,
|
||||
size_t length,
|
||||
@@ -103,7 +103,7 @@ krb5_encode_EncTGSRepPart (krb5_context context,
|
||||
return encode_EncTGSRepPart(data, length, t, len);
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_decode_EncAPRepPart (krb5_context context,
|
||||
const void *data,
|
||||
size_t length,
|
||||
@@ -114,7 +114,7 @@ krb5_decode_EncAPRepPart (krb5_context context,
|
||||
return decode_EncAPRepPart(data, length, t, len);
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_encode_EncAPRepPart (krb5_context context,
|
||||
void *data,
|
||||
size_t length,
|
||||
@@ -125,7 +125,7 @@ krb5_encode_EncAPRepPart (krb5_context context,
|
||||
return encode_EncAPRepPart(data, length, t, len);
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_decode_Authenticator (krb5_context context,
|
||||
const void *data,
|
||||
size_t length,
|
||||
@@ -136,7 +136,7 @@ krb5_decode_Authenticator (krb5_context context,
|
||||
return decode_Authenticator(data, length, t, len);
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_encode_Authenticator (krb5_context context,
|
||||
void *data,
|
||||
size_t length,
|
||||
@@ -147,7 +147,7 @@ krb5_encode_Authenticator (krb5_context context,
|
||||
return encode_Authenticator(data, length, t, len);
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_decode_EncKrbCredPart (krb5_context context,
|
||||
const void *data,
|
||||
size_t length,
|
||||
@@ -158,7 +158,7 @@ krb5_decode_EncKrbCredPart (krb5_context context,
|
||||
return decode_EncKrbCredPart(data, length, t, len);
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_encode_EncKrbCredPart (krb5_context context,
|
||||
void *data,
|
||||
size_t length,
|
||||
@@ -169,7 +169,7 @@ krb5_encode_EncKrbCredPart (krb5_context context,
|
||||
return encode_EncKrbCredPart (data, length, t, len);
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_decode_ETYPE_INFO (krb5_context context,
|
||||
const void *data,
|
||||
size_t length,
|
||||
@@ -180,7 +180,7 @@ krb5_decode_ETYPE_INFO (krb5_context context,
|
||||
return decode_ETYPE_INFO(data, length, t, len);
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_encode_ETYPE_INFO (krb5_context context,
|
||||
void *data,
|
||||
size_t length,
|
||||
@@ -191,7 +191,7 @@ krb5_encode_ETYPE_INFO (krb5_context context,
|
||||
return encode_ETYPE_INFO (data, length, t, len);
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_decode_ETYPE_INFO2 (krb5_context context,
|
||||
const void *data,
|
||||
size_t length,
|
||||
@@ -202,7 +202,7 @@ krb5_decode_ETYPE_INFO2 (krb5_context context,
|
||||
return decode_ETYPE_INFO2(data, length, t, len);
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_encode_ETYPE_INFO2 (krb5_context context,
|
||||
void *data,
|
||||
size_t length,
|
||||
|
||||
+74
-31
@@ -403,7 +403,7 @@ is_plist_file(const char *fname)
|
||||
* @ingroup krb5_support
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_config_parse_file_multi (krb5_context context,
|
||||
const char *fname,
|
||||
krb5_config_section **res)
|
||||
@@ -413,6 +413,9 @@ krb5_config_parse_file_multi (krb5_context context,
|
||||
unsigned lineno = 0;
|
||||
krb5_error_code ret;
|
||||
struct fileptr f;
|
||||
#ifdef KRB5_USE_PATH_TOKENS
|
||||
char * exp_fname = NULL;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* If the fname starts with "~/" parse configuration file in the
|
||||
@@ -483,13 +486,52 @@ krb5_config_parse_file_multi (krb5_context context,
|
||||
free(newfname);
|
||||
return ret;
|
||||
}
|
||||
=======
|
||||
#ifdef KRB5_USE_PATH_TOKENS
|
||||
ret = _krb5_expand_path_tokens(context, fname, &exp_fname);
|
||||
if (ret)
|
||||
return ret;
|
||||
fname = exp_fname;
|
||||
#endif
|
||||
|
||||
f.f = fopen(fname, "r");
|
||||
f.s = NULL;
|
||||
if(f.f == NULL) {
|
||||
ret = errno;
|
||||
krb5_set_error_message (context, ret, "open %s: %s",
|
||||
fname, strerror(ret));
|
||||
if (newfname)
|
||||
free(newfname);
|
||||
#ifdef KRB5_USE_PATH_TOKENS
|
||||
if (exp_fname)
|
||||
free (exp_fname);
|
||||
#endif
|
||||
return ret;
|
||||
}
|
||||
|
||||
ret = krb5_config_parse_debug (&f, res, &lineno, &str);
|
||||
fclose(f.f);
|
||||
if (ret) {
|
||||
krb5_set_error_message (context, ret, "%s:%u: %s", fname, lineno, str);
|
||||
if (newfname)
|
||||
free(newfname);
|
||||
#ifdef KRB5_USE_PATH_TOKENS
|
||||
if (exp_fname)
|
||||
free (exp_fname);
|
||||
#endif
|
||||
return ret;
|
||||
>>>>>>> Initial Windows port
|
||||
}
|
||||
if (newfname)
|
||||
free(newfname);
|
||||
#ifdef KRB5_USE_PATH_TOKENS
|
||||
if (exp_fname)
|
||||
free (exp_fname);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_config_parse_file (krb5_context context,
|
||||
const char *fname,
|
||||
krb5_config_section **res)
|
||||
@@ -531,7 +573,7 @@ free_binding (krb5_context context, krb5_config_binding *b)
|
||||
* @ingroup krb5_support
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_config_file_free (krb5_context context, krb5_config_section *s)
|
||||
{
|
||||
free_binding (context, s);
|
||||
@@ -540,7 +582,7 @@ krb5_config_file_free (krb5_context context, krb5_config_section *s)
|
||||
|
||||
#ifndef HEIMDAL_SMALLER
|
||||
|
||||
krb5_error_code
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
_krb5_config_copy(krb5_context context,
|
||||
krb5_config_section *c,
|
||||
krb5_config_section **head)
|
||||
@@ -576,7 +618,7 @@ _krb5_config_copy(krb5_context context,
|
||||
|
||||
#endif /* HEIMDAL_SMALLER */
|
||||
|
||||
const void *
|
||||
KRB5_LIB_FUNCTION const void * KRB5_LIB_CALL
|
||||
_krb5_config_get_next (krb5_context context,
|
||||
const krb5_config_section *c,
|
||||
const krb5_config_binding **pointer,
|
||||
@@ -615,7 +657,7 @@ vget_next(krb5_context context,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
const void *
|
||||
KRB5_LIB_FUNCTION const void * KRB5_LIB_CALL
|
||||
_krb5_config_vget_next (krb5_context context,
|
||||
const krb5_config_section *c,
|
||||
const krb5_config_binding **pointer,
|
||||
@@ -651,7 +693,7 @@ _krb5_config_vget_next (krb5_context context,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
const void *
|
||||
KRB5_LIB_FUNCTION const void * KRB5_LIB_CALL
|
||||
_krb5_config_get (krb5_context context,
|
||||
const krb5_config_section *c,
|
||||
int type,
|
||||
@@ -666,6 +708,7 @@ _krb5_config_get (krb5_context context,
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
const void *
|
||||
_krb5_config_vget (krb5_context context,
|
||||
const krb5_config_section *c,
|
||||
@@ -689,7 +732,7 @@ _krb5_config_vget (krb5_context context,
|
||||
* @ingroup krb5_support
|
||||
*/
|
||||
|
||||
const krb5_config_binding *
|
||||
KRB5_LIB_FUNCTION const krb5_config_binding * KRB5_LIB_CALL
|
||||
krb5_config_get_list (krb5_context context,
|
||||
const krb5_config_section *c,
|
||||
...)
|
||||
@@ -715,7 +758,7 @@ krb5_config_get_list (krb5_context context,
|
||||
* @ingroup krb5_support
|
||||
*/
|
||||
|
||||
const krb5_config_binding *
|
||||
KRB5_LIB_FUNCTION const krb5_config_binding * KRB5_LIB_CALL
|
||||
krb5_config_vget_list (krb5_context context,
|
||||
const krb5_config_section *c,
|
||||
va_list args)
|
||||
@@ -738,7 +781,7 @@ krb5_config_vget_list (krb5_context context,
|
||||
* @ingroup krb5_support
|
||||
*/
|
||||
|
||||
const char* KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION const char* KRB5_LIB_CALL
|
||||
krb5_config_get_string (krb5_context context,
|
||||
const krb5_config_section *c,
|
||||
...)
|
||||
@@ -764,7 +807,7 @@ krb5_config_get_string (krb5_context context,
|
||||
* @ingroup krb5_support
|
||||
*/
|
||||
|
||||
const char* KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION const char* KRB5_LIB_CALL
|
||||
krb5_config_vget_string (krb5_context context,
|
||||
const krb5_config_section *c,
|
||||
va_list args)
|
||||
@@ -787,7 +830,7 @@ krb5_config_vget_string (krb5_context context,
|
||||
* @ingroup krb5_support
|
||||
*/
|
||||
|
||||
const char* KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION const char* KRB5_LIB_CALL
|
||||
krb5_config_vget_string_default (krb5_context context,
|
||||
const krb5_config_section *c,
|
||||
const char *def_value,
|
||||
@@ -816,7 +859,7 @@ krb5_config_vget_string_default (krb5_context context,
|
||||
* @ingroup krb5_support
|
||||
*/
|
||||
|
||||
const char* KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION const char* KRB5_LIB_CALL
|
||||
krb5_config_get_string_default (krb5_context context,
|
||||
const krb5_config_section *c,
|
||||
const char *def_value,
|
||||
@@ -844,7 +887,7 @@ krb5_config_get_string_default (krb5_context context,
|
||||
* @ingroup krb5_support
|
||||
*/
|
||||
|
||||
char ** KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION char ** KRB5_LIB_CALL
|
||||
krb5_config_vget_strings(krb5_context context,
|
||||
const krb5_config_section *c,
|
||||
va_list args)
|
||||
@@ -904,7 +947,7 @@ cleanup:
|
||||
* @ingroup krb5_support
|
||||
*/
|
||||
|
||||
char**
|
||||
KRB5_LIB_FUNCTION char** KRB5_LIB_CALL
|
||||
krb5_config_get_strings(krb5_context context,
|
||||
const krb5_config_section *c,
|
||||
...)
|
||||
@@ -926,7 +969,7 @@ krb5_config_get_strings(krb5_context context,
|
||||
* @ingroup krb5_support
|
||||
*/
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_config_free_strings(char **strings)
|
||||
{
|
||||
char **s = strings;
|
||||
@@ -955,7 +998,7 @@ krb5_config_free_strings(char **strings)
|
||||
* @ingroup krb5_support
|
||||
*/
|
||||
|
||||
krb5_boolean KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL
|
||||
krb5_config_vget_bool_default (krb5_context context,
|
||||
const krb5_config_section *c,
|
||||
krb5_boolean def_value,
|
||||
@@ -985,7 +1028,7 @@ krb5_config_vget_bool_default (krb5_context context,
|
||||
* @ingroup krb5_support
|
||||
*/
|
||||
|
||||
krb5_boolean KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL
|
||||
krb5_config_vget_bool (krb5_context context,
|
||||
const krb5_config_section *c,
|
||||
va_list args)
|
||||
@@ -1009,7 +1052,7 @@ krb5_config_vget_bool (krb5_context context,
|
||||
* @ingroup krb5_support
|
||||
*/
|
||||
|
||||
krb5_boolean KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL
|
||||
krb5_config_get_bool_default (krb5_context context,
|
||||
const krb5_config_section *c,
|
||||
krb5_boolean def_value,
|
||||
@@ -1039,7 +1082,7 @@ krb5_config_get_bool_default (krb5_context context,
|
||||
* @ingroup krb5_support
|
||||
*/
|
||||
|
||||
krb5_boolean KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL
|
||||
krb5_config_get_bool (krb5_context context,
|
||||
const krb5_config_section *c,
|
||||
...)
|
||||
@@ -1069,7 +1112,7 @@ krb5_config_get_bool (krb5_context context,
|
||||
* @ingroup krb5_support
|
||||
*/
|
||||
|
||||
int KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION int KRB5_LIB_CALL
|
||||
krb5_config_vget_time_default (krb5_context context,
|
||||
const krb5_config_section *c,
|
||||
int def_value,
|
||||
@@ -1098,10 +1141,10 @@ krb5_config_vget_time_default (krb5_context context,
|
||||
* @ingroup krb5_support
|
||||
*/
|
||||
|
||||
int KRB5_LIB_FUNCTION
|
||||
krb5_config_vget_time(krb5_context context,
|
||||
const krb5_config_section *c,
|
||||
va_list args)
|
||||
KRB5_LIB_FUNCTION int KRB5_LIB_CALL
|
||||
krb5_config_vget_time (krb5_context context,
|
||||
const krb5_config_section *c,
|
||||
va_list args)
|
||||
{
|
||||
return krb5_config_vget_time_default (context, c, -1, args);
|
||||
}
|
||||
@@ -1120,7 +1163,7 @@ krb5_config_vget_time(krb5_context context,
|
||||
* @ingroup krb5_support
|
||||
*/
|
||||
|
||||
int KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION int KRB5_LIB_CALL
|
||||
krb5_config_get_time_default (krb5_context context,
|
||||
const krb5_config_section *c,
|
||||
int def_value,
|
||||
@@ -1146,7 +1189,7 @@ krb5_config_get_time_default (krb5_context context,
|
||||
* @ingroup krb5_support
|
||||
*/
|
||||
|
||||
int KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION int KRB5_LIB_CALL
|
||||
krb5_config_get_time (krb5_context context,
|
||||
const krb5_config_section *c,
|
||||
...)
|
||||
@@ -1160,7 +1203,7 @@ krb5_config_get_time (krb5_context context,
|
||||
}
|
||||
|
||||
|
||||
int KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION int KRB5_LIB_CALL
|
||||
krb5_config_vget_int_default (krb5_context context,
|
||||
const krb5_config_section *c,
|
||||
int def_value,
|
||||
@@ -1181,7 +1224,7 @@ krb5_config_vget_int_default (krb5_context context,
|
||||
}
|
||||
}
|
||||
|
||||
int KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION int KRB5_LIB_CALL
|
||||
krb5_config_vget_int (krb5_context context,
|
||||
const krb5_config_section *c,
|
||||
va_list args)
|
||||
@@ -1189,7 +1232,7 @@ krb5_config_vget_int (krb5_context context,
|
||||
return krb5_config_vget_int_default (context, c, -1, args);
|
||||
}
|
||||
|
||||
int KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION int KRB5_LIB_CALL
|
||||
krb5_config_get_int_default (krb5_context context,
|
||||
const krb5_config_section *c,
|
||||
int def_value,
|
||||
@@ -1203,7 +1246,7 @@ krb5_config_get_int_default (krb5_context context,
|
||||
return ret;
|
||||
}
|
||||
|
||||
int KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION int KRB5_LIB_CALL
|
||||
krb5_config_get_int (krb5_context context,
|
||||
const krb5_config_section *c,
|
||||
...)
|
||||
|
||||
@@ -41,8 +41,13 @@ KRB5_LIB_VARIABLE const char *krb5_config_file =
|
||||
"/Library/Preferences/com.apple.Kerberos.plist:"
|
||||
"~/Library/Preferences/edu.mit.Kerberos:"
|
||||
"/Library/Preferences/edu.mit.Kerberos:"
|
||||
#endif /* __APPLE__ */
|
||||
SYSCONFDIR "/krb5.conf"
|
||||
#ifndef _WIN32
|
||||
":/etc/krb5.conf"
|
||||
#endif
|
||||
SYSCONFDIR "/krb5.conf:/etc/krb5.conf";
|
||||
;
|
||||
|
||||
KRB5_LIB_VARIABLE const char *krb5_defkeyname = KEYTAB_DEFAULT;
|
||||
|
||||
KRB5_LIB_VARIABLE const char *krb5_cc_type_api = "API";
|
||||
|
||||
+38
-28
@@ -275,7 +275,7 @@ kt_ops_register(krb5_context context)
|
||||
* @ingroup krb5
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_init_context(krb5_context *context)
|
||||
{
|
||||
krb5_context p;
|
||||
@@ -318,6 +318,11 @@ krb5_init_context(krb5_context *context)
|
||||
if (ret)
|
||||
goto out;
|
||||
#endif
|
||||
#ifdef NEED_SOCK_INIT
|
||||
if (SOCK_INIT) {
|
||||
p->flags |= KRB5_CTX_F_SOCKETS_INITIALIZED;
|
||||
}
|
||||
#endif
|
||||
|
||||
out:
|
||||
if(ret) {
|
||||
@@ -460,7 +465,7 @@ krb5_copy_context(krb5_context context, krb5_context *out)
|
||||
* @ingroup krb5
|
||||
*/
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_free_context(krb5_context context)
|
||||
{
|
||||
if (context->default_cc_name)
|
||||
@@ -485,6 +490,11 @@ krb5_free_context(krb5_context context)
|
||||
|
||||
HEIMDAL_MUTEX_destroy(context->mutex);
|
||||
free(context->mutex);
|
||||
#ifdef NEED_SOCK_INIT
|
||||
if (context->flags & KRB5_CTX_F_SOCKETS_INITIALIZED) {
|
||||
SOCK_EXIT;
|
||||
}
|
||||
#endif
|
||||
|
||||
memset(context, 0, sizeof(*context));
|
||||
free(context);
|
||||
@@ -502,7 +512,7 @@ krb5_free_context(krb5_context context)
|
||||
* @ingroup krb5
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_set_config_files(krb5_context context, char **filenames)
|
||||
{
|
||||
krb5_error_code ret;
|
||||
@@ -557,7 +567,7 @@ add_file(char ***pfilenames, int *len, char *file)
|
||||
* `pq' isn't free, it's up the the caller
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_prepend_config_files(const char *filelist, char **pq, char ***ret_pp)
|
||||
{
|
||||
krb5_error_code ret;
|
||||
@@ -622,7 +632,7 @@ krb5_prepend_config_files(const char *filelist, char **pq, char ***ret_pp)
|
||||
* @ingroup krb5
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_prepend_config_files_default(const char *filelist, char ***pfilenames)
|
||||
{
|
||||
krb5_error_code ret;
|
||||
@@ -652,7 +662,7 @@ krb5_prepend_config_files_default(const char *filelist, char ***pfilenames)
|
||||
* @ingroup krb5
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_get_default_config_files(char ***pfilenames)
|
||||
{
|
||||
const char *files = NULL;
|
||||
@@ -679,7 +689,7 @@ krb5_get_default_config_files(char ***pfilenames)
|
||||
* @ingroup krb5
|
||||
*/
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_free_config_files(char **filenames)
|
||||
{
|
||||
char **p;
|
||||
@@ -701,7 +711,7 @@ krb5_free_config_files(char **filenames)
|
||||
* @ingroup krb5
|
||||
*/
|
||||
|
||||
const krb5_enctype * KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION const krb5_enctype * KRB5_LIB_CALL
|
||||
krb5_kerberos_enctypes(krb5_context context)
|
||||
{
|
||||
static const krb5_enctype p[] = {
|
||||
@@ -762,7 +772,7 @@ default_etypes(krb5_context context, krb5_enctype **etype)
|
||||
* @ingroup krb5
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_set_default_in_tkt_etypes(krb5_context context,
|
||||
const krb5_enctype *etypes)
|
||||
{
|
||||
@@ -804,7 +814,7 @@ krb5_set_default_in_tkt_etypes(krb5_context context,
|
||||
* @ingroup krb5
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_get_default_in_tkt_etypes(krb5_context context,
|
||||
krb5_enctype **etypes)
|
||||
{
|
||||
@@ -838,7 +848,7 @@ krb5_get_default_in_tkt_etypes(krb5_context context,
|
||||
* @ingroup krb5
|
||||
*/
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_init_ets(krb5_context context)
|
||||
{
|
||||
if(context->et_list == NULL){
|
||||
@@ -873,7 +883,7 @@ krb5_init_ets(krb5_context context)
|
||||
* @ingroup krb5
|
||||
*/
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_set_use_admin_kdc (krb5_context context, krb5_boolean flag)
|
||||
{
|
||||
context->use_admin_kdc = flag;
|
||||
@@ -889,7 +899,7 @@ krb5_set_use_admin_kdc (krb5_context context, krb5_boolean flag)
|
||||
* @ingroup krb5
|
||||
*/
|
||||
|
||||
krb5_boolean KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL
|
||||
krb5_get_use_admin_kdc (krb5_context context)
|
||||
{
|
||||
return context->use_admin_kdc;
|
||||
@@ -908,7 +918,7 @@ krb5_get_use_admin_kdc (krb5_context context)
|
||||
* @ingroup krb5
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_add_extra_addresses(krb5_context context, krb5_addresses *addresses)
|
||||
{
|
||||
|
||||
@@ -932,7 +942,7 @@ krb5_add_extra_addresses(krb5_context context, krb5_addresses *addresses)
|
||||
* @ingroup krb5
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_set_extra_addresses(krb5_context context, const krb5_addresses *addresses)
|
||||
{
|
||||
if(context->extra_addresses)
|
||||
@@ -968,7 +978,7 @@ krb5_set_extra_addresses(krb5_context context, const krb5_addresses *addresses)
|
||||
* @ingroup krb5
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_get_extra_addresses(krb5_context context, krb5_addresses *addresses)
|
||||
{
|
||||
if(context->extra_addresses == NULL) {
|
||||
@@ -991,7 +1001,7 @@ krb5_get_extra_addresses(krb5_context context, krb5_addresses *addresses)
|
||||
* @ingroup krb5
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_add_ignore_addresses(krb5_context context, krb5_addresses *addresses)
|
||||
{
|
||||
|
||||
@@ -1015,7 +1025,7 @@ krb5_add_ignore_addresses(krb5_context context, krb5_addresses *addresses)
|
||||
* @ingroup krb5
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_set_ignore_addresses(krb5_context context, const krb5_addresses *addresses)
|
||||
{
|
||||
if(context->ignore_addresses)
|
||||
@@ -1050,7 +1060,7 @@ krb5_set_ignore_addresses(krb5_context context, const krb5_addresses *addresses)
|
||||
* @ingroup krb5
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_get_ignore_addresses(krb5_context context, krb5_addresses *addresses)
|
||||
{
|
||||
if(context->ignore_addresses == NULL) {
|
||||
@@ -1072,7 +1082,7 @@ krb5_get_ignore_addresses(krb5_context context, krb5_addresses *addresses)
|
||||
* @ingroup krb5
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_set_fcache_version(krb5_context context, int version)
|
||||
{
|
||||
context->fcache_vno = version;
|
||||
@@ -1091,7 +1101,7 @@ krb5_set_fcache_version(krb5_context context, int version)
|
||||
* @ingroup krb5
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_get_fcache_version(krb5_context context, int *version)
|
||||
{
|
||||
*version = context->fcache_vno;
|
||||
@@ -1107,7 +1117,7 @@ krb5_get_fcache_version(krb5_context context, int *version)
|
||||
*/
|
||||
|
||||
|
||||
krb5_boolean KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL
|
||||
krb5_is_thread_safe(void)
|
||||
{
|
||||
#ifdef ENABLE_PTHREAD_SUPPORT
|
||||
@@ -1126,7 +1136,7 @@ krb5_is_thread_safe(void)
|
||||
* @ingroup krb5
|
||||
*/
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_set_dns_canonicalize_hostname (krb5_context context, krb5_boolean flag)
|
||||
{
|
||||
if (flag)
|
||||
@@ -1145,7 +1155,7 @@ krb5_set_dns_canonicalize_hostname (krb5_context context, krb5_boolean flag)
|
||||
* @ingroup krb5
|
||||
*/
|
||||
|
||||
krb5_boolean KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL
|
||||
krb5_get_dns_canonicalize_hostname (krb5_context context)
|
||||
{
|
||||
return (context->flags & KRB5_CTX_F_DNS_CANONICALIZE_HOSTNAME) ? 1 : 0;
|
||||
@@ -1163,7 +1173,7 @@ krb5_get_dns_canonicalize_hostname (krb5_context context)
|
||||
* @ingroup krb5
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_get_kdc_sec_offset (krb5_context context, int32_t *sec, int32_t *usec)
|
||||
{
|
||||
if (sec)
|
||||
@@ -1204,7 +1214,7 @@ krb5_set_kdc_sec_offset (krb5_context context, int32_t sec, int32_t usec)
|
||||
* @ingroup krb5
|
||||
*/
|
||||
|
||||
time_t KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION time_t KRB5_LIB_CALL
|
||||
krb5_get_max_time_skew (krb5_context context)
|
||||
{
|
||||
return context->max_skew;
|
||||
@@ -1219,7 +1229,7 @@ krb5_get_max_time_skew (krb5_context context)
|
||||
* @ingroup krb5
|
||||
*/
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_set_max_time_skew (krb5_context context, time_t t)
|
||||
{
|
||||
context->max_skew = t;
|
||||
@@ -1239,7 +1249,7 @@ krb5_set_max_time_skew (krb5_context context, time_t t)
|
||||
* @ingroup krb5
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_init_etype (krb5_context context,
|
||||
unsigned *len,
|
||||
krb5_enctype **val,
|
||||
|
||||
@@ -58,7 +58,7 @@ check_ticket_flags(TicketFlags f)
|
||||
* @ingroup krb5_v4compat
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb524_convert_creds_kdc(krb5_context context,
|
||||
krb5_creds *in_cred,
|
||||
struct credentials *v4creds)
|
||||
@@ -160,7 +160,7 @@ out2:
|
||||
* @ingroup krb5_v4compat
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb524_convert_creds_kdc_ccache(krb5_context context,
|
||||
krb5_ccache ccache,
|
||||
krb5_creds *in_cred,
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
* @ingroup krb5
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_copy_host_realm(krb5_context context,
|
||||
const krb5_realm *from,
|
||||
krb5_realm **to)
|
||||
|
||||
+5
-5
@@ -45,7 +45,7 @@
|
||||
* @ingroup krb5
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_free_cred_contents (krb5_context context, krb5_creds *c)
|
||||
{
|
||||
krb5_free_principal (context, c->client);
|
||||
@@ -74,7 +74,7 @@ krb5_free_cred_contents (krb5_context context, krb5_creds *c)
|
||||
* @ingroup krb5
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_copy_creds_contents (krb5_context context,
|
||||
const krb5_creds *incred,
|
||||
krb5_creds *c)
|
||||
@@ -131,7 +131,7 @@ fail:
|
||||
* @ingroup krb5
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_copy_creds (krb5_context context,
|
||||
const krb5_creds *incred,
|
||||
krb5_creds **outcred)
|
||||
@@ -161,7 +161,7 @@ krb5_copy_creds (krb5_context context,
|
||||
* @ingroup krb5
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_free_creds (krb5_context context, krb5_creds *c)
|
||||
{
|
||||
krb5_free_cred_contents (context, c);
|
||||
@@ -205,7 +205,7 @@ krb5_times_equal(const krb5_times *a, const krb5_times *b)
|
||||
* @ingroup krb5
|
||||
*/
|
||||
|
||||
krb5_boolean KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL
|
||||
krb5_compare_creds(krb5_context context, krb5_flags whichfields,
|
||||
const krb5_creds * mcreds, const krb5_creds * creds)
|
||||
{
|
||||
|
||||
+61
-56
@@ -874,7 +874,7 @@ static struct key_type keytype_arcfour = {
|
||||
EVP_rc4
|
||||
};
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_salttype_to_string (krb5_context context,
|
||||
krb5_enctype etype,
|
||||
krb5_salttype stype,
|
||||
@@ -906,7 +906,7 @@ krb5_salttype_to_string (krb5_context context,
|
||||
return HEIM_ERR_SALTTYPE_NOSUPP;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_string_to_salttype (krb5_context context,
|
||||
krb5_enctype etype,
|
||||
const char *string,
|
||||
@@ -933,7 +933,7 @@ krb5_string_to_salttype (krb5_context context,
|
||||
return HEIM_ERR_SALTTYPE_NOSUPP;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_get_pw_salt(krb5_context context,
|
||||
krb5_const_principal principal,
|
||||
krb5_salt *salt)
|
||||
@@ -962,7 +962,7 @@ krb5_get_pw_salt(krb5_context context,
|
||||
return 0;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_free_salt(krb5_context context,
|
||||
krb5_salt salt)
|
||||
{
|
||||
@@ -970,7 +970,7 @@ krb5_free_salt(krb5_context context,
|
||||
return 0;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_string_to_key_data (krb5_context context,
|
||||
krb5_enctype enctype,
|
||||
krb5_data password,
|
||||
@@ -988,7 +988,7 @@ krb5_string_to_key_data (krb5_context context,
|
||||
return ret;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_string_to_key (krb5_context context,
|
||||
krb5_enctype enctype,
|
||||
const char *password,
|
||||
@@ -1001,7 +1001,7 @@ krb5_string_to_key (krb5_context context,
|
||||
return krb5_string_to_key_data(context, enctype, pw, principal, key);
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_string_to_key_data_salt (krb5_context context,
|
||||
krb5_enctype enctype,
|
||||
krb5_data password,
|
||||
@@ -1020,7 +1020,7 @@ krb5_string_to_key_data_salt (krb5_context context,
|
||||
* `opaque'), returning the resulting key in `key'
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_string_to_key_data_salt_opaque (krb5_context context,
|
||||
krb5_enctype enctype,
|
||||
krb5_data password,
|
||||
@@ -1052,7 +1052,7 @@ krb5_string_to_key_data_salt_opaque (krb5_context context,
|
||||
* in `key'
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_string_to_key_salt (krb5_context context,
|
||||
krb5_enctype enctype,
|
||||
const char *password,
|
||||
@@ -1065,7 +1065,7 @@ krb5_string_to_key_salt (krb5_context context,
|
||||
return krb5_string_to_key_data_salt(context, enctype, pw, salt, key);
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_string_to_key_salt_opaque (krb5_context context,
|
||||
krb5_enctype enctype,
|
||||
const char *password,
|
||||
@@ -1080,7 +1080,7 @@ krb5_string_to_key_salt_opaque (krb5_context context,
|
||||
pw, salt, opaque, key);
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_enctype_keysize(krb5_context context,
|
||||
krb5_enctype type,
|
||||
size_t *keysize)
|
||||
@@ -1096,7 +1096,7 @@ krb5_enctype_keysize(krb5_context context,
|
||||
return 0;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_enctype_keybits(krb5_context context,
|
||||
krb5_enctype type,
|
||||
size_t *keybits)
|
||||
@@ -1112,7 +1112,7 @@ krb5_enctype_keybits(krb5_context context,
|
||||
return 0;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_generate_random_keyblock(krb5_context context,
|
||||
krb5_enctype type,
|
||||
krb5_keyblock *key)
|
||||
@@ -1439,7 +1439,7 @@ hmac(krb5_context context,
|
||||
return 0;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_hmac(krb5_context context,
|
||||
krb5_cksumtype cktype,
|
||||
const void *data,
|
||||
@@ -1785,7 +1785,7 @@ arcfour_checksum_p(struct checksum_type *ct, krb5_crypto crypto)
|
||||
(crypto->key.key->keytype == KEYTYPE_ARCFOUR);
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_create_checksum(krb5_context context,
|
||||
krb5_crypto crypto,
|
||||
krb5_key_usage usage,
|
||||
@@ -1897,7 +1897,7 @@ verify_checksum(krb5_context context,
|
||||
return ret;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_verify_checksum(krb5_context context,
|
||||
krb5_crypto crypto,
|
||||
krb5_key_usage usage,
|
||||
@@ -1926,7 +1926,7 @@ krb5_verify_checksum(krb5_context context,
|
||||
data, len, cksum);
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_crypto_get_checksum_type(krb5_context context,
|
||||
krb5_crypto crypto,
|
||||
krb5_cksumtype *type)
|
||||
@@ -1951,7 +1951,7 @@ krb5_crypto_get_checksum_type(krb5_context context,
|
||||
}
|
||||
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_checksumsize(krb5_context context,
|
||||
krb5_cksumtype type,
|
||||
size_t *size)
|
||||
@@ -1967,7 +1967,7 @@ krb5_checksumsize(krb5_context context,
|
||||
return 0;
|
||||
}
|
||||
|
||||
krb5_boolean KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL
|
||||
krb5_checksum_is_keyed(krb5_context context,
|
||||
krb5_cksumtype type)
|
||||
{
|
||||
@@ -1982,7 +1982,7 @@ krb5_checksum_is_keyed(krb5_context context,
|
||||
return ct->flags & F_KEYED;
|
||||
}
|
||||
|
||||
krb5_boolean KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL
|
||||
krb5_checksum_is_collision_proof(krb5_context context,
|
||||
krb5_cksumtype type)
|
||||
{
|
||||
@@ -1997,7 +1997,7 @@ krb5_checksum_is_collision_proof(krb5_context context,
|
||||
return ct->flags & F_CPROOF;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_checksum_disable(krb5_context context,
|
||||
krb5_cksumtype type)
|
||||
{
|
||||
@@ -2724,7 +2724,7 @@ _find_enctype(krb5_enctype type)
|
||||
}
|
||||
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_enctype_to_string(krb5_context context,
|
||||
krb5_enctype etype,
|
||||
char **string)
|
||||
@@ -2746,7 +2746,7 @@ krb5_enctype_to_string(krb5_context context,
|
||||
return 0;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_string_to_enctype(krb5_context context,
|
||||
const char *string,
|
||||
krb5_enctype *etype)
|
||||
@@ -2763,7 +2763,7 @@ krb5_string_to_enctype(krb5_context context,
|
||||
return KRB5_PROG_ETYPE_NOSUPP;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_enctype_to_keytype(krb5_context context,
|
||||
krb5_enctype etype,
|
||||
krb5_keytype *keytype)
|
||||
@@ -2779,7 +2779,7 @@ krb5_enctype_to_keytype(krb5_context context,
|
||||
return 0;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_enctype_valid(krb5_context context,
|
||||
krb5_enctype etype)
|
||||
{
|
||||
@@ -2812,7 +2812,7 @@ krb5_enctype_valid(krb5_context context,
|
||||
*/
|
||||
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_cksumtype_to_enctype(krb5_context context,
|
||||
krb5_cksumtype ctype,
|
||||
krb5_enctype *etype)
|
||||
@@ -2837,7 +2837,7 @@ krb5_cksumtype_to_enctype(krb5_context context,
|
||||
}
|
||||
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_cksumtype_valid(krb5_context context,
|
||||
krb5_cksumtype ctype)
|
||||
{
|
||||
@@ -3265,7 +3265,7 @@ find_iv(krb5_crypto_iov *data, int num_data, int type)
|
||||
* 4. KRB5_CRYPTO_TYPE_TRAILER
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_encrypt_iov_ivec(krb5_context context,
|
||||
krb5_crypto crypto,
|
||||
unsigned usage,
|
||||
@@ -3458,7 +3458,7 @@ krb5_encrypt_iov_ivec(krb5_context context,
|
||||
* size as the input data or shorter.
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_decrypt_iov_ivec(krb5_context context,
|
||||
krb5_crypto crypto,
|
||||
unsigned usage,
|
||||
@@ -3606,7 +3606,7 @@ krb5_decrypt_iov_ivec(krb5_context context,
|
||||
* @ingroup krb5_crypto
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_create_checksum_iov(krb5_context context,
|
||||
krb5_crypto crypto,
|
||||
unsigned usage,
|
||||
@@ -3689,7 +3689,7 @@ krb5_create_checksum_iov(krb5_context context,
|
||||
* @ingroup krb5_crypto
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_verify_checksum_iov(krb5_context context,
|
||||
krb5_crypto crypto,
|
||||
unsigned usage,
|
||||
@@ -3751,7 +3751,7 @@ krb5_verify_checksum_iov(krb5_context context,
|
||||
}
|
||||
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_crypto_length(krb5_context context,
|
||||
krb5_crypto crypto,
|
||||
int type,
|
||||
@@ -3795,7 +3795,7 @@ krb5_crypto_length(krb5_context context,
|
||||
}
|
||||
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_crypto_length_iov(krb5_context context,
|
||||
krb5_crypto crypto,
|
||||
krb5_crypto_iov *data,
|
||||
@@ -3815,7 +3815,7 @@ krb5_crypto_length_iov(krb5_context context,
|
||||
}
|
||||
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_encrypt_ivec(krb5_context context,
|
||||
krb5_crypto crypto,
|
||||
unsigned usage,
|
||||
@@ -3834,7 +3834,7 @@ krb5_encrypt_ivec(krb5_context context,
|
||||
return encrypt_internal(context, crypto, data, len, result, ivec);
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_encrypt(krb5_context context,
|
||||
krb5_crypto crypto,
|
||||
unsigned usage,
|
||||
@@ -3845,7 +3845,7 @@ krb5_encrypt(krb5_context context,
|
||||
return krb5_encrypt_ivec(context, crypto, usage, data, len, result, NULL);
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_encrypt_EncryptedData(krb5_context context,
|
||||
krb5_crypto crypto,
|
||||
unsigned usage,
|
||||
@@ -3863,7 +3863,7 @@ krb5_encrypt_EncryptedData(krb5_context context,
|
||||
return krb5_encrypt(context, crypto, usage, data, len, &result->cipher);
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_decrypt_ivec(krb5_context context,
|
||||
krb5_crypto crypto,
|
||||
unsigned usage,
|
||||
@@ -3882,7 +3882,7 @@ krb5_decrypt_ivec(krb5_context context,
|
||||
return decrypt_internal(context, crypto, data, len, result, ivec);
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_decrypt(krb5_context context,
|
||||
krb5_crypto crypto,
|
||||
unsigned usage,
|
||||
@@ -3894,7 +3894,7 @@ krb5_decrypt(krb5_context context,
|
||||
NULL);
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_decrypt_EncryptedData(krb5_context context,
|
||||
krb5_crypto crypto,
|
||||
unsigned usage,
|
||||
@@ -3936,6 +3936,7 @@ seed_something(void)
|
||||
/* Calling RAND_status() will try to use /dev/urandom if it exists so
|
||||
we do not have to deal with it. */
|
||||
if (RAND_status() != 1) {
|
||||
#ifndef _WIN32
|
||||
krb5_context context;
|
||||
const char *p;
|
||||
|
||||
@@ -3947,6 +3948,10 @@ seed_something(void)
|
||||
RAND_egd_bytes(p, ENTROPY_NEEDED);
|
||||
krb5_free_context(context);
|
||||
}
|
||||
#else
|
||||
/* TODO: Once a Windows CryptoAPI RAND method is defined, we
|
||||
can use that and failover to another method. */
|
||||
#endif
|
||||
}
|
||||
|
||||
if (RAND_status() == 1) {
|
||||
@@ -3959,7 +3964,7 @@ seed_something(void)
|
||||
return -1;
|
||||
}
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_generate_random_block(void *buf, size_t len)
|
||||
{
|
||||
static int rng_initialized = 0;
|
||||
@@ -4083,7 +4088,7 @@ _new_derived_key(krb5_crypto crypto, unsigned usage)
|
||||
return &d->key;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_derive_key(krb5_context context,
|
||||
const krb5_keyblock *key,
|
||||
krb5_enctype etype,
|
||||
@@ -4162,7 +4167,7 @@ _get_derived_key(krb5_context context,
|
||||
* @ingroup krb5_crypto
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_crypto_init(krb5_context context,
|
||||
const krb5_keyblock *key,
|
||||
krb5_enctype etype,
|
||||
@@ -4244,7 +4249,7 @@ free_key_usage(krb5_context context, struct key_usage *ku,
|
||||
* @ingroup krb5_crypto
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_crypto_destroy(krb5_context context,
|
||||
krb5_crypto crypto)
|
||||
{
|
||||
@@ -4270,7 +4275,7 @@ krb5_crypto_destroy(krb5_context context,
|
||||
* @ingroup krb5_crypto
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_crypto_getblocksize(krb5_context context,
|
||||
krb5_crypto crypto,
|
||||
size_t *blocksize)
|
||||
@@ -4291,7 +4296,7 @@ krb5_crypto_getblocksize(krb5_context context,
|
||||
* @ingroup krb5_crypto
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_crypto_getenctype(krb5_context context,
|
||||
krb5_crypto crypto,
|
||||
krb5_enctype *enctype)
|
||||
@@ -4312,7 +4317,7 @@ krb5_crypto_getenctype(krb5_context context,
|
||||
* @ingroup krb5_crypto
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_crypto_getpadsize(krb5_context context,
|
||||
krb5_crypto crypto,
|
||||
size_t *padsize)
|
||||
@@ -4333,7 +4338,7 @@ krb5_crypto_getpadsize(krb5_context context,
|
||||
* @ingroup krb5_crypto
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_crypto_getconfoundersize(krb5_context context,
|
||||
krb5_crypto crypto,
|
||||
size_t *confoundersize)
|
||||
@@ -4354,7 +4359,7 @@ krb5_crypto_getconfoundersize(krb5_context context,
|
||||
* @ingroup krb5_crypto
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_enctype_disable(krb5_context context,
|
||||
krb5_enctype enctype)
|
||||
{
|
||||
@@ -4381,7 +4386,7 @@ krb5_enctype_disable(krb5_context context,
|
||||
* @ingroup krb5_crypto
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_enctype_enable(krb5_context context,
|
||||
krb5_enctype enctype)
|
||||
{
|
||||
@@ -4398,7 +4403,7 @@ krb5_enctype_enable(krb5_context context,
|
||||
}
|
||||
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_string_to_key_derived(krb5_context context,
|
||||
const void *str,
|
||||
size_t len,
|
||||
@@ -4570,7 +4575,7 @@ krb5_crypto_overhead (krb5_context context, krb5_crypto crypto)
|
||||
* @ingroup krb5_crypto
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_random_to_key(krb5_context context,
|
||||
krb5_enctype type,
|
||||
const void *data,
|
||||
@@ -4862,7 +4867,7 @@ _krb5_pk_kdf(krb5_context context,
|
||||
}
|
||||
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_crypto_prf_length(krb5_context context,
|
||||
krb5_enctype type,
|
||||
size_t *length)
|
||||
@@ -4880,7 +4885,7 @@ krb5_crypto_prf_length(krb5_context context,
|
||||
return 0;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_crypto_prf(krb5_context context,
|
||||
const krb5_crypto crypto,
|
||||
const krb5_data *input,
|
||||
@@ -4971,7 +4976,7 @@ krb5_crypto_prfplus(krb5_context context,
|
||||
* @ingroup krb5_crypto
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_crypto_fx_cf2(krb5_context context,
|
||||
const krb5_crypto crypto1,
|
||||
const krb5_crypto crypto2,
|
||||
@@ -5025,7 +5030,7 @@ krb5_crypto_fx_cf2(krb5_context context,
|
||||
* @ingroup krb5_deprecated
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_keytype_to_enctypes (krb5_context context,
|
||||
krb5_keytype keytype,
|
||||
unsigned *len,
|
||||
@@ -5072,7 +5077,7 @@ krb5_keytype_to_enctypes (krb5_context context,
|
||||
*/
|
||||
|
||||
/* if two enctypes have compatible keys */
|
||||
krb5_boolean KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL
|
||||
krb5_enctypes_compatible_keys(krb5_context context,
|
||||
krb5_enctype etype1,
|
||||
krb5_enctype etype2)
|
||||
|
||||
+8
-8
@@ -41,7 +41,7 @@
|
||||
* @ingroup krb5
|
||||
*/
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_data_zero(krb5_data *p)
|
||||
{
|
||||
p->length = 0;
|
||||
@@ -59,7 +59,7 @@ krb5_data_zero(krb5_data *p)
|
||||
* @ingroup krb5
|
||||
*/
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_data_free(krb5_data *p)
|
||||
{
|
||||
if(p->data != NULL)
|
||||
@@ -76,7 +76,7 @@ krb5_data_free(krb5_data *p)
|
||||
* @ingroup krb5
|
||||
*/
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_free_data(krb5_context context,
|
||||
krb5_data *p)
|
||||
{
|
||||
@@ -96,7 +96,7 @@ krb5_free_data(krb5_context context,
|
||||
* @ingroup krb5
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_data_alloc(krb5_data *p, int len)
|
||||
{
|
||||
p->data = malloc(len);
|
||||
@@ -118,7 +118,7 @@ krb5_data_alloc(krb5_data *p, int len)
|
||||
* @ingroup krb5
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_data_realloc(krb5_data *p, int len)
|
||||
{
|
||||
void *tmp;
|
||||
@@ -143,7 +143,7 @@ krb5_data_realloc(krb5_data *p, int len)
|
||||
* @ingroup krb5
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_data_copy(krb5_data *p, const void *data, size_t len)
|
||||
{
|
||||
if (len) {
|
||||
@@ -169,7 +169,7 @@ krb5_data_copy(krb5_data *p, const void *data, size_t len)
|
||||
* @ingroup krb5
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_copy_data(krb5_context context,
|
||||
const krb5_data *indata,
|
||||
krb5_data **outdata)
|
||||
@@ -200,7 +200,7 @@ krb5_copy_data(krb5_context context,
|
||||
* @ingroup krb5
|
||||
*/
|
||||
|
||||
int KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION int KRB5_LIB_CALL
|
||||
krb5_data_cmp(const krb5_data *data1, const krb5_data *data2)
|
||||
{
|
||||
if (data1->length != data2->length)
|
||||
|
||||
+21
-21
@@ -51,7 +51,7 @@
|
||||
* @ingroup krb5_deprecated
|
||||
*/
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_free_data_contents(krb5_context context, krb5_data *data)
|
||||
KRB5_DEPRECATED
|
||||
{
|
||||
@@ -64,7 +64,7 @@ krb5_free_data_contents(krb5_context context, krb5_data *data)
|
||||
* @ingroup krb5_deprecated
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_keytype_to_enctypes_default (krb5_context context,
|
||||
krb5_keytype keytype,
|
||||
unsigned *len,
|
||||
@@ -114,7 +114,7 @@ static int num_keys = sizeof(keys) / sizeof(keys[0]);
|
||||
* @ingroup krb5_deprecated
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_keytype_to_string(krb5_context context,
|
||||
krb5_keytype keytype,
|
||||
char **string)
|
||||
@@ -151,7 +151,7 @@ krb5_keytype_to_string(krb5_context context,
|
||||
* @ingroup krb5_deprecated
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_string_to_keytype(krb5_context context,
|
||||
const char *string,
|
||||
krb5_keytype *keytype)
|
||||
@@ -184,7 +184,7 @@ krb5_string_to_keytype(krb5_context context,
|
||||
* @ingroup krb5_deprecated
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_password_key_proc (krb5_context context,
|
||||
krb5_enctype type,
|
||||
krb5_salt salt,
|
||||
@@ -220,7 +220,7 @@ krb5_password_key_proc (krb5_context context,
|
||||
* @ingroup krb5_deprecated
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_get_in_tkt_with_password (krb5_context context,
|
||||
krb5_flags options,
|
||||
krb5_addresses *addrs,
|
||||
@@ -262,7 +262,7 @@ krb5_skey_key_proc (krb5_context context,
|
||||
* @ingroup krb5_deprecated
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_get_in_tkt_with_skey (krb5_context context,
|
||||
krb5_flags options,
|
||||
krb5_addresses *addrs,
|
||||
@@ -305,7 +305,7 @@ krb5_get_in_tkt_with_skey (krb5_context context,
|
||||
* @ingroup krb5_deprecated
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_keytab_key_proc (krb5_context context,
|
||||
krb5_enctype enctype,
|
||||
krb5_salt salt,
|
||||
@@ -345,7 +345,7 @@ krb5_keytab_key_proc (krb5_context context,
|
||||
* @ingroup krb5_deprecated
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_get_in_tkt_with_keytab (krb5_context context,
|
||||
krb5_flags options,
|
||||
krb5_addresses *addrs,
|
||||
@@ -389,7 +389,7 @@ convert_func(krb5_context conxtext, void *funcctx, krb5_principal principal)
|
||||
* @ingroup krb5_deprecated
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_425_conv_principal_ext(krb5_context context,
|
||||
const char *name,
|
||||
const char *instance,
|
||||
@@ -415,7 +415,7 @@ krb5_425_conv_principal_ext(krb5_context context,
|
||||
* @ingroup krb5_deprecated
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_425_conv_principal(krb5_context context,
|
||||
const char *name,
|
||||
const char *instance,
|
||||
@@ -444,7 +444,7 @@ krb5_425_conv_principal(krb5_context context,
|
||||
*/
|
||||
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_cc_gen_new(krb5_context context,
|
||||
const krb5_cc_ops *ops,
|
||||
krb5_ccache *id)
|
||||
@@ -459,7 +459,7 @@ krb5_cc_gen_new(krb5_context context,
|
||||
* @ingroup krb5_deprecated
|
||||
*/
|
||||
|
||||
krb5_realm * KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_realm * KRB5_LIB_CALL
|
||||
krb5_princ_realm(krb5_context context,
|
||||
krb5_principal principal)
|
||||
KRB5_DEPRECATED
|
||||
@@ -474,7 +474,7 @@ krb5_princ_realm(krb5_context context,
|
||||
* @ingroup krb5_deprecated
|
||||
*/
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_princ_set_realm(krb5_context context,
|
||||
krb5_principal principal,
|
||||
krb5_realm *realm)
|
||||
@@ -490,7 +490,7 @@ krb5_princ_set_realm(krb5_context context,
|
||||
*/
|
||||
|
||||
/* keep this for compatibility with older code */
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_free_creds_contents (krb5_context context, krb5_creds *c)
|
||||
KRB5_DEPRECATED
|
||||
{
|
||||
@@ -508,7 +508,7 @@ krb5_free_creds_contents (krb5_context context, krb5_creds *c)
|
||||
* @ingroup krb5_deprecated
|
||||
*/
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_free_error_string(krb5_context context, char *str)
|
||||
KRB5_DEPRECATED
|
||||
{
|
||||
@@ -528,7 +528,7 @@ krb5_free_error_string(krb5_context context, char *str)
|
||||
* @ingroup krb5_deprecated
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_set_error_string(krb5_context context, const char *fmt, ...)
|
||||
__attribute__((format (printf, 2, 3))) KRB5_DEPRECATED
|
||||
{
|
||||
@@ -554,7 +554,7 @@ krb5_set_error_string(krb5_context context, const char *fmt, ...)
|
||||
* @ingroup krb5_deprecated
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_vset_error_string(krb5_context context, const char *fmt, va_list args)
|
||||
__attribute__ ((format (printf, 2, 0))) KRB5_DEPRECATED
|
||||
{
|
||||
@@ -572,7 +572,7 @@ krb5_vset_error_string(krb5_context context, const char *fmt, va_list args)
|
||||
* @ingroup krb5_deprecated
|
||||
*/
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_clear_error_string(krb5_context context)
|
||||
KRB5_DEPRECATED
|
||||
{
|
||||
@@ -585,7 +585,7 @@ krb5_clear_error_string(krb5_context context)
|
||||
* @ingroup krb5_deprecated
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_get_cred_from_kdc_opt(krb5_context context,
|
||||
krb5_ccache ccache,
|
||||
krb5_creds *in_creds,
|
||||
@@ -606,7 +606,7 @@ krb5_get_cred_from_kdc_opt(krb5_context context,
|
||||
* @ingroup krb5_deprecated
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_get_cred_from_kdc(krb5_context context,
|
||||
krb5_ccache ccache,
|
||||
krb5_creds *in_creds,
|
||||
|
||||
@@ -75,7 +75,7 @@ static struct testcase {
|
||||
{0}
|
||||
};
|
||||
|
||||
int KRB5_LIB_FUNCTION
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
struct testcase *t;
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <krb5_locl.h>
|
||||
#include "krb5_locl.h"
|
||||
|
||||
/**
|
||||
* Convert the getaddrinfo() error code to a Kerberos et error code.
|
||||
@@ -44,7 +44,7 @@
|
||||
* @ingroup krb5_error
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_eai_to_heim_errno(int eai_errno, int system_error)
|
||||
{
|
||||
switch(eai_errno) {
|
||||
@@ -74,8 +74,10 @@ krb5_eai_to_heim_errno(int eai_errno, int system_error)
|
||||
return HEIM_EAI_SERVICE;
|
||||
case EAI_SOCKTYPE:
|
||||
return HEIM_EAI_SOCKTYPE;
|
||||
#ifdef EAI_SYSTEM
|
||||
case EAI_SYSTEM:
|
||||
return system_error;
|
||||
#endif
|
||||
default:
|
||||
return HEIM_EAI_UNKNOWN; /* XXX */
|
||||
}
|
||||
@@ -92,7 +94,7 @@ krb5_eai_to_heim_errno(int eai_errno, int system_error)
|
||||
* @ingroup krb5_error
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_h_errno_to_heim_errno(int eai_errno)
|
||||
{
|
||||
switch(eai_errno) {
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
* @ingroup krb5_error
|
||||
*/
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_clear_error_message(krb5_context context)
|
||||
{
|
||||
HEIMDAL_MUTEX_lock(context->mutex);
|
||||
@@ -67,7 +67,7 @@ krb5_clear_error_message(krb5_context context)
|
||||
* @ingroup krb5_error
|
||||
*/
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_set_error_message(krb5_context context, krb5_error_code ret,
|
||||
const char *fmt, ...)
|
||||
__attribute__ ((format (printf, 3, 4)))
|
||||
@@ -91,7 +91,7 @@ krb5_set_error_message(krb5_context context, krb5_error_code ret,
|
||||
*/
|
||||
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_vset_error_message (krb5_context context, krb5_error_code ret,
|
||||
const char *fmt, va_list args)
|
||||
__attribute__ ((format (printf, 3, 0)))
|
||||
@@ -179,7 +179,7 @@ krb5_vprepend_error_message(krb5_context context, krb5_error_code ret,
|
||||
* @ingroup krb5_error
|
||||
*/
|
||||
|
||||
char * KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION char * KRB5_LIB_CALL
|
||||
krb5_get_error_string(krb5_context context)
|
||||
{
|
||||
char *ret = NULL;
|
||||
@@ -191,7 +191,7 @@ krb5_get_error_string(krb5_context context)
|
||||
return ret;
|
||||
}
|
||||
|
||||
krb5_boolean KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL
|
||||
krb5_have_error_string(krb5_context context)
|
||||
{
|
||||
char *str;
|
||||
@@ -214,7 +214,7 @@ krb5_have_error_string(krb5_context context)
|
||||
* @ingroup krb5_error
|
||||
*/
|
||||
|
||||
const char * KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION const char * KRB5_LIB_CALL
|
||||
krb5_get_error_message(krb5_context context, krb5_error_code code)
|
||||
{
|
||||
char *str;
|
||||
@@ -258,7 +258,7 @@ krb5_get_error_message(krb5_context context, krb5_error_code code)
|
||||
* @ingroup krb5_error
|
||||
*/
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_free_error_message(krb5_context context, const char *msg)
|
||||
{
|
||||
free(rk_UNCONST(msg));
|
||||
@@ -279,7 +279,7 @@ krb5_free_error_message(krb5_context context, const char *msg)
|
||||
* @ingroup krb5
|
||||
*/
|
||||
|
||||
const char* KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION const char* KRB5_LIB_CALL
|
||||
krb5_get_err_text(krb5_context context, krb5_error_code code) KRB5_DEPRECATED
|
||||
{
|
||||
const char *p = NULL;
|
||||
|
||||
@@ -63,7 +63,7 @@ copy_hostname(krb5_context context,
|
||||
* @ingroup krb5_support
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_expand_hostname (krb5_context context,
|
||||
const char *orig_hostname,
|
||||
char **new_hostname)
|
||||
@@ -140,7 +140,7 @@ vanilla_hostname (krb5_context context,
|
||||
* @ingroup krb5_support
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_expand_hostname_realms (krb5_context context,
|
||||
const char *orig_hostname,
|
||||
char **new_hostname,
|
||||
|
||||
@@ -0,0 +1,377 @@
|
||||
/***********************************************************************
|
||||
* Copyright (c) 2009, Secure Endpoints Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* - Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* - Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
|
||||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
|
||||
* COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
|
||||
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
||||
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||
* OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*
|
||||
**********************************************************************/
|
||||
|
||||
#include "krb5_locl.h"
|
||||
#include <shlobj.h>
|
||||
#include <sddl.h>
|
||||
|
||||
#define PTYPE int
|
||||
|
||||
/**
|
||||
* Expand a %{TEMP} token
|
||||
*
|
||||
* The %{TEMP} token expands to the temporary path for the current
|
||||
* user as returned by GetTempPath().
|
||||
*
|
||||
* @note: Since the GetTempPath() function relies on the TMP or TEMP
|
||||
* environment variables, this function will failover to the system
|
||||
* temporary directory until the user profile is loaded. In addition,
|
||||
* the returned path may or may not exist.
|
||||
*/
|
||||
static int
|
||||
_expand_temp_folder(krb5_context context, PTYPE param, char ** ret)
|
||||
{
|
||||
TCHAR tpath[MAX_PATH];
|
||||
size_t len;
|
||||
|
||||
if (!GetTempPath(sizeof(tpath)/sizeof(tpath[0]), tpath)) {
|
||||
if (context)
|
||||
krb5_set_error_string(context, "Failed to get temporary path (GLE=%d)",
|
||||
GetLastError());
|
||||
return 1;
|
||||
}
|
||||
|
||||
len = strlen(tpath);
|
||||
|
||||
if (len > 0 && tpath[len - 1] == '\\')
|
||||
tpath[len - 1] = '\0';
|
||||
|
||||
*ret = strdup(tpath);
|
||||
|
||||
if (*ret == NULL) {
|
||||
if (context)
|
||||
krb5_set_error_string(context, "strdup - Out of memory");
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Expand a %{USERID} token
|
||||
*
|
||||
* The %{USERID} token expands to the string representation of the
|
||||
* user's SID. The user account that will be used is the account
|
||||
* corresponding to the current thread's security token. This means
|
||||
* that:
|
||||
*
|
||||
* - If the current thread token has the anonymous impersonation
|
||||
* level, the call will fail.
|
||||
*
|
||||
* - If the current thread is impersonating a token at
|
||||
* SecurityIdentification level the call will fail.
|
||||
*
|
||||
*/
|
||||
static int
|
||||
_expand_userid(krb5_context context, PTYPE param, char ** ret)
|
||||
{
|
||||
int rv = 1;
|
||||
HANDLE hThread = NULL;
|
||||
HANDLE hToken = NULL;
|
||||
PTOKEN_OWNER pOwner = NULL;
|
||||
DWORD len = 0;
|
||||
LPTSTR strSid = NULL;
|
||||
|
||||
hThread = GetCurrentThread();
|
||||
|
||||
if (!OpenThreadToken(hThread, TOKEN_QUERY,
|
||||
FALSE, /* Open the thread token as the
|
||||
current thread user. */
|
||||
&hToken)) {
|
||||
|
||||
DWORD le = GetLastError();
|
||||
|
||||
if (le == ERROR_NO_TOKEN) {
|
||||
HANDLE hProcess = GetCurrentProcess();
|
||||
|
||||
le = 0;
|
||||
if (!OpenProcessToken(hProcess, TOKEN_QUERY, &hToken))
|
||||
le = GetLastError();
|
||||
}
|
||||
|
||||
if (le != 0) {
|
||||
if (context)
|
||||
krb5_set_error_string(context, "Can't open thread token (GLE=%d)", le);
|
||||
goto _exit;
|
||||
}
|
||||
}
|
||||
|
||||
if (!GetTokenInformation(hToken, TokenOwner, NULL, 0, &len)) {
|
||||
if (GetLastError() != ERROR_INSUFFICIENT_BUFFER) {
|
||||
if (context)
|
||||
krb5_set_error_string(context, "Unexpected error reading token information (GLE=%d)",
|
||||
GetLastError());
|
||||
goto _exit;
|
||||
}
|
||||
|
||||
if (len == 0) {
|
||||
if (context)
|
||||
krb5_set_error_string(context, "GetTokenInformation() returned truncated buffer");
|
||||
goto _exit;
|
||||
}
|
||||
|
||||
pOwner = malloc(len);
|
||||
if (pOwner == NULL) {
|
||||
if (context)
|
||||
krb5_set_error_string(context, "Out of memory");
|
||||
goto _exit;
|
||||
}
|
||||
} else {
|
||||
if (context)
|
||||
krb5_set_error_string(context, "GetTokenInformation() returned truncated buffer");
|
||||
goto _exit;
|
||||
}
|
||||
|
||||
if (!GetTokenInformation(hToken, TokenOwner, pOwner, len, &len)) {
|
||||
if (context)
|
||||
krb5_set_error_string(context, "GetTokenInformation() failed. GLE=%d", GetLastError());
|
||||
goto _exit;
|
||||
}
|
||||
|
||||
if (!ConvertSidToStringSid(pOwner->Owner, &strSid)) {
|
||||
if (context)
|
||||
krb5_set_error_string(context, "Can't convert SID to string. GLE=%d", GetLastError());
|
||||
goto _exit;
|
||||
}
|
||||
|
||||
*ret = strdup(strSid);
|
||||
if (*ret == NULL && context)
|
||||
krb5_set_error_string(context, "Out of memory");
|
||||
|
||||
rv = 0;
|
||||
|
||||
_exit:
|
||||
if (hToken != NULL)
|
||||
CloseHandle(hToken);
|
||||
|
||||
if (pOwner != NULL)
|
||||
free (pOwner);
|
||||
|
||||
if (strSid != NULL)
|
||||
LocalFree(strSid);
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
static int
|
||||
_expand_null(krb5_context context, PTYPE param, char ** ret)
|
||||
{
|
||||
*ret = strdup("");
|
||||
if (*ret == NULL) {
|
||||
if (context)
|
||||
krb5_set_error_string(context, "Out of memory");
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
_expand_csidl(krb5_context context, PTYPE folder, char ** ret)
|
||||
{
|
||||
TCHAR path[MAX_PATH];
|
||||
size_t len;
|
||||
|
||||
if (SHGetFolderPath(NULL, folder, NULL, SHGFP_TYPE_CURRENT, path) != S_OK) {
|
||||
if (context)
|
||||
krb5_set_error_string(context, "Unable to determine folder path");
|
||||
return 1;
|
||||
}
|
||||
|
||||
len = strlen(path);
|
||||
|
||||
if (len > 0 && path[len - 1] == '\\')
|
||||
path[len - 1] = '\0';
|
||||
|
||||
*ret = strdup(path);
|
||||
if (*ret == NULL) {
|
||||
if (context)
|
||||
krb5_set_error_string(context, "Out of memory");
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct token {
|
||||
const char * tok;
|
||||
int ftype;
|
||||
#define FTYPE_CSIDL 0
|
||||
#define FTYPE_SPECIAL 1
|
||||
|
||||
PTYPE param;
|
||||
|
||||
int (*exp_func)(krb5_context, PTYPE, char **);
|
||||
|
||||
#define CSIDL(C) FTYPE_CSIDL, C, _expand_csidl
|
||||
|
||||
#define SPECIAL(f) FTYPE_SPECIAL, 0, f
|
||||
|
||||
} tokens[] = {
|
||||
{"APPDATA", CSIDL(CSIDL_APPDATA)},
|
||||
/* Roaming application data (for current user) */
|
||||
|
||||
{"COMMON_APPDATA", CSIDL(CSIDL_COMMON_APPDATA)},
|
||||
/* Application data (all users) */
|
||||
|
||||
{"LOCAL_APPDATA", CSIDL(CSIDL_LOCAL_APPDATA)},
|
||||
/* Local application data (for current user) */
|
||||
|
||||
{"SYSTEM", CSIDL(CSIDL_SYSTEM)},
|
||||
/* Windows System folder (e.g. %WINDIR%\System32) */
|
||||
|
||||
{"WINDOWS", CSIDL(CSIDL_WINDOWS)},
|
||||
/* Windows folder */
|
||||
|
||||
{"TEMP", SPECIAL(_expand_temp_folder)},
|
||||
/* Temporary files folder */
|
||||
|
||||
{"USERID", SPECIAL(_expand_userid)},
|
||||
/* User ID (On Windows, this expands
|
||||
to the user's string SID */
|
||||
|
||||
{"uid", SPECIAL(_expand_userid)},
|
||||
/* Alias for USERID */
|
||||
|
||||
{"null", SPECIAL(_expand_null)},
|
||||
/* Empty string. For compatibility. */
|
||||
|
||||
};
|
||||
|
||||
static int
|
||||
_expand_token(krb5_context context, const char * token, const char * token_end,
|
||||
char ** ret)
|
||||
{
|
||||
int i;
|
||||
|
||||
*ret = NULL;
|
||||
|
||||
if (token[0] != '%' || token[1] != '{' || token_end[0] != '}') {
|
||||
if (context)
|
||||
krb5_set_error_string(context, "Invalid token.");
|
||||
return 1;
|
||||
}
|
||||
|
||||
for (i=0; i < sizeof(tokens)/sizeof(tokens[0]); i++) {
|
||||
if (!strncmp(token+2, tokens[i].tok, (token_end - token) - 2))
|
||||
return tokens[i].exp_func(context, tokens[i].param, ret);
|
||||
}
|
||||
|
||||
if (context)
|
||||
krb5_set_error_string(context, "Invalid token.");
|
||||
return 1;
|
||||
}
|
||||
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
_krb5_expand_path_tokens(krb5_context context,
|
||||
const char * path_in,
|
||||
char ** ppath_out)
|
||||
{
|
||||
size_t len = 0;
|
||||
char *tok_begin, *tok_end, *append;
|
||||
const char *path_left;
|
||||
|
||||
*ppath_out = NULL;
|
||||
|
||||
for (path_left = path_in; path_left && *path_left; ) {
|
||||
|
||||
tok_begin = strstr(path_left, "%{");
|
||||
|
||||
if (tok_begin && tok_begin != path_left) {
|
||||
|
||||
append = malloc((tok_begin - path_left) + 1);
|
||||
if (append) {
|
||||
memcpy(append, path_left, tok_begin - path_left);
|
||||
append[tok_begin - path_left] = '\0';
|
||||
}
|
||||
path_left = tok_begin;
|
||||
|
||||
} else if (tok_begin) {
|
||||
|
||||
tok_end = strchr(tok_begin, '}');
|
||||
if (tok_end == NULL) {
|
||||
if (*ppath_out)
|
||||
free(*ppath_out);
|
||||
*ppath_out = NULL;
|
||||
if (context)
|
||||
krb5_set_error_string(context, "variable missing }");
|
||||
return KRB5_CONFIG_BADFORMAT;
|
||||
}
|
||||
|
||||
if (_expand_token(context, tok_begin, tok_end, &append)) {
|
||||
if (*ppath_out)
|
||||
free(*ppath_out);
|
||||
*ppath_out = NULL;
|
||||
return KRB5_CONFIG_BADFORMAT;
|
||||
}
|
||||
|
||||
path_left = tok_end + 1;
|
||||
} else {
|
||||
|
||||
append = strdup(path_left);
|
||||
path_left = NULL;
|
||||
|
||||
}
|
||||
|
||||
if (append == NULL) {
|
||||
|
||||
if (*ppath_out)
|
||||
free(*ppath_out);
|
||||
*ppath_out = NULL;
|
||||
if (context)
|
||||
krb5_set_error_string(context, "malloc - out of memory");
|
||||
return ENOMEM;
|
||||
|
||||
}
|
||||
|
||||
{
|
||||
size_t append_len = strlen(append);
|
||||
char * new_str = realloc(*ppath_out, len + append_len + 1);
|
||||
|
||||
if (new_str == NULL) {
|
||||
free(append);
|
||||
if (*ppath_out)
|
||||
free(*ppath_out);
|
||||
*ppath_out = NULL;
|
||||
if (context)
|
||||
krb5_set_error_string(context, "malloc - out of memory");
|
||||
return ENOMEM;
|
||||
}
|
||||
|
||||
*ppath_out = new_str;
|
||||
memcpy(*ppath_out + len, append, append_len + 1);
|
||||
len = len + append_len;
|
||||
free(append);
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -226,7 +226,11 @@ scrub_file (int fd)
|
||||
return errno;
|
||||
pos -= tmp;
|
||||
}
|
||||
#ifdef _MSC_VER
|
||||
_commit (fd);
|
||||
#else
|
||||
fsync (fd);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -320,6 +324,22 @@ fcc_gen_new(krb5_context context, krb5_ccache *id)
|
||||
N_("malloc: out of memory", ""));
|
||||
return KRB5_CC_NOMEM;
|
||||
}
|
||||
#ifdef KRB5_USE_PATH_TOKENS
|
||||
{
|
||||
char * exp_file = NULL;
|
||||
krb5_error_code ec;
|
||||
|
||||
ec = _krb5_expand_path_tokens(context, file, &exp_file);
|
||||
|
||||
if (ec == 0) {
|
||||
free(file);
|
||||
file = exp_file;
|
||||
} else {
|
||||
free(file);
|
||||
return ec;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
fd = mkstemp(file);
|
||||
if(fd < 0) {
|
||||
int ret = errno;
|
||||
@@ -898,6 +918,15 @@ fcc_move(krb5_context context, krb5_ccache from, krb5_ccache to)
|
||||
krb5_error_code ret = 0;
|
||||
|
||||
ret = rename(FILENAME(from), FILENAME(to));
|
||||
#ifdef RENAME_DOES_NOT_UNLINK
|
||||
if (ret && (errno == EEXIST || errno == EACCES)) {
|
||||
ret = unlink(FILENAME(to));
|
||||
if (ret == 0) {
|
||||
ret = rename(FILENAME(from), FILENAME(to));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (ret && errno != EXDEV) {
|
||||
char buf[128];
|
||||
ret = errno;
|
||||
|
||||
+2
-2
@@ -33,7 +33,7 @@
|
||||
|
||||
#include "krb5_locl.h"
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_free_kdc_rep(krb5_context context, krb5_kdc_rep *rep)
|
||||
{
|
||||
free_KDC_REP(&rep->kdc_rep);
|
||||
@@ -43,7 +43,7 @@ krb5_free_kdc_rep(krb5_context context, krb5_kdc_rep *rep)
|
||||
return 0;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_xfree (void *ptr)
|
||||
{
|
||||
free (ptr);
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
* @ingroup krb5_support
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_free_host_realm(krb5_context context,
|
||||
krb5_realm *realmlist)
|
||||
{
|
||||
|
||||
@@ -31,9 +31,9 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <krb5_locl.h>
|
||||
#include "krb5_locl.h"
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_generate_seq_number(krb5_context context,
|
||||
const krb5_keyblock *key,
|
||||
uint32_t *seqno)
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <krb5_locl.h>
|
||||
#include "krb5_locl.h"
|
||||
|
||||
/**
|
||||
* Generate subkey, from keyblock
|
||||
@@ -46,7 +46,7 @@
|
||||
* @ingroup krb5_crypto
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_generate_subkey_extended(krb5_context context,
|
||||
const krb5_keyblock *key,
|
||||
krb5_enctype etype,
|
||||
|
||||
@@ -266,7 +266,7 @@ get_addrs_int (krb5_context context, krb5_addresses *res, int flags)
|
||||
* Only include loopback address if there are no other.
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_get_all_client_addrs (krb5_context context, krb5_addresses *res)
|
||||
{
|
||||
int flags = LOOP_IF_NONE | EXTRA_ADDRESSES;
|
||||
@@ -282,7 +282,7 @@ krb5_get_all_client_addrs (krb5_context context, krb5_addresses *res)
|
||||
* If that fails, we return the address corresponding to `hostname'.
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_get_all_server_addrs (krb5_context context, krb5_addresses *res)
|
||||
{
|
||||
return get_addrs_int (context, res, LOOP | SCAN_INTERFACES);
|
||||
|
||||
+13
-13
@@ -33,7 +33,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <krb5_locl.h>
|
||||
#include "krb5_locl.h"
|
||||
#include <assert.h>
|
||||
|
||||
/*
|
||||
@@ -608,7 +608,7 @@ get_cred_kdc_address(krb5_context context,
|
||||
return ret;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_get_kdc_cred(krb5_context context,
|
||||
krb5_ccache id,
|
||||
krb5_kdc_flags flags,
|
||||
@@ -1068,7 +1068,7 @@ _krb5_get_cred_kdc_any(krb5_context context,
|
||||
}
|
||||
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_get_credentials_with_flags(krb5_context context,
|
||||
krb5_flags options,
|
||||
krb5_kdc_flags flags,
|
||||
@@ -1154,7 +1154,7 @@ krb5_get_credentials_with_flags(krb5_context context,
|
||||
return ret;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_get_credentials(krb5_context context,
|
||||
krb5_flags options,
|
||||
krb5_ccache ccache,
|
||||
@@ -1175,7 +1175,7 @@ struct krb5_get_creds_opt_data {
|
||||
};
|
||||
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_get_creds_opt_alloc(krb5_context context, krb5_get_creds_opt *opt)
|
||||
{
|
||||
*opt = calloc(1, sizeof(**opt));
|
||||
@@ -1187,7 +1187,7 @@ krb5_get_creds_opt_alloc(krb5_context context, krb5_get_creds_opt *opt)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_get_creds_opt_free(krb5_context context, krb5_get_creds_opt opt)
|
||||
{
|
||||
if (opt->self)
|
||||
@@ -1200,7 +1200,7 @@ krb5_get_creds_opt_free(krb5_context context, krb5_get_creds_opt opt)
|
||||
free(opt);
|
||||
}
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_get_creds_opt_set_options(krb5_context context,
|
||||
krb5_get_creds_opt opt,
|
||||
krb5_flags options)
|
||||
@@ -1208,7 +1208,7 @@ krb5_get_creds_opt_set_options(krb5_context context,
|
||||
opt->options = options;
|
||||
}
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_get_creds_opt_add_options(krb5_context context,
|
||||
krb5_get_creds_opt opt,
|
||||
krb5_flags options)
|
||||
@@ -1216,7 +1216,7 @@ krb5_get_creds_opt_add_options(krb5_context context,
|
||||
opt->options |= options;
|
||||
}
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_get_creds_opt_set_enctype(krb5_context context,
|
||||
krb5_get_creds_opt opt,
|
||||
krb5_enctype enctype)
|
||||
@@ -1224,7 +1224,7 @@ krb5_get_creds_opt_set_enctype(krb5_context context,
|
||||
opt->enctype = enctype;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_get_creds_opt_set_impersonate(krb5_context context,
|
||||
krb5_get_creds_opt opt,
|
||||
krb5_const_principal self)
|
||||
@@ -1234,7 +1234,7 @@ krb5_get_creds_opt_set_impersonate(krb5_context context,
|
||||
return krb5_copy_principal(context, self, &opt->self);
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_get_creds_opt_set_ticket(krb5_context context,
|
||||
krb5_get_creds_opt opt,
|
||||
const Ticket *ticket)
|
||||
@@ -1267,7 +1267,7 @@ krb5_get_creds_opt_set_ticket(krb5_context context,
|
||||
|
||||
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_get_creds(krb5_context context,
|
||||
krb5_get_creds_opt opt,
|
||||
krb5_ccache ccache,
|
||||
@@ -1395,7 +1395,7 @@ krb5_get_creds(krb5_context context,
|
||||
*
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_get_renewed_creds(krb5_context context,
|
||||
krb5_creds *creds,
|
||||
krb5_const_principal client,
|
||||
|
||||
@@ -48,6 +48,8 @@ get_env_user(void)
|
||||
return user;
|
||||
}
|
||||
|
||||
#ifndef _WIN32
|
||||
|
||||
/*
|
||||
* Will only use operating-system dependant operation to get the
|
||||
* default principal, for use of functions that in ccache layer to
|
||||
@@ -93,7 +95,58 @@ _krb5_get_default_principal_local (krb5_context context,
|
||||
return ret;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
#else /* _WIN32 */
|
||||
|
||||
#define SECURITY_WIN32
|
||||
#include <security.h>
|
||||
|
||||
krb5_error_code
|
||||
_krb5_get_default_principal_local(krb5_context context,
|
||||
krb5_principal *princ)
|
||||
{
|
||||
krb5_error_code ret = 0;
|
||||
|
||||
/* See if we can get the principal first. We only expect this to
|
||||
work if logged into a domain. */
|
||||
{
|
||||
char username[1024];
|
||||
ULONG sz = sizeof(username);
|
||||
|
||||
if (GetUserNameEx(NameUserPrincipal, username, &sz)) {
|
||||
return krb5_parse_name_flags(context, username,
|
||||
KRB5_PRINCIPAL_PARSE_ENTERPRISE,
|
||||
princ);
|
||||
}
|
||||
}
|
||||
|
||||
/* Just get the Windows username. This should pretty much always
|
||||
work. */
|
||||
{
|
||||
char username[1024];
|
||||
DWORD dsz = sizeof(username);
|
||||
|
||||
if (GetUserName(username, &dsz)) {
|
||||
return krb5_make_principal(context, princ, NULL, username, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
/* Failing that, we look at the environment */
|
||||
{
|
||||
const char * username = get_env_user();
|
||||
|
||||
if (username == NULL) {
|
||||
krb5_set_error_string(context,
|
||||
"unable to figure out current principal");
|
||||
return ENOTTY; /* Really? */
|
||||
}
|
||||
|
||||
return krb5_make_principal(context, princ, NULL, username, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_get_default_principal (krb5_context context,
|
||||
krb5_principal *princ)
|
||||
{
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
* Free this memory with krb5_free_host_realm.
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_get_default_realms (krb5_context context,
|
||||
krb5_realm **realms)
|
||||
{
|
||||
@@ -57,7 +57,7 @@ krb5_get_default_realms (krb5_context context,
|
||||
* Return the first default realm. For compatibility.
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_get_default_realm(krb5_context context,
|
||||
krb5_realm *realm)
|
||||
{
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <krb5_locl.h>
|
||||
#include "krb5_locl.h"
|
||||
|
||||
static krb5_error_code
|
||||
add_addrs(krb5_context context,
|
||||
@@ -100,7 +100,7 @@ fail:
|
||||
* @ingroup krb5_credential
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_fwd_tgt_creds (krb5_context context,
|
||||
krb5_auth_context auth_context,
|
||||
const char *hostname,
|
||||
@@ -183,7 +183,7 @@ krb5_fwd_tgt_creds (krb5_context context,
|
||||
* @ingroup krb5_credential
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_get_forwarded_creds (krb5_context context,
|
||||
krb5_auth_context auth_context,
|
||||
krb5_ccache ccache,
|
||||
|
||||
@@ -158,7 +158,7 @@ config_find_realm(krb5_context context,
|
||||
* fall back to guessing
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
_krb5_get_host_realm_int (krb5_context context,
|
||||
const char *host,
|
||||
krb5_boolean use_dns,
|
||||
@@ -215,7 +215,7 @@ _krb5_get_host_realm_int (krb5_context context,
|
||||
* `realms'. Free `realms' with krb5_free_host_realm().
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_get_host_realm(krb5_context context,
|
||||
const char *targethost,
|
||||
krb5_realm **realms)
|
||||
|
||||
@@ -361,7 +361,7 @@ set_ptypes(krb5_context context,
|
||||
return(1);
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_get_in_cred(krb5_context context,
|
||||
krb5_flags options,
|
||||
const krb5_addresses *addrs,
|
||||
@@ -526,7 +526,7 @@ out:
|
||||
return ret;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_get_in_tkt(krb5_context context,
|
||||
krb5_flags options,
|
||||
const krb5_addresses *addrs,
|
||||
|
||||
+2
-2
@@ -31,9 +31,9 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <krb5_locl.h>
|
||||
#include "krb5_locl.h"
|
||||
|
||||
int KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION int KRB5_LIB_CALL
|
||||
krb5_getportbyname (krb5_context context,
|
||||
const char *service,
|
||||
const char *proto,
|
||||
|
||||
+20
-20
@@ -52,7 +52,7 @@
|
||||
* @ingroup krb5_credential
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_get_init_creds_opt_alloc(krb5_context context,
|
||||
krb5_get_init_creds_opt **opt)
|
||||
{
|
||||
@@ -84,7 +84,7 @@ krb5_get_init_creds_opt_alloc(krb5_context context,
|
||||
* @ingroup krb5_credential
|
||||
*/
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_get_init_creds_opt_free(krb5_context context,
|
||||
krb5_get_init_creds_opt *opt)
|
||||
{
|
||||
@@ -150,7 +150,7 @@ get_config_bool (krb5_context context,
|
||||
* [realms] or [libdefaults] for some of the values.
|
||||
*/
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_get_init_creds_opt_set_default_flags(krb5_context context,
|
||||
const char *appname,
|
||||
krb5_const_realm realm,
|
||||
@@ -201,7 +201,7 @@ krb5_get_init_creds_opt_set_default_flags(krb5_context context,
|
||||
}
|
||||
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_get_init_creds_opt_set_tkt_life(krb5_get_init_creds_opt *opt,
|
||||
krb5_deltat tkt_life)
|
||||
{
|
||||
@@ -209,7 +209,7 @@ krb5_get_init_creds_opt_set_tkt_life(krb5_get_init_creds_opt *opt,
|
||||
opt->tkt_life = tkt_life;
|
||||
}
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_get_init_creds_opt_set_renew_life(krb5_get_init_creds_opt *opt,
|
||||
krb5_deltat renew_life)
|
||||
{
|
||||
@@ -217,7 +217,7 @@ krb5_get_init_creds_opt_set_renew_life(krb5_get_init_creds_opt *opt,
|
||||
opt->renew_life = renew_life;
|
||||
}
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_get_init_creds_opt_set_forwardable(krb5_get_init_creds_opt *opt,
|
||||
int forwardable)
|
||||
{
|
||||
@@ -225,7 +225,7 @@ krb5_get_init_creds_opt_set_forwardable(krb5_get_init_creds_opt *opt,
|
||||
opt->forwardable = forwardable;
|
||||
}
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_get_init_creds_opt_set_proxiable(krb5_get_init_creds_opt *opt,
|
||||
int proxiable)
|
||||
{
|
||||
@@ -233,7 +233,7 @@ krb5_get_init_creds_opt_set_proxiable(krb5_get_init_creds_opt *opt,
|
||||
opt->proxiable = proxiable;
|
||||
}
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_get_init_creds_opt_set_etype_list(krb5_get_init_creds_opt *opt,
|
||||
krb5_enctype *etype_list,
|
||||
int etype_list_length)
|
||||
@@ -243,7 +243,7 @@ krb5_get_init_creds_opt_set_etype_list(krb5_get_init_creds_opt *opt,
|
||||
opt->etype_list_length = etype_list_length;
|
||||
}
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_get_init_creds_opt_set_address_list(krb5_get_init_creds_opt *opt,
|
||||
krb5_addresses *addresses)
|
||||
{
|
||||
@@ -251,7 +251,7 @@ krb5_get_init_creds_opt_set_address_list(krb5_get_init_creds_opt *opt,
|
||||
opt->address_list = addresses;
|
||||
}
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_get_init_creds_opt_set_preauth_list(krb5_get_init_creds_opt *opt,
|
||||
krb5_preauthtype *preauth_list,
|
||||
int preauth_list_length)
|
||||
@@ -261,7 +261,7 @@ krb5_get_init_creds_opt_set_preauth_list(krb5_get_init_creds_opt *opt,
|
||||
opt->preauth_list = preauth_list;
|
||||
}
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_get_init_creds_opt_set_salt(krb5_get_init_creds_opt *opt,
|
||||
krb5_data *salt)
|
||||
{
|
||||
@@ -269,7 +269,7 @@ krb5_get_init_creds_opt_set_salt(krb5_get_init_creds_opt *opt,
|
||||
opt->salt = salt;
|
||||
}
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_get_init_creds_opt_set_anonymous(krb5_get_init_creds_opt *opt,
|
||||
int anonymous)
|
||||
{
|
||||
@@ -290,7 +290,7 @@ require_ext_opt(krb5_context context,
|
||||
return 0;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_get_init_creds_opt_set_pa_password(krb5_context context,
|
||||
krb5_get_init_creds_opt *opt,
|
||||
const char *password,
|
||||
@@ -305,7 +305,7 @@ krb5_get_init_creds_opt_set_pa_password(krb5_context context,
|
||||
return 0;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_get_init_creds_opt_set_pac_request(krb5_context context,
|
||||
krb5_get_init_creds_opt *opt,
|
||||
krb5_boolean req_pac)
|
||||
@@ -320,7 +320,7 @@ krb5_get_init_creds_opt_set_pac_request(krb5_context context,
|
||||
return 0;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_get_init_creds_opt_set_addressless(krb5_context context,
|
||||
krb5_get_init_creds_opt *opt,
|
||||
krb5_boolean addressless)
|
||||
@@ -336,7 +336,7 @@ krb5_get_init_creds_opt_set_addressless(krb5_context context,
|
||||
return 0;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_get_init_creds_opt_set_canonicalize(krb5_context context,
|
||||
krb5_get_init_creds_opt *opt,
|
||||
krb5_boolean req)
|
||||
@@ -352,7 +352,7 @@ krb5_get_init_creds_opt_set_canonicalize(krb5_context context,
|
||||
return 0;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_get_init_creds_opt_set_win2k(krb5_context context,
|
||||
krb5_get_init_creds_opt *opt,
|
||||
krb5_boolean req)
|
||||
@@ -372,7 +372,7 @@ krb5_get_init_creds_opt_set_win2k(krb5_context context,
|
||||
}
|
||||
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_get_init_creds_opt_set_process_last_req(krb5_context context,
|
||||
krb5_get_init_creds_opt *opt,
|
||||
krb5_gic_process_last_req func,
|
||||
@@ -402,7 +402,7 @@ krb5_get_init_creds_opt_set_process_last_req(krb5_context context,
|
||||
* @ingroup krb5_deprecated
|
||||
*/
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_get_init_creds_opt_init(krb5_get_init_creds_opt *opt)
|
||||
KRB5_DEPRECATED
|
||||
{
|
||||
@@ -416,7 +416,7 @@ krb5_get_init_creds_opt_init(krb5_get_init_creds_opt *opt)
|
||||
* @ingroup krb5_deprecated
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_get_init_creds_opt_get_error(krb5_context context,
|
||||
krb5_get_init_creds_opt *opt,
|
||||
KRB_ERROR **error)
|
||||
|
||||
+13
-13
@@ -586,7 +586,7 @@ out:
|
||||
}
|
||||
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_keyblock_key_proc (krb5_context context,
|
||||
krb5_keytype type,
|
||||
krb5_data *salt,
|
||||
@@ -1332,7 +1332,7 @@ process_pa_data_to_key(krb5_context context,
|
||||
* @ingroup krb5_credential
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_init_creds_init(krb5_context context,
|
||||
krb5_principal client,
|
||||
krb5_prompter_fct prompter,
|
||||
@@ -1386,7 +1386,7 @@ krb5_init_creds_init(krb5_context context,
|
||||
* @ingroup krb5_credential
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_init_creds_set_service(krb5_context context,
|
||||
krb5_init_creds_context ctx,
|
||||
const char *service)
|
||||
@@ -1426,7 +1426,7 @@ krb5_init_creds_set_service(krb5_context context,
|
||||
* @ingroup krb5_credential
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_init_creds_set_password(krb5_context context,
|
||||
krb5_init_creds_context ctx,
|
||||
const char *password)
|
||||
@@ -1492,7 +1492,7 @@ keytab_key_proc(krb5_context context, krb5_enctype enctype,
|
||||
* @ingroup krb5_credential
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_init_creds_set_keytab(krb5_context context,
|
||||
krb5_init_creds_context ctx,
|
||||
krb5_keytab keytab)
|
||||
@@ -1583,7 +1583,7 @@ keyblock_key_proc(krb5_context context, krb5_enctype enctype,
|
||||
return krb5_copy_keyblock (context, keyseed, key);
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_init_creds_set_keyblock(krb5_context context,
|
||||
krb5_init_creds_context ctx,
|
||||
krb5_keyblock *keyblock)
|
||||
@@ -1614,7 +1614,7 @@ krb5_init_creds_set_keyblock(krb5_context context,
|
||||
* @ingroup krb5_credential
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_init_creds_step(krb5_context context,
|
||||
krb5_init_creds_context ctx,
|
||||
krb5_data *in,
|
||||
@@ -1827,7 +1827,7 @@ krb5_init_creds_step(krb5_context context,
|
||||
* @return 0 for sucess or An Kerberos error code, see krb5_get_error_message().
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_init_creds_get_creds(krb5_context context,
|
||||
krb5_init_creds_context ctx,
|
||||
krb5_creds *cred)
|
||||
@@ -1843,7 +1843,7 @@ krb5_init_creds_get_creds(krb5_context context,
|
||||
* @ingroup krb5_credential
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_init_creds_get_error(krb5_context context,
|
||||
krb5_init_creds_context ctx,
|
||||
KRB_ERROR *error)
|
||||
@@ -1883,7 +1883,7 @@ krb5_init_creds_free(krb5_context context,
|
||||
* @ingroup krb5_credential
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_init_creds_get(krb5_context context, krb5_init_creds_context ctx)
|
||||
{
|
||||
krb5_sendto_ctx stctx = NULL;
|
||||
@@ -1931,7 +1931,7 @@ krb5_init_creds_get(krb5_context context, krb5_init_creds_context ctx)
|
||||
*/
|
||||
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_get_init_creds_password(krb5_context context,
|
||||
krb5_creds *creds,
|
||||
krb5_principal client,
|
||||
@@ -2037,7 +2037,7 @@ krb5_get_init_creds_password(krb5_context context,
|
||||
* @ingroup krb5_credential
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_get_init_creds_keyblock(krb5_context context,
|
||||
krb5_creds *creds,
|
||||
krb5_principal client,
|
||||
@@ -2084,7 +2084,7 @@ krb5_get_init_creds_keyblock(krb5_context context,
|
||||
* @ingroup krb5_credential
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_get_init_creds_keytab(krb5_context context,
|
||||
krb5_creds *creds,
|
||||
krb5_principal client,
|
||||
|
||||
+6
-6
@@ -41,7 +41,7 @@
|
||||
* @ingroup krb5_crypto
|
||||
*/
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_keyblock_zero(krb5_keyblock *keyblock)
|
||||
{
|
||||
keyblock->keytype = 0;
|
||||
@@ -57,7 +57,7 @@ krb5_keyblock_zero(krb5_keyblock *keyblock)
|
||||
* @ingroup krb5_crypto
|
||||
*/
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_free_keyblock_contents(krb5_context context,
|
||||
krb5_keyblock *keyblock)
|
||||
{
|
||||
@@ -79,7 +79,7 @@ krb5_free_keyblock_contents(krb5_context context,
|
||||
* @ingroup krb5_crypto
|
||||
*/
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_free_keyblock(krb5_context context,
|
||||
krb5_keyblock *keyblock)
|
||||
{
|
||||
@@ -102,7 +102,7 @@ krb5_free_keyblock(krb5_context context,
|
||||
* @ingroup krb5_crypto
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_copy_keyblock_contents (krb5_context context,
|
||||
const krb5_keyblock *inblock,
|
||||
krb5_keyblock *to)
|
||||
@@ -124,7 +124,7 @@ krb5_copy_keyblock_contents (krb5_context context,
|
||||
*/
|
||||
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_copy_keyblock (krb5_context context,
|
||||
const krb5_keyblock *inblock,
|
||||
krb5_keyblock **to)
|
||||
@@ -170,7 +170,7 @@ krb5_keyblock_get_enctype(const krb5_keyblock *block)
|
||||
* @ingroup krb5_crypto
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_keyblock_init(krb5_context context,
|
||||
krb5_enctype type,
|
||||
const void *data,
|
||||
|
||||
+20
-20
@@ -143,7 +143,7 @@ main (int argc, char **argv)
|
||||
* @ingroup krb5_keytab
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_kt_register(krb5_context context,
|
||||
const krb5_kt_ops *ops)
|
||||
{
|
||||
@@ -183,7 +183,7 @@ krb5_kt_register(krb5_context context,
|
||||
*/
|
||||
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_kt_resolve(krb5_context context,
|
||||
const char *name,
|
||||
krb5_keytab *id)
|
||||
@@ -244,7 +244,7 @@ krb5_kt_resolve(krb5_context context,
|
||||
* @ingroup krb5_keytab
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_kt_default_name(krb5_context context, char *name, size_t namesize)
|
||||
{
|
||||
if (strlcpy (name, context->default_keytab, namesize) >= namesize) {
|
||||
@@ -266,7 +266,7 @@ krb5_kt_default_name(krb5_context context, char *name, size_t namesize)
|
||||
* @ingroup krb5_keytab
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_kt_default_modify_name(krb5_context context, char *name, size_t namesize)
|
||||
{
|
||||
const char *kt = NULL;
|
||||
@@ -303,7 +303,7 @@ krb5_kt_default_modify_name(krb5_context context, char *name, size_t namesize)
|
||||
* @ingroup krb5_keytab
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_kt_default(krb5_context context, krb5_keytab *id)
|
||||
{
|
||||
return krb5_kt_resolve (context, context->default_keytab, id);
|
||||
@@ -325,7 +325,7 @@ krb5_kt_default(krb5_context context, krb5_keytab *id)
|
||||
* @ingroup krb5_keytab
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_kt_read_service_key(krb5_context context,
|
||||
krb5_pointer keyprocarg,
|
||||
krb5_principal principal,
|
||||
@@ -368,7 +368,7 @@ krb5_kt_read_service_key(krb5_context context,
|
||||
* @ingroup krb5_keytab
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_kt_get_type(krb5_context context,
|
||||
krb5_keytab keytab,
|
||||
char *prefix,
|
||||
@@ -391,7 +391,7 @@ krb5_kt_get_type(krb5_context context,
|
||||
* @ingroup krb5_keytab
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_kt_get_name(krb5_context context,
|
||||
krb5_keytab keytab,
|
||||
char *name,
|
||||
@@ -414,7 +414,7 @@ krb5_kt_get_name(krb5_context context,
|
||||
* @ingroup krb5_keytab
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_kt_get_full_name(krb5_context context,
|
||||
krb5_keytab keytab,
|
||||
char **str)
|
||||
@@ -454,7 +454,7 @@ krb5_kt_get_full_name(krb5_context context,
|
||||
* @ingroup krb5_keytab
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_kt_close(krb5_context context,
|
||||
krb5_keytab id)
|
||||
{
|
||||
@@ -478,7 +478,7 @@ krb5_kt_close(krb5_context context,
|
||||
* @ingroup krb5_keytab
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_kt_destroy(krb5_context context,
|
||||
krb5_keytab id)
|
||||
{
|
||||
@@ -523,7 +523,7 @@ compare_aliseses(krb5_context context,
|
||||
* @ingroup krb5_keytab
|
||||
*/
|
||||
|
||||
krb5_boolean KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL
|
||||
krb5_kt_compare(krb5_context context,
|
||||
krb5_keytab_entry *entry,
|
||||
krb5_const_principal principal,
|
||||
@@ -590,7 +590,7 @@ _krb5_kt_principal_not_found(krb5_context context,
|
||||
* @ingroup krb5_keytab
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_kt_get_entry(krb5_context context,
|
||||
krb5_keytab id,
|
||||
krb5_const_principal principal,
|
||||
@@ -651,7 +651,7 @@ krb5_kt_get_entry(krb5_context context,
|
||||
* @ingroup krb5_keytab
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_kt_copy_entry_contents(krb5_context context,
|
||||
const krb5_keytab_entry *in,
|
||||
krb5_keytab_entry *out)
|
||||
@@ -687,7 +687,7 @@ fail:
|
||||
* @ingroup krb5_keytab
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_kt_free_entry(krb5_context context,
|
||||
krb5_keytab_entry *entry)
|
||||
{
|
||||
@@ -709,7 +709,7 @@ krb5_kt_free_entry(krb5_context context,
|
||||
* @ingroup krb5_keytab
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_kt_start_seq_get(krb5_context context,
|
||||
krb5_keytab id,
|
||||
krb5_kt_cursor *cursor)
|
||||
@@ -738,7 +738,7 @@ krb5_kt_start_seq_get(krb5_context context,
|
||||
* @ingroup krb5_keytab
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_kt_next_entry(krb5_context context,
|
||||
krb5_keytab id,
|
||||
krb5_keytab_entry *entry,
|
||||
@@ -766,7 +766,7 @@ krb5_kt_next_entry(krb5_context context,
|
||||
* @ingroup krb5_keytab
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_kt_end_seq_get(krb5_context context,
|
||||
krb5_keytab id,
|
||||
krb5_kt_cursor *cursor)
|
||||
@@ -792,7 +792,7 @@ krb5_kt_end_seq_get(krb5_context context,
|
||||
* @ingroup krb5_keytab
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_kt_add_entry(krb5_context context,
|
||||
krb5_keytab id,
|
||||
krb5_keytab_entry *entry)
|
||||
@@ -820,7 +820,7 @@ krb5_kt_add_entry(krb5_context context,
|
||||
* @ingroup krb5_keytab
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_kt_remove_entry(krb5_context context,
|
||||
krb5_keytab id,
|
||||
krb5_keytab_entry *entry)
|
||||
|
||||
@@ -105,8 +105,12 @@ struct credentials {
|
||||
#define CLOCK_SKEW 5*60
|
||||
|
||||
#ifndef TKT_ROOT
|
||||
#ifdef KRB5_USE_PATH_TOKENS
|
||||
#define TKT_ROOT "%{TEMP}/tkt"
|
||||
#else
|
||||
#define TKT_ROOT "/tmp/tkt"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
struct _krb5_krb_auth_data {
|
||||
int8_t k_flags; /* Flags from ticket */
|
||||
@@ -120,11 +124,18 @@ struct _krb5_krb_auth_data {
|
||||
uint32_t address; /* Address in ticket */
|
||||
};
|
||||
|
||||
time_t _krb5_krb_life_to_time (int, int);
|
||||
int _krb5_krb_time_to_life (time_t, time_t);
|
||||
krb5_error_code _krb5_krb_tf_setup (krb5_context, struct credentials *,
|
||||
const char *, int);
|
||||
krb5_error_code _krb5_krb_dest_tkt(krb5_context, const char *);
|
||||
KRB5_LIB_FUNCTION time_t KRB5_LIB_CALL
|
||||
_krb5_krb_life_to_time (int, int);
|
||||
|
||||
KRB5_LIB_FUNCTION int KRB5_LIB_CALL
|
||||
_krb5_krb_time_to_life (time_t, time_t);
|
||||
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
_krb5_krb_tf_setup (krb5_context, struct credentials *,
|
||||
const char *, int);
|
||||
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
_krb5_krb_dest_tkt(krb5_context, const char *);
|
||||
|
||||
#define krb_time_to_life _krb5_krb_time_to_life
|
||||
#define krb_life_to_time _krb5_krb_life_to_time
|
||||
|
||||
@@ -303,7 +303,15 @@ typedef AP_REQ krb5_ap_req;
|
||||
|
||||
struct krb5_cc_ops;
|
||||
|
||||
#ifdef _WIN32
|
||||
#define KRB5_USE_PATH_TOKENS 1
|
||||
#endif
|
||||
|
||||
#ifdef KRB5_USE_PATH_TOKENS
|
||||
#define KRB5_DEFAULT_CCFILE_ROOT "%{TEMP}/krb5cc_"
|
||||
#else
|
||||
#define KRB5_DEFAULT_CCFILE_ROOT "/tmp/krb5cc_"
|
||||
#endif
|
||||
|
||||
#define KRB5_DEFAULT_CCROOT "FILE:" KRB5_DEFAULT_CCFILE_ROOT
|
||||
|
||||
|
||||
@@ -47,6 +47,8 @@
|
||||
#include <stdlib.h>
|
||||
#include <limits.h>
|
||||
|
||||
#include <krb5-types.h>
|
||||
|
||||
#ifdef HAVE_SYS_TYPES_H
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
@@ -185,6 +187,7 @@ struct _krb5_krb_auth_data;
|
||||
#define KEYTAB_DEFAULT "FILE:" SYSCONFDIR "/krb5.keytab"
|
||||
#define KEYTAB_DEFAULT_MODIFY "FILE:" SYSCONFDIR "/krb5.keytab"
|
||||
|
||||
|
||||
#define MODULI_FILE SYSCONFDIR "/krb5.moduli"
|
||||
|
||||
#ifndef O_BINARY
|
||||
@@ -270,13 +273,18 @@ typedef struct krb5_context_data {
|
||||
#define KRB5_CTX_F_DNS_CANONICALIZE_HOSTNAME 1
|
||||
#define KRB5_CTX_F_CHECK_PAC 2
|
||||
#define KRB5_CTX_F_HOMEDIR_ACCESS 4
|
||||
#define KRB5_CTX_F_SOCKETS_INITIALIZED 8
|
||||
struct send_to_kdc *send_to_kdc;
|
||||
#ifdef PKINIT
|
||||
hx509_context hx509ctx;
|
||||
#endif
|
||||
} krb5_context_data;
|
||||
|
||||
#ifndef KRB5_USE_PATH_TOKENS
|
||||
#define KRB5_DEFAULT_CCNAME_FILE "FILE:/tmp/krb5cc_%{uid}"
|
||||
#else
|
||||
#define KRB5_DEFAULT_CCNAME_FILE "FILE:%{TEMP}/krb5cc_%{uid}"
|
||||
#endif
|
||||
#define KRB5_DEFAULT_CCNAME_API "API:"
|
||||
#define KRB5_DEFAULT_CCNAME_KCM_KCM "KCM:%{uid}"
|
||||
#define KRB5_DEFAULT_CCNAME_KCM_API "API:%{uid}"
|
||||
|
||||
+13
-13
@@ -320,7 +320,7 @@ append_host_string(krb5_context context, struct krb5_krbhst_data *kd,
|
||||
* return a readable representation of `host' in `hostname, hostlen'
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_krbhst_format_string(krb5_context context, const krb5_krbhst_info *host,
|
||||
char *hostname, size_t hostlen)
|
||||
{
|
||||
@@ -361,7 +361,7 @@ make_hints(struct addrinfo *hints, int proto)
|
||||
* in `host'. free:ing is handled by krb5_krbhst_free.
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_krbhst_get_addrinfo(krb5_context context, krb5_krbhst_info *host,
|
||||
struct addrinfo **ai)
|
||||
{
|
||||
@@ -857,7 +857,7 @@ common_init(krb5_context context,
|
||||
* initialize `handle' to look for hosts of type `type' in realm `realm'
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_krbhst_init(krb5_context context,
|
||||
const char *realm,
|
||||
unsigned int type,
|
||||
@@ -866,7 +866,7 @@ krb5_krbhst_init(krb5_context context,
|
||||
return krb5_krbhst_init_flags(context, realm, type, 0, handle);
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_krbhst_init_flags(krb5_context context,
|
||||
const char *realm,
|
||||
unsigned int type,
|
||||
@@ -919,7 +919,7 @@ krb5_krbhst_init_flags(krb5_context context,
|
||||
* return the next host information from `handle' in `host'
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_krbhst_next(krb5_context context,
|
||||
krb5_krbhst_handle handle,
|
||||
krb5_krbhst_info **host)
|
||||
@@ -935,7 +935,7 @@ krb5_krbhst_next(krb5_context context,
|
||||
* in `hostname' (or length `hostlen)
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_krbhst_next_as_string(krb5_context context,
|
||||
krb5_krbhst_handle handle,
|
||||
char *hostname,
|
||||
@@ -950,13 +950,13 @@ krb5_krbhst_next_as_string(krb5_context context,
|
||||
}
|
||||
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_krbhst_reset(krb5_context context, krb5_krbhst_handle handle)
|
||||
{
|
||||
handle->index = &handle->hosts;
|
||||
}
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_krbhst_free(krb5_context context, krb5_krbhst_handle handle)
|
||||
{
|
||||
krb5_krbhst_info *h, *next;
|
||||
@@ -1021,7 +1021,7 @@ gethostlist(krb5_context context, const char *realm,
|
||||
* return an malloced list of kadmin-hosts for `realm' in `hostlist'
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_get_krb_admin_hst (krb5_context context,
|
||||
const krb5_realm *realm,
|
||||
char ***hostlist)
|
||||
@@ -1033,7 +1033,7 @@ krb5_get_krb_admin_hst (krb5_context context,
|
||||
* return an malloced list of changepw-hosts for `realm' in `hostlist'
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_get_krb_changepw_hst (krb5_context context,
|
||||
const krb5_realm *realm,
|
||||
char ***hostlist)
|
||||
@@ -1045,7 +1045,7 @@ krb5_get_krb_changepw_hst (krb5_context context,
|
||||
* return an malloced list of 524-hosts for `realm' in `hostlist'
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_get_krb524hst (krb5_context context,
|
||||
const krb5_realm *realm,
|
||||
char ***hostlist)
|
||||
@@ -1058,7 +1058,7 @@ krb5_get_krb524hst (krb5_context context,
|
||||
* return an malloced list of KDC's for `realm' in `hostlist'
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_get_krbhst (krb5_context context,
|
||||
const krb5_realm *realm,
|
||||
char ***hostlist)
|
||||
@@ -1070,7 +1070,7 @@ krb5_get_krbhst (krb5_context context,
|
||||
* free all the memory allocated in `hostlist'
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_free_krbhst (krb5_context context,
|
||||
char **hostlist)
|
||||
{
|
||||
|
||||
+19
-4
@@ -65,6 +65,7 @@ check_one_file(krb5_context context,
|
||||
fclose (f);
|
||||
return EISDIR;
|
||||
}
|
||||
#ifndef _WIN32
|
||||
if (st.st_uid != pwd->pw_uid && st.st_uid != 0) {
|
||||
fclose (f);
|
||||
return EACCES;
|
||||
@@ -73,6 +74,7 @@ check_one_file(krb5_context context,
|
||||
fclose (f);
|
||||
return EACCES;
|
||||
}
|
||||
#endif
|
||||
|
||||
while (fgets (buf, sizeof(buf), f) != NULL) {
|
||||
krb5_principal tmp;
|
||||
@@ -124,10 +126,12 @@ check_directory(krb5_context context,
|
||||
if (!S_ISDIR(st.st_mode))
|
||||
return ENOTDIR;
|
||||
|
||||
#ifndef _WIN32
|
||||
if (st.st_uid != pwd->pw_uid && st.st_uid != 0)
|
||||
return EACCES;
|
||||
if ((st.st_mode & (S_IWGRP | S_IWOTH)) != 0)
|
||||
return EACCES;
|
||||
#endif
|
||||
|
||||
if((d = opendir(dirname)) == NULL)
|
||||
return errno;
|
||||
@@ -228,14 +232,17 @@ match_local_principals(krb5_context context,
|
||||
* @ingroup krb5_support
|
||||
*/
|
||||
|
||||
krb5_boolean KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL
|
||||
krb5_kuserok (krb5_context context,
|
||||
krb5_principal principal,
|
||||
const char *luser)
|
||||
{
|
||||
#ifndef _WIN32
|
||||
char *buf;
|
||||
size_t buflen;
|
||||
struct passwd *pwd;
|
||||
struct passwd *pwd = NULL;
|
||||
char *profile_dir = NULL;
|
||||
krb5_boolean free_profile_dir = FALSE;
|
||||
krb5_error_code ret;
|
||||
krb5_boolean result = FALSE;
|
||||
|
||||
@@ -252,14 +259,15 @@ krb5_kuserok (krb5_context context,
|
||||
#endif
|
||||
if (pwd == NULL)
|
||||
return FALSE;
|
||||
profile_dir = pwd->pw_dir;
|
||||
|
||||
#define KLOGIN "/.k5login"
|
||||
buflen = strlen(pwd->pw_dir) + sizeof(KLOGIN) + 2; /* 2 for .d */
|
||||
buflen = strlen(profile_dir) + sizeof(KLOGIN) + 2; /* 2 for .d */
|
||||
buf = malloc(buflen);
|
||||
if(buf == NULL)
|
||||
return FALSE;
|
||||
/* check user's ~/.k5login */
|
||||
strlcpy(buf, pwd->pw_dir, buflen);
|
||||
strlcpy(buf, profile_dir, buflen);
|
||||
strlcat(buf, KLOGIN, buflen);
|
||||
ret = check_one_file(context, buf, pwd, principal, &result);
|
||||
|
||||
@@ -286,4 +294,11 @@ krb5_kuserok (krb5_context context,
|
||||
return match_local_principals(context, principal, luser);
|
||||
|
||||
return FALSE;
|
||||
#else
|
||||
/* On Windows, for now we always return TRUE. The .k5login file
|
||||
may be on a remote profile and we don't have access to the
|
||||
profile until we have a token handle for the user's
|
||||
credentials. */
|
||||
return TRUE;
|
||||
#endif
|
||||
}
|
||||
|
||||
+9
-9
@@ -115,7 +115,7 @@ find_value(const char *s, struct s2i *table)
|
||||
return table->val;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_initlog(krb5_context context,
|
||||
const char *program,
|
||||
krb5_log_facility **fac)
|
||||
@@ -137,7 +137,7 @@ krb5_initlog(krb5_context context,
|
||||
return 0;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_addlog_func(krb5_context context,
|
||||
krb5_log_facility *fac,
|
||||
int min,
|
||||
@@ -270,7 +270,7 @@ open_file(krb5_context context, krb5_log_facility *fac, int min, int max,
|
||||
|
||||
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_addlog_dest(krb5_context context, krb5_log_facility *f, const char *orig)
|
||||
{
|
||||
krb5_error_code ret = 0;
|
||||
@@ -361,7 +361,7 @@ krb5_addlog_dest(krb5_context context, krb5_log_facility *f, const char *orig)
|
||||
}
|
||||
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_openlog(krb5_context context,
|
||||
const char *program,
|
||||
krb5_log_facility **fac)
|
||||
@@ -385,7 +385,7 @@ krb5_openlog(krb5_context context,
|
||||
return ret;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_closelog(krb5_context context,
|
||||
krb5_log_facility *fac)
|
||||
{
|
||||
@@ -404,7 +404,7 @@ krb5_closelog(krb5_context context,
|
||||
#undef __attribute__
|
||||
#define __attribute__(X)
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_vlog_msg(krb5_context context,
|
||||
krb5_log_facility *fac,
|
||||
char **reply,
|
||||
@@ -443,7 +443,7 @@ krb5_vlog_msg(krb5_context context,
|
||||
return 0;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_vlog(krb5_context context,
|
||||
krb5_log_facility *fac,
|
||||
int level,
|
||||
@@ -454,7 +454,7 @@ krb5_vlog(krb5_context context,
|
||||
return krb5_vlog_msg(context, fac, NULL, level, fmt, ap);
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_log_msg(krb5_context context,
|
||||
krb5_log_facility *fac,
|
||||
int level,
|
||||
@@ -473,7 +473,7 @@ krb5_log_msg(krb5_context context,
|
||||
}
|
||||
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_log(krb5_context context,
|
||||
krb5_log_facility *fac,
|
||||
int level,
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@
|
||||
|
||||
#include "krb5_locl.h"
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
_krb5_s4u2self_to_checksumdata(krb5_context context,
|
||||
const PA_S4U2Self *self,
|
||||
krb5_data *data)
|
||||
|
||||
+23
-23
@@ -41,7 +41,7 @@
|
||||
* Glue for MIT API
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_c_make_checksum(krb5_context context,
|
||||
krb5_cksumtype cksumtype,
|
||||
const krb5_keyblock *key,
|
||||
@@ -63,7 +63,7 @@ krb5_c_make_checksum(krb5_context context,
|
||||
return ret ;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_c_verify_checksum(krb5_context context, const krb5_keyblock *key,
|
||||
krb5_keyusage usage, const krb5_data *data,
|
||||
const krb5_checksum *cksum, krb5_boolean *valid)
|
||||
@@ -88,7 +88,7 @@ krb5_c_verify_checksum(krb5_context context, const krb5_keyblock *key,
|
||||
return 0;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_c_get_checksum(krb5_context context, const krb5_checksum *cksum,
|
||||
krb5_cksumtype *type, krb5_data **data)
|
||||
{
|
||||
@@ -111,7 +111,7 @@ krb5_c_get_checksum(krb5_context context, const krb5_checksum *cksum,
|
||||
return 0;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_c_set_checksum(krb5_context context, krb5_checksum *cksum,
|
||||
krb5_cksumtype type, const krb5_data *data)
|
||||
{
|
||||
@@ -119,51 +119,51 @@ krb5_c_set_checksum(krb5_context context, krb5_checksum *cksum,
|
||||
return der_copy_octet_string(data, &cksum->checksum);
|
||||
}
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_free_checksum (krb5_context context, krb5_checksum *cksum)
|
||||
{
|
||||
krb5_checksum_free(context, cksum);
|
||||
free(cksum);
|
||||
}
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_free_checksum_contents(krb5_context context, krb5_checksum *cksum)
|
||||
{
|
||||
krb5_checksum_free(context, cksum);
|
||||
memset(cksum, 0, sizeof(*cksum));
|
||||
}
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_checksum_free(krb5_context context, krb5_checksum *cksum)
|
||||
{
|
||||
free_Checksum(cksum);
|
||||
}
|
||||
|
||||
krb5_boolean KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL
|
||||
krb5_c_valid_enctype (krb5_enctype etype)
|
||||
{
|
||||
return krb5_enctype_valid(NULL, etype);
|
||||
}
|
||||
|
||||
krb5_boolean KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL
|
||||
krb5_c_valid_cksumtype(krb5_cksumtype ctype)
|
||||
{
|
||||
return krb5_cksumtype_valid(NULL, ctype);
|
||||
}
|
||||
|
||||
krb5_boolean KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL
|
||||
krb5_c_is_coll_proof_cksum(krb5_cksumtype ctype)
|
||||
{
|
||||
return krb5_checksum_is_collision_proof(NULL, ctype);
|
||||
}
|
||||
|
||||
krb5_boolean KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL
|
||||
krb5_c_is_keyed_cksum(krb5_cksumtype ctype)
|
||||
{
|
||||
return krb5_checksum_is_keyed(NULL, ctype);
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_copy_checksum (krb5_context context,
|
||||
const krb5_checksum *old,
|
||||
krb5_checksum **new)
|
||||
@@ -174,14 +174,14 @@ krb5_copy_checksum (krb5_context context,
|
||||
return copy_Checksum(old, *new);
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_c_checksum_length (krb5_context context, krb5_cksumtype cksumtype,
|
||||
size_t *length)
|
||||
{
|
||||
return krb5_checksumsize(context, cksumtype, length);
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_c_block_size(krb5_context context,
|
||||
krb5_enctype enctype,
|
||||
size_t *blocksize)
|
||||
@@ -204,7 +204,7 @@ krb5_c_block_size(krb5_context context,
|
||||
return ret;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_c_decrypt(krb5_context context,
|
||||
const krb5_keyblock key,
|
||||
krb5_keyusage usage,
|
||||
@@ -244,7 +244,7 @@ krb5_c_decrypt(krb5_context context,
|
||||
return ret ;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_c_encrypt(krb5_context context,
|
||||
const krb5_keyblock *key,
|
||||
krb5_keyusage usage,
|
||||
@@ -286,7 +286,7 @@ krb5_c_encrypt(krb5_context context,
|
||||
return ret ;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_c_encrypt_length(krb5_context context,
|
||||
krb5_enctype enctype,
|
||||
size_t inputlen,
|
||||
@@ -317,7 +317,7 @@ krb5_c_encrypt_length(krb5_context context,
|
||||
* @ingroup krb5_deprecated
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_c_enctype_compare(krb5_context context,
|
||||
krb5_enctype e1,
|
||||
krb5_enctype e2,
|
||||
@@ -328,7 +328,7 @@ krb5_c_enctype_compare(krb5_context context,
|
||||
return 0;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_c_make_random_key(krb5_context context,
|
||||
krb5_enctype enctype,
|
||||
krb5_keyblock *random_key)
|
||||
@@ -336,7 +336,7 @@ krb5_c_make_random_key(krb5_context context,
|
||||
return krb5_generate_random_keyblock(context, enctype, random_key);
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_c_keylengths(krb5_context context,
|
||||
krb5_enctype enctype,
|
||||
size_t *ilen,
|
||||
@@ -351,7 +351,7 @@ krb5_c_keylengths(krb5_context context,
|
||||
return krb5_enctype_keysize(context, enctype, keylen);
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_c_prf_length(krb5_context context,
|
||||
krb5_enctype type,
|
||||
size_t *length)
|
||||
@@ -359,7 +359,7 @@ krb5_c_prf_length(krb5_context context,
|
||||
return krb5_crypto_prf_length(context, type, length);
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_c_prf(krb5_context context,
|
||||
const krb5_keyblock *key,
|
||||
const krb5_data *input,
|
||||
@@ -384,7 +384,7 @@ krb5_c_prf(krb5_context context,
|
||||
* @ingroup krb5_ccache
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_cc_copy_creds(krb5_context context,
|
||||
const krb5_ccache from,
|
||||
krb5_ccache to)
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@
|
||||
|
||||
#include "krb5_locl.h"
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_mk_error(krb5_context context,
|
||||
krb5_error_code error_code,
|
||||
const char *e_text,
|
||||
|
||||
+2
-2
@@ -31,9 +31,9 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <krb5_locl.h>
|
||||
#include "krb5_locl.h"
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_mk_priv(krb5_context context,
|
||||
krb5_auth_context auth_context,
|
||||
const krb5_data *userdata,
|
||||
|
||||
+2
-2
@@ -31,9 +31,9 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <krb5_locl.h>
|
||||
#include "krb5_locl.h"
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_mk_rep(krb5_context context,
|
||||
krb5_auth_context auth_context,
|
||||
krb5_data *outbuf)
|
||||
|
||||
+3
-3
@@ -31,9 +31,9 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <krb5_locl.h>
|
||||
#include "krb5_locl.h"
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_mk_req_exact(krb5_context context,
|
||||
krb5_auth_context *auth_context,
|
||||
const krb5_flags ap_req_options,
|
||||
@@ -77,7 +77,7 @@ krb5_mk_req_exact(krb5_context context,
|
||||
return ret;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_mk_req(krb5_context context,
|
||||
krb5_auth_context *auth_context,
|
||||
const krb5_flags ap_req_options,
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <krb5_locl.h>
|
||||
#include "krb5_locl.h"
|
||||
|
||||
krb5_error_code
|
||||
_krb5_mk_req_internal(krb5_context context,
|
||||
@@ -143,7 +143,7 @@ out:
|
||||
return ret;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_mk_req_extended(krb5_context context,
|
||||
krb5_auth_context *auth_context,
|
||||
const krb5_flags ap_req_options,
|
||||
|
||||
+2
-2
@@ -31,9 +31,9 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <krb5_locl.h>
|
||||
#include "krb5_locl.h"
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_mk_safe(krb5_context context,
|
||||
krb5_auth_context auth_context,
|
||||
const krb5_data *userdata,
|
||||
|
||||
+1
-1
@@ -96,7 +96,7 @@ add1(unsigned char *a, unsigned char *b, size_t len)
|
||||
}
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
_krb5_n_fold(const void *str, size_t len, void *key, size_t size)
|
||||
{
|
||||
/* if len < size we need at most N * len bytes, ie < 2 * size;
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@
|
||||
|
||||
#include "krb5_locl.h"
|
||||
|
||||
krb5_ssize_t KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_ssize_t KRB5_LIB_CALL
|
||||
krb5_net_read (krb5_context context,
|
||||
void *p_fd,
|
||||
void *buf,
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
#include "krb5_locl.h"
|
||||
|
||||
krb5_ssize_t KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_ssize_t KRB5_LIB_CALL
|
||||
krb5_net_write (krb5_context context,
|
||||
void *p_fd,
|
||||
const void *buf,
|
||||
@@ -44,7 +44,7 @@ krb5_net_write (krb5_context context,
|
||||
return net_write (fd, buf, len);
|
||||
}
|
||||
|
||||
krb5_ssize_t KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_ssize_t KRB5_LIB_CALL
|
||||
krb5_net_write_block(krb5_context context,
|
||||
void *p_fd,
|
||||
const void *buf,
|
||||
|
||||
+1
-1
@@ -42,7 +42,7 @@ krb5_find_padata(PA_DATA *val, unsigned len, int type, int *idx)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
int KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION int KRB5_LIB_CALL
|
||||
krb5_padata_add(krb5_context context, METHOD_DATA *md,
|
||||
int type, void *buf, size_t len)
|
||||
{
|
||||
|
||||
@@ -61,7 +61,7 @@ static struct testcase {
|
||||
{"a/b/c", "a/b/c@", "", 3, {"a", "b", "c"}, FALSE},
|
||||
{NULL, NULL, "", 0, { NULL }, FALSE}};
|
||||
|
||||
int KRB5_LIB_FUNCTION
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
struct testcase *t;
|
||||
|
||||
+7
-7
@@ -91,7 +91,7 @@ pk_copy_error(krb5_context context,
|
||||
*
|
||||
*/
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
_krb5_pk_cert_free(struct krb5_pk_cert *cert)
|
||||
{
|
||||
if (cert->cert) {
|
||||
@@ -617,7 +617,7 @@ build_auth_pack(krb5_context context,
|
||||
return ret;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
_krb5_pk_mk_ContentInfo(krb5_context context,
|
||||
const krb5_data *buf,
|
||||
const heim_oid *oid,
|
||||
@@ -807,7 +807,7 @@ pk_mk_padata(krb5_context context,
|
||||
}
|
||||
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
_krb5_pk_mk_padata(krb5_context context,
|
||||
void *c,
|
||||
int ic_flags,
|
||||
@@ -1534,7 +1534,7 @@ pk_rd_pa_reply_dh(krb5_context context,
|
||||
return ret;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
_krb5_pk_rd_pa_reply(krb5_context context,
|
||||
const char *realm,
|
||||
void *c,
|
||||
@@ -1826,7 +1826,7 @@ _krb5_pk_set_user_id(krb5_context context,
|
||||
return ret;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
_krb5_pk_load_id(krb5_context context,
|
||||
struct krb5_pk_identity **ret_id,
|
||||
const char *user_id,
|
||||
@@ -2291,7 +2291,7 @@ _krb5_dh_group_ok(krb5_context context, unsigned long bits,
|
||||
}
|
||||
#endif /* PKINIT */
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
_krb5_get_init_creds_opt_free_pkinit(krb5_get_init_creds_opt *opt)
|
||||
{
|
||||
#ifdef PKINIT
|
||||
@@ -2335,7 +2335,7 @@ _krb5_get_init_creds_opt_free_pkinit(krb5_get_init_creds_opt *opt)
|
||||
#endif
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_get_init_creds_opt_set_pkinit(krb5_context context,
|
||||
krb5_get_init_creds_opt *opt,
|
||||
krb5_principal principal,
|
||||
|
||||
+28
-29
@@ -76,7 +76,7 @@ host/admin@H5L.ORG
|
||||
* @ingroup krb5_principal
|
||||
*/
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_free_principal(krb5_context context,
|
||||
krb5_principal p)
|
||||
{
|
||||
@@ -98,7 +98,7 @@ krb5_free_principal(krb5_context context,
|
||||
* @ingroup krb5_principal
|
||||
*/
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_principal_set_type(krb5_context context,
|
||||
krb5_principal principal,
|
||||
int type)
|
||||
@@ -117,7 +117,7 @@ krb5_principal_set_type(krb5_context context,
|
||||
* @ingroup krb5_principal
|
||||
*/
|
||||
|
||||
int KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION int KRB5_LIB_CALL
|
||||
krb5_principal_get_type(krb5_context context,
|
||||
krb5_const_principal principal)
|
||||
{
|
||||
@@ -135,14 +135,14 @@ krb5_principal_get_type(krb5_context context,
|
||||
* @ingroup krb5_principal
|
||||
*/
|
||||
|
||||
const char* KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION const char* KRB5_LIB_CALL
|
||||
krb5_principal_get_realm(krb5_context context,
|
||||
krb5_const_principal principal)
|
||||
{
|
||||
return princ_realm(principal);
|
||||
}
|
||||
|
||||
const char* KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION const char* KRB5_LIB_CALL
|
||||
krb5_principal_get_comp_string(krb5_context context,
|
||||
krb5_const_principal principal,
|
||||
unsigned int component)
|
||||
@@ -163,7 +163,7 @@ krb5_principal_get_comp_string(krb5_context context,
|
||||
* @ingroup krb5_principal
|
||||
*/
|
||||
|
||||
unsigned int KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION unsigned int KRB5_LIB_CALL
|
||||
krb5_principal_get_num_comp(krb5_context context,
|
||||
krb5_const_principal principal)
|
||||
{
|
||||
@@ -183,7 +183,7 @@ krb5_principal_get_num_comp(krb5_context context,
|
||||
* @ingroup krb5_principal
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_parse_name_flags(krb5_context context,
|
||||
const char *name,
|
||||
int flags,
|
||||
@@ -384,7 +384,7 @@ exit:
|
||||
* @ingroup krb5_principal
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_parse_name(krb5_context context,
|
||||
const char *name,
|
||||
krb5_principal *principal)
|
||||
@@ -485,7 +485,7 @@ unparse_name_fixed(krb5_context context,
|
||||
* @ingroup krb5_principal
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_unparse_name_fixed(krb5_context context,
|
||||
krb5_const_principal principal,
|
||||
char *name,
|
||||
@@ -508,7 +508,7 @@ krb5_unparse_name_fixed(krb5_context context,
|
||||
* @ingroup krb5_principal
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_unparse_name_fixed_short(krb5_context context,
|
||||
krb5_const_principal principal,
|
||||
char *name,
|
||||
@@ -532,7 +532,7 @@ krb5_unparse_name_fixed_short(krb5_context context,
|
||||
* @ingroup krb5_principal
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_unparse_name_fixed_flags(krb5_context context,
|
||||
krb5_const_principal principal,
|
||||
int flags,
|
||||
@@ -596,7 +596,7 @@ unparse_name(krb5_context context,
|
||||
* @ingroup krb5_principal
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_unparse_name(krb5_context context,
|
||||
krb5_const_principal principal,
|
||||
char **name)
|
||||
@@ -617,7 +617,7 @@ krb5_unparse_name(krb5_context context,
|
||||
* @ingroup krb5_principal
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_unparse_name_flags(krb5_context context,
|
||||
krb5_const_principal principal,
|
||||
int flags,
|
||||
@@ -639,7 +639,7 @@ krb5_unparse_name_flags(krb5_context context,
|
||||
* @ingroup krb5_principal
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_unparse_name_short(krb5_context context,
|
||||
krb5_const_principal principal,
|
||||
char **name)
|
||||
@@ -660,7 +660,7 @@ krb5_unparse_name_short(krb5_context context,
|
||||
* @ingroup krb5_principal
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_principal_set_realm(krb5_context context,
|
||||
krb5_principal principal,
|
||||
krb5_const_realm realm)
|
||||
@@ -692,7 +692,7 @@ krb5_principal_set_realm(krb5_context context,
|
||||
* @ingroup krb5_principal
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_build_principal(krb5_context context,
|
||||
krb5_principal *principal,
|
||||
int rlen,
|
||||
@@ -828,8 +828,7 @@ build_principal(krb5_context context,
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_build_principal_va(krb5_context context,
|
||||
krb5_principal *principal,
|
||||
int rlen,
|
||||
@@ -839,7 +838,7 @@ krb5_build_principal_va(krb5_context context,
|
||||
return build_principal(context, principal, rlen, realm, va_princ, ap);
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_build_principal_va_ext(krb5_context context,
|
||||
krb5_principal *principal,
|
||||
int rlen,
|
||||
@@ -850,7 +849,7 @@ krb5_build_principal_va_ext(krb5_context context,
|
||||
}
|
||||
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_build_principal_ext(krb5_context context,
|
||||
krb5_principal *principal,
|
||||
int rlen,
|
||||
@@ -878,7 +877,7 @@ krb5_build_principal_ext(krb5_context context,
|
||||
*/
|
||||
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_copy_principal(krb5_context context,
|
||||
krb5_const_principal inprinc,
|
||||
krb5_principal *outprinc)
|
||||
@@ -913,7 +912,7 @@ krb5_copy_principal(krb5_context context,
|
||||
* @see krb5_realm_compare()
|
||||
*/
|
||||
|
||||
krb5_boolean KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL
|
||||
krb5_principal_compare_any_realm(krb5_context context,
|
||||
krb5_const_principal princ1,
|
||||
krb5_const_principal princ2)
|
||||
@@ -928,7 +927,7 @@ krb5_principal_compare_any_realm(krb5_context context,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
krb5_boolean KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL
|
||||
_krb5_principal_compare_PrincipalName(krb5_context context,
|
||||
krb5_const_principal princ1,
|
||||
PrincipalName *princ2)
|
||||
@@ -961,7 +960,7 @@ _krb5_principal_compare_PrincipalName(krb5_context context,
|
||||
* return TRUE iff princ1 == princ2
|
||||
*/
|
||||
|
||||
krb5_boolean KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL
|
||||
krb5_principal_compare(krb5_context context,
|
||||
krb5_const_principal princ1,
|
||||
krb5_const_principal princ2)
|
||||
@@ -983,7 +982,7 @@ krb5_principal_compare(krb5_context context,
|
||||
* @see krb5_principal_compare()
|
||||
*/
|
||||
|
||||
krb5_boolean KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL
|
||||
krb5_realm_compare(krb5_context context,
|
||||
krb5_const_principal princ1,
|
||||
krb5_const_principal princ2)
|
||||
@@ -997,7 +996,7 @@ krb5_realm_compare(krb5_context context,
|
||||
* @ingroup krb5_principal
|
||||
*/
|
||||
|
||||
krb5_boolean KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL
|
||||
krb5_principal_match(krb5_context context,
|
||||
krb5_const_principal princ,
|
||||
krb5_const_principal pattern)
|
||||
@@ -1083,7 +1082,7 @@ get_name_conversion(krb5_context context, const char *realm, const char *name)
|
||||
* if `func', use that function for validating the conversion
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_425_conv_principal_ext2(krb5_context context,
|
||||
const char *name,
|
||||
const char *instance,
|
||||
@@ -1375,7 +1374,7 @@ name_convert(krb5_context context, const char *name, const char *realm,
|
||||
* three parameters. They have to be 40 bytes each (ANAME_SZ).
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_524_conv_principal(krb5_context context,
|
||||
const krb5_principal principal,
|
||||
char *name,
|
||||
@@ -1461,7 +1460,7 @@ krb5_524_conv_principal(krb5_context context,
|
||||
* @ingroup krb5_principal
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_sname_to_principal (krb5_context context,
|
||||
const char *hostname,
|
||||
const char *sname,
|
||||
|
||||
@@ -35,14 +35,14 @@
|
||||
#include <getarg.h>
|
||||
#include <err.h>
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void
|
||||
krb5_std_usage(int code, struct getargs *args, int num_args)
|
||||
{
|
||||
arg_printusage(args, num_args, NULL, "");
|
||||
exit(code);
|
||||
}
|
||||
|
||||
int KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION int KRB5_LIB_CALL
|
||||
krb5_program_setup(krb5_context *context, int argc, char **argv,
|
||||
struct getargs *args, int num_args,
|
||||
void (*usage)(int, struct getargs*, int))
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
#include "krb5_locl.h"
|
||||
|
||||
int KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION int
|
||||
krb5_prompter_posix (krb5_context context,
|
||||
void *data,
|
||||
const char *name,
|
||||
|
||||
+3
-3
@@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <krb5_locl.h>
|
||||
#include "krb5_locl.h"
|
||||
|
||||
static krb5_error_code
|
||||
compare_addrs(krb5_context context,
|
||||
@@ -52,7 +52,7 @@ compare_addrs(krb5_context context,
|
||||
return KRB5KRB_AP_ERR_BADADDR;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_rd_cred(krb5_context context,
|
||||
krb5_auth_context auth_context,
|
||||
krb5_data *in_data,
|
||||
@@ -322,7 +322,7 @@ krb5_rd_cred(krb5_context context,
|
||||
return ret;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_rd_cred2 (krb5_context context,
|
||||
krb5_auth_context auth_context,
|
||||
krb5_ccache ccache,
|
||||
|
||||
+4
-4
@@ -33,7 +33,7 @@
|
||||
|
||||
#include "krb5_locl.h"
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_rd_error(krb5_context context,
|
||||
const krb5_data *msg,
|
||||
KRB_ERROR *result)
|
||||
@@ -51,7 +51,7 @@ krb5_rd_error(krb5_context context,
|
||||
return 0;
|
||||
}
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_free_error_contents (krb5_context context,
|
||||
krb5_error *error)
|
||||
{
|
||||
@@ -59,7 +59,7 @@ krb5_free_error_contents (krb5_context context,
|
||||
memset(error, 0, sizeof(*error));
|
||||
}
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_free_error (krb5_context context,
|
||||
krb5_error *error)
|
||||
{
|
||||
@@ -67,7 +67,7 @@ krb5_free_error (krb5_context context,
|
||||
free (error);
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_error_from_rd_error(krb5_context context,
|
||||
const krb5_error *error,
|
||||
const krb5_creds *creds)
|
||||
|
||||
+2
-2
@@ -31,9 +31,9 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <krb5_locl.h>
|
||||
#include "krb5_locl.h"
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_rd_priv(krb5_context context,
|
||||
krb5_auth_context auth_context,
|
||||
const krb5_data *inbuf,
|
||||
|
||||
+3
-3
@@ -31,9 +31,9 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <krb5_locl.h>
|
||||
#include "krb5_locl.h"
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_rd_rep(krb5_context context,
|
||||
krb5_auth_context auth_context,
|
||||
const krb5_data *inbuf,
|
||||
@@ -108,7 +108,7 @@ krb5_rd_rep(krb5_context context,
|
||||
return ret;
|
||||
}
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_free_ap_rep_enc_part (krb5_context context,
|
||||
krb5_ap_rep_enc_part *val)
|
||||
{
|
||||
|
||||
+20
-19
@@ -1,3 +1,4 @@
|
||||
|
||||
/*
|
||||
* Copyright (c) 1997 - 2007 Kungliga Tekniska Högskolan
|
||||
* (Royal Institute of Technology, Stockholm, Sweden).
|
||||
@@ -31,7 +32,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <krb5_locl.h>
|
||||
#include "krb5_locl.h"
|
||||
|
||||
static krb5_error_code
|
||||
decrypt_tkt_enc_part (krb5_context context,
|
||||
@@ -102,7 +103,7 @@ decrypt_authenticator (krb5_context context,
|
||||
return ret;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_decode_ap_req(krb5_context context,
|
||||
const krb5_data *inbuf,
|
||||
krb5_ap_req *ap_req)
|
||||
@@ -217,7 +218,7 @@ find_etypelist(krb5_context context,
|
||||
return ret;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_decrypt_ticket(krb5_context context,
|
||||
Ticket *ticket,
|
||||
krb5_keyblock *key,
|
||||
@@ -266,7 +267,7 @@ krb5_decrypt_ticket(krb5_context context,
|
||||
return 0;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_verify_authenticator_checksum(krb5_context context,
|
||||
krb5_auth_context ac,
|
||||
void *data,
|
||||
@@ -308,7 +309,7 @@ out:
|
||||
}
|
||||
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_verify_ap_req(krb5_context context,
|
||||
krb5_auth_context *auth_context,
|
||||
krb5_ap_req *ap_req,
|
||||
@@ -329,7 +330,7 @@ krb5_verify_ap_req(krb5_context context,
|
||||
KRB5_KU_AP_REQ_AUTH);
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_verify_ap_req2(krb5_context context,
|
||||
krb5_auth_context *auth_context,
|
||||
krb5_ap_req *ap_req,
|
||||
@@ -538,7 +539,7 @@ struct krb5_rd_req_out_ctx_data {
|
||||
* @ingroup krb5_auth
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_rd_req_in_ctx_alloc(krb5_context context, krb5_rd_req_in_ctx *ctx)
|
||||
{
|
||||
*ctx = calloc(1, sizeof(**ctx));
|
||||
@@ -565,7 +566,7 @@ krb5_rd_req_in_ctx_alloc(krb5_context context, krb5_rd_req_in_ctx *ctx)
|
||||
* @ingroup krb5_auth
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_rd_req_in_set_keytab(krb5_context context,
|
||||
krb5_rd_req_in_ctx in,
|
||||
krb5_keytab keytab)
|
||||
@@ -586,7 +587,7 @@ krb5_rd_req_in_set_keytab(krb5_context context,
|
||||
* @ingroup krb5_auth
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_rd_req_in_set_pac_check(krb5_context context,
|
||||
krb5_rd_req_in_ctx in,
|
||||
krb5_boolean flag)
|
||||
@@ -596,7 +597,7 @@ krb5_rd_req_in_set_pac_check(krb5_context context,
|
||||
}
|
||||
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_rd_req_in_set_keyblock(krb5_context context,
|
||||
krb5_rd_req_in_ctx in,
|
||||
krb5_keyblock *keyblock)
|
||||
@@ -605,7 +606,7 @@ krb5_rd_req_in_set_keyblock(krb5_context context,
|
||||
return 0;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_rd_req_out_get_ap_req_options(krb5_context context,
|
||||
krb5_rd_req_out_ctx out,
|
||||
krb5_flags *ap_req_options)
|
||||
@@ -614,7 +615,7 @@ krb5_rd_req_out_get_ap_req_options(krb5_context context,
|
||||
return 0;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_rd_req_out_get_ticket(krb5_context context,
|
||||
krb5_rd_req_out_ctx out,
|
||||
krb5_ticket **ticket)
|
||||
@@ -622,7 +623,7 @@ krb5_rd_req_out_get_ticket(krb5_context context,
|
||||
return krb5_copy_ticket(context, out->ticket, ticket);
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_rd_req_out_get_keyblock(krb5_context context,
|
||||
krb5_rd_req_out_ctx out,
|
||||
krb5_keyblock **keyblock)
|
||||
@@ -642,7 +643,7 @@ krb5_rd_req_out_get_keyblock(krb5_context context,
|
||||
* @ingroup krb5_auth
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_rd_req_out_get_server(krb5_context context,
|
||||
krb5_rd_req_out_ctx out,
|
||||
krb5_principal *principal)
|
||||
@@ -650,7 +651,7 @@ krb5_rd_req_out_get_server(krb5_context context,
|
||||
return krb5_copy_principal(context, out->server, principal);
|
||||
}
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_rd_req_in_ctx_free(krb5_context context, krb5_rd_req_in_ctx ctx)
|
||||
{
|
||||
free(ctx);
|
||||
@@ -665,7 +666,7 @@ krb5_rd_req_in_ctx_free(krb5_context context, krb5_rd_req_in_ctx ctx)
|
||||
* @ingroup krb5_auth
|
||||
*/
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_rd_req_out_ctx_free(krb5_context context, krb5_rd_req_out_ctx ctx)
|
||||
{
|
||||
if (ctx->ticket)
|
||||
@@ -681,7 +682,7 @@ krb5_rd_req_out_ctx_free(krb5_context context, krb5_rd_req_out_ctx ctx)
|
||||
*
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_rd_req(krb5_context context,
|
||||
krb5_auth_context *auth_context,
|
||||
const krb5_data *inbuf,
|
||||
@@ -726,7 +727,7 @@ out:
|
||||
*
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_rd_req_with_keyblock(krb5_context context,
|
||||
krb5_auth_context *auth_context,
|
||||
const krb5_data *inbuf,
|
||||
@@ -834,7 +835,7 @@ out:
|
||||
* @ingroup krb5_auth
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_rd_req_ctx(krb5_context context,
|
||||
krb5_auth_context *auth_context,
|
||||
const krb5_data *inbuf,
|
||||
|
||||
+2
-2
@@ -31,7 +31,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <krb5_locl.h>
|
||||
#include "krb5_locl.h"
|
||||
|
||||
static krb5_error_code
|
||||
verify_checksum(krb5_context context,
|
||||
@@ -80,7 +80,7 @@ out:
|
||||
return ret;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_rd_safe(krb5_context context,
|
||||
krb5_auth_context auth_context,
|
||||
const krb5_data *inbuf,
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
#include "krb5_locl.h"
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_read_message (krb5_context context,
|
||||
krb5_pointer p_fd,
|
||||
krb5_data *data)
|
||||
@@ -69,7 +69,7 @@ krb5_read_message (krb5_context context,
|
||||
return 0;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_read_priv_message(krb5_context context,
|
||||
krb5_auth_context ac,
|
||||
krb5_pointer p_fd,
|
||||
@@ -86,7 +86,7 @@ krb5_read_priv_message(krb5_context context,
|
||||
return ret;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_read_safe_message(krb5_context context,
|
||||
krb5_auth_context ac,
|
||||
krb5_pointer p_fd,
|
||||
|
||||
+2
-2
@@ -43,7 +43,7 @@ match_exact(const void *data, const char *appl_version)
|
||||
return strcmp(data, appl_version) == 0;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_recvauth(krb5_context context,
|
||||
krb5_auth_context *auth_context,
|
||||
krb5_pointer p_fd,
|
||||
@@ -59,7 +59,7 @@ krb5_recvauth(krb5_context context,
|
||||
keytab, ticket);
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_recvauth_match_version(krb5_context context,
|
||||
krb5_auth_context *auth_context,
|
||||
krb5_pointer p_fd,
|
||||
|
||||
+16
-16
@@ -38,7 +38,7 @@ struct krb5_rcache_data {
|
||||
char *name;
|
||||
};
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_rc_resolve(krb5_context context,
|
||||
krb5_rcache id,
|
||||
const char *name)
|
||||
@@ -52,7 +52,7 @@ krb5_rc_resolve(krb5_context context,
|
||||
return 0;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_rc_resolve_type(krb5_context context,
|
||||
krb5_rcache *id,
|
||||
const char *type)
|
||||
@@ -73,7 +73,7 @@ krb5_rc_resolve_type(krb5_context context,
|
||||
return 0;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_rc_resolve_full(krb5_context context,
|
||||
krb5_rcache *id,
|
||||
const char *string_name)
|
||||
@@ -99,19 +99,19 @@ krb5_rc_resolve_full(krb5_context context,
|
||||
return ret;
|
||||
}
|
||||
|
||||
const char* KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION const char* KRB5_LIB_CALL
|
||||
krb5_rc_default_name(krb5_context context)
|
||||
{
|
||||
return "FILE:/var/run/default_rcache";
|
||||
}
|
||||
|
||||
const char* KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION const char* KRB5_LIB_CALL
|
||||
krb5_rc_default_type(krb5_context context)
|
||||
{
|
||||
return "FILE";
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_rc_default(krb5_context context,
|
||||
krb5_rcache *id)
|
||||
{
|
||||
@@ -123,7 +123,7 @@ struct rc_entry{
|
||||
unsigned char data[16];
|
||||
};
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_rc_initialize(krb5_context context,
|
||||
krb5_rcache id,
|
||||
krb5_deltat auth_lifespan)
|
||||
@@ -145,14 +145,14 @@ krb5_rc_initialize(krb5_context context,
|
||||
return 0;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_rc_recover(krb5_context context,
|
||||
krb5_rcache id)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_rc_destroy(krb5_context context,
|
||||
krb5_rcache id)
|
||||
{
|
||||
@@ -168,7 +168,7 @@ krb5_rc_destroy(krb5_context context,
|
||||
return krb5_rc_close(context, id);
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_rc_close(krb5_context context,
|
||||
krb5_rcache id)
|
||||
{
|
||||
@@ -196,7 +196,7 @@ checksum_authenticator(Authenticator *auth, void *data)
|
||||
EVP_MD_CTX_destroy(m);
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_rc_store(krb5_context context,
|
||||
krb5_rcache id,
|
||||
krb5_donot_replay *rep)
|
||||
@@ -251,14 +251,14 @@ krb5_rc_store(krb5_context context,
|
||||
return 0;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_rc_expunge(krb5_context context,
|
||||
krb5_rcache id)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_rc_get_lifespan(krb5_context context,
|
||||
krb5_rcache id,
|
||||
krb5_deltat *auth_lifespan)
|
||||
@@ -276,21 +276,21 @@ krb5_rc_get_lifespan(krb5_context context,
|
||||
return KRB5_RC_IO_UNKNOWN;
|
||||
}
|
||||
|
||||
const char* KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION const char* KRB5_LIB_CALL
|
||||
krb5_rc_get_name(krb5_context context,
|
||||
krb5_rcache id)
|
||||
{
|
||||
return id->name;
|
||||
}
|
||||
|
||||
const char* KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION const char* KRB5_LIB_CALL
|
||||
krb5_rc_get_type(krb5_context context,
|
||||
krb5_rcache id)
|
||||
{
|
||||
return "FILE";
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_get_server_rcache(krb5_context context,
|
||||
const krb5_data *piece,
|
||||
krb5_rcache *id)
|
||||
|
||||
@@ -61,7 +61,11 @@ typedef struct krb5_scache {
|
||||
#define SCACHE(X) ((krb5_scache *)(X)->data.data)
|
||||
|
||||
#define SCACHE_DEF_NAME "Default-cache"
|
||||
#ifdef KRB5_USE_PATH_TOKENS
|
||||
#define KRB5_SCACHE_DB "%{TEMP}/krb5scc_%{uid}"
|
||||
#else
|
||||
#define KRB5_SCACHE_DB "/tmp/krb5scc_%{uid}"
|
||||
#endif
|
||||
#define KRB5_SCACHE_NAME "SCC:" SCACHE_DEF_NAME ":" KRB5_SCACHE_DB
|
||||
|
||||
#define SCACHE_INVALID_CID ((sqlite_uint64)-1)
|
||||
|
||||
+27
-27
@@ -47,7 +47,7 @@ struct send_to_kdc {
|
||||
*/
|
||||
|
||||
static int
|
||||
recv_loop (int fd,
|
||||
recv_loop (SOCKET fd,
|
||||
time_t tmout,
|
||||
int udp,
|
||||
size_t limit,
|
||||
@@ -78,7 +78,7 @@ recv_loop (int fd,
|
||||
} else {
|
||||
void *tmp;
|
||||
|
||||
if (ioctl (fd, FIONREAD, &nbytes) < 0) {
|
||||
if (SOCK_IOCTL (fd, FIONREAD, &nbytes) < 0) {
|
||||
krb5_data_free (rep);
|
||||
return -1;
|
||||
}
|
||||
@@ -111,7 +111,7 @@ recv_loop (int fd,
|
||||
*/
|
||||
|
||||
static int
|
||||
send_and_recv_udp(int fd,
|
||||
send_and_recv_udp(SOCKET fd,
|
||||
time_t tmout,
|
||||
const krb5_data *req,
|
||||
krb5_data *rep)
|
||||
@@ -130,7 +130,7 @@ send_and_recv_udp(int fd,
|
||||
*/
|
||||
|
||||
static int
|
||||
send_and_recv_tcp(int fd,
|
||||
send_and_recv_tcp(SOCKET fd,
|
||||
time_t tmout,
|
||||
const krb5_data *req,
|
||||
krb5_data *rep)
|
||||
@@ -140,9 +140,9 @@ send_and_recv_tcp(int fd,
|
||||
krb5_data len_data;
|
||||
|
||||
_krb5_put_int(len, req->length, 4);
|
||||
if(net_write(fd, len, sizeof(len)) < 0)
|
||||
if(net_write_s(fd, len, sizeof(len)) < 0)
|
||||
return -1;
|
||||
if(net_write(fd, req->data, req->length) < 0)
|
||||
if(net_write_s(fd, req->data, req->length) < 0)
|
||||
return -1;
|
||||
if (recv_loop (fd, tmout, 0, 4, &len_data) < 0)
|
||||
return -1;
|
||||
@@ -162,7 +162,7 @@ send_and_recv_tcp(int fd,
|
||||
}
|
||||
|
||||
int
|
||||
_krb5_send_and_recv_tcp(int fd,
|
||||
_krb5_send_and_recv_tcp(SOCKET fd,
|
||||
time_t tmout,
|
||||
const krb5_data *req,
|
||||
krb5_data *rep)
|
||||
@@ -175,7 +175,7 @@ _krb5_send_and_recv_tcp(int fd,
|
||||
*/
|
||||
|
||||
static int
|
||||
send_and_recv_http(int fd,
|
||||
send_and_recv_http(SOCKET fd,
|
||||
time_t tmout,
|
||||
const char *prefix,
|
||||
const krb5_data *req,
|
||||
@@ -192,7 +192,7 @@ send_and_recv_http(int fd,
|
||||
free(str);
|
||||
if (request == NULL)
|
||||
return -1;
|
||||
ret = net_write (fd, request, strlen(request));
|
||||
ret = net_write_s (fd, request, strlen(request));
|
||||
free (request);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
@@ -264,7 +264,7 @@ send_via_proxy (krb5_context context,
|
||||
struct addrinfo hints;
|
||||
struct addrinfo *ai, *a;
|
||||
int ret;
|
||||
int s = -1;
|
||||
SOCKET s = INVALID_SOCKET;
|
||||
char portstr[NI_MAXSERV];
|
||||
|
||||
if (proxy == NULL)
|
||||
@@ -291,7 +291,7 @@ send_via_proxy (krb5_context context,
|
||||
continue;
|
||||
rk_cloexec(s);
|
||||
if (connect (s, a->ai_addr, a->ai_addrlen) < 0) {
|
||||
close (s);
|
||||
closesocket (s);
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
@@ -309,7 +309,7 @@ send_via_proxy (krb5_context context,
|
||||
}
|
||||
ret = send_and_recv_http(s, context->kdc_timeout,
|
||||
prefix, send_data, receive);
|
||||
close (s);
|
||||
closesocket (s);
|
||||
free(prefix);
|
||||
if(ret == 0 && receive->length != 0)
|
||||
return 0;
|
||||
@@ -361,14 +361,14 @@ send_via_plugin(krb5_context context,
|
||||
* in `receive'.
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_sendto (krb5_context context,
|
||||
const krb5_data *send_data,
|
||||
krb5_krbhst_handle handle,
|
||||
krb5_data *receive)
|
||||
{
|
||||
krb5_error_code ret;
|
||||
int fd;
|
||||
SOCKET fd;
|
||||
int i;
|
||||
|
||||
krb5_data_zero(receive);
|
||||
@@ -418,7 +418,7 @@ krb5_sendto (krb5_context context,
|
||||
continue;
|
||||
rk_cloexec(fd);
|
||||
if (connect (fd, a->ai_addr, a->ai_addrlen) < 0) {
|
||||
close (fd);
|
||||
closesocket (fd);
|
||||
continue;
|
||||
}
|
||||
switch (hi->proto) {
|
||||
@@ -435,7 +435,7 @@ krb5_sendto (krb5_context context,
|
||||
send_data, receive);
|
||||
break;
|
||||
}
|
||||
close (fd);
|
||||
closesocket (fd);
|
||||
if(ret == 0 && receive->length != 0)
|
||||
goto out;
|
||||
}
|
||||
@@ -451,7 +451,7 @@ out:
|
||||
return ret;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_sendto_kdc(krb5_context context,
|
||||
const krb5_data *send_data,
|
||||
const krb5_realm *realm,
|
||||
@@ -460,7 +460,7 @@ krb5_sendto_kdc(krb5_context context,
|
||||
return krb5_sendto_kdc_flags(context, send_data, realm, receive, 0);
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_sendto_kdc_flags(krb5_context context,
|
||||
const krb5_data *send_data,
|
||||
const krb5_realm *realm,
|
||||
@@ -481,7 +481,7 @@ krb5_sendto_kdc_flags(krb5_context context,
|
||||
return ret;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_set_send_to_kdc_func(krb5_context context,
|
||||
krb5_send_to_kdc_func func,
|
||||
void *data)
|
||||
@@ -504,7 +504,7 @@ krb5_set_send_to_kdc_func(krb5_context context,
|
||||
return 0;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
_krb5_copy_send_to_kdc_func(krb5_context context, krb5_context to)
|
||||
{
|
||||
if (context->send_to_kdc)
|
||||
@@ -524,7 +524,7 @@ struct krb5_sendto_ctx_data {
|
||||
void *data;
|
||||
};
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_sendto_ctx_alloc(krb5_context context, krb5_sendto_ctx *ctx)
|
||||
{
|
||||
*ctx = calloc(1, sizeof(**ctx));
|
||||
@@ -536,26 +536,26 @@ krb5_sendto_ctx_alloc(krb5_context context, krb5_sendto_ctx *ctx)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_sendto_ctx_add_flags(krb5_sendto_ctx ctx, int flags)
|
||||
{
|
||||
ctx->flags |= flags;
|
||||
}
|
||||
|
||||
int KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION int KRB5_LIB_CALL
|
||||
krb5_sendto_ctx_get_flags(krb5_sendto_ctx ctx)
|
||||
{
|
||||
return ctx->flags;
|
||||
}
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_sendto_ctx_set_type(krb5_sendto_ctx ctx, int type)
|
||||
{
|
||||
ctx->type = type;
|
||||
}
|
||||
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_sendto_ctx_set_func(krb5_sendto_ctx ctx,
|
||||
krb5_sendto_ctx_func func,
|
||||
void *data)
|
||||
@@ -564,14 +564,14 @@ krb5_sendto_ctx_set_func(krb5_sendto_ctx ctx,
|
||||
ctx->data = data;
|
||||
}
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_sendto_ctx_free(krb5_context context, krb5_sendto_ctx ctx)
|
||||
{
|
||||
memset(ctx, 0, sizeof(*ctx));
|
||||
free(ctx);
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_sendto_context(krb5_context context,
|
||||
krb5_sendto_ctx ctx,
|
||||
const krb5_data *send_data,
|
||||
|
||||
+1
-1
@@ -60,7 +60,7 @@
|
||||
* }
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_sendauth(krb5_context context,
|
||||
krb5_auth_context *auth_context,
|
||||
krb5_pointer p_fd,
|
||||
|
||||
@@ -65,7 +65,7 @@ string_to_list (krb5_context context, const char *s, krb5_realm **list)
|
||||
* Otherwise, the realm(s) are figured out from configuration or DNS.
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_set_default_realm(krb5_context context,
|
||||
const char *realm)
|
||||
{
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
#include "krb5_locl.h"
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_sock_to_principal (krb5_context context,
|
||||
int sock,
|
||||
const char *sname,
|
||||
|
||||
+52
-51
@@ -49,7 +49,7 @@
|
||||
* @ingroup krb5_storage
|
||||
*/
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_storage_set_flags(krb5_storage *sp, krb5_flags flags)
|
||||
{
|
||||
sp->flags |= flags;
|
||||
@@ -64,7 +64,7 @@ krb5_storage_set_flags(krb5_storage *sp, krb5_flags flags)
|
||||
* @ingroup krb5_storage
|
||||
*/
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_storage_clear_flags(krb5_storage *sp, krb5_flags flags)
|
||||
{
|
||||
sp->flags &= ~flags;
|
||||
@@ -82,7 +82,7 @@ krb5_storage_clear_flags(krb5_storage *sp, krb5_flags flags)
|
||||
* @ingroup krb5_storage
|
||||
*/
|
||||
|
||||
krb5_boolean KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_boolean KRB5_LIB_CALL
|
||||
krb5_storage_is_flags(krb5_storage *sp, krb5_flags flags)
|
||||
{
|
||||
return (sp->flags & flags) == flags;
|
||||
@@ -100,7 +100,7 @@ krb5_storage_is_flags(krb5_storage *sp, krb5_flags flags)
|
||||
* @ingroup krb5_storage
|
||||
*/
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_storage_set_byteorder(krb5_storage *sp, krb5_flags byteorder)
|
||||
{
|
||||
sp->flags &= ~KRB5_STORAGE_BYTEORDER_MASK;
|
||||
@@ -113,7 +113,7 @@ krb5_storage_set_byteorder(krb5_storage *sp, krb5_flags byteorder)
|
||||
* @ingroup krb5_storage
|
||||
*/
|
||||
|
||||
krb5_flags KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_flags KRB5_LIB_CALL
|
||||
krb5_storage_get_byteorder(krb5_storage *sp)
|
||||
{
|
||||
return sp->flags & KRB5_STORAGE_BYTEORDER_MASK;
|
||||
@@ -132,7 +132,7 @@ krb5_storage_get_byteorder(krb5_storage *sp)
|
||||
* @ingroup krb5_storage
|
||||
*/
|
||||
|
||||
off_t KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION off_t KRB5_LIB_CALL
|
||||
krb5_storage_seek(krb5_storage *sp, off_t offset, int whence)
|
||||
{
|
||||
return (*sp->seek)(sp, offset, whence);
|
||||
@@ -149,7 +149,7 @@ krb5_storage_seek(krb5_storage *sp, off_t offset, int whence)
|
||||
* @ingroup krb5_storage
|
||||
*/
|
||||
|
||||
int KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION int KRB5_LIB_CALL
|
||||
krb5_storage_truncate(krb5_storage *sp, off_t offset)
|
||||
{
|
||||
return (*sp->trunc)(sp, offset);
|
||||
@@ -167,7 +167,7 @@ krb5_storage_truncate(krb5_storage *sp, off_t offset)
|
||||
* @ingroup krb5_storage
|
||||
*/
|
||||
|
||||
krb5_ssize_t KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_ssize_t KRB5_LIB_CALL
|
||||
krb5_storage_read(krb5_storage *sp, void *buf, size_t len)
|
||||
{
|
||||
return sp->fetch(sp, buf, len);
|
||||
@@ -185,7 +185,7 @@ krb5_storage_read(krb5_storage *sp, void *buf, size_t len)
|
||||
* @ingroup krb5_storage
|
||||
*/
|
||||
|
||||
krb5_ssize_t KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_ssize_t KRB5_LIB_CALL
|
||||
krb5_storage_write(krb5_storage *sp, const void *buf, size_t len)
|
||||
{
|
||||
return sp->store(sp, buf, len);
|
||||
@@ -200,7 +200,7 @@ krb5_storage_write(krb5_storage *sp, const void *buf, size_t len)
|
||||
* @ingroup krb5_storage
|
||||
*/
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_storage_set_eof_code(krb5_storage *sp, int code)
|
||||
{
|
||||
sp->eof_code = code;
|
||||
@@ -216,13 +216,13 @@ krb5_storage_set_eof_code(krb5_storage *sp, int code)
|
||||
* @ingroup krb5_storage
|
||||
*/
|
||||
|
||||
int KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION int KRB5_LIB_CALL
|
||||
krb5_storage_get_eof_code(krb5_storage *sp)
|
||||
{
|
||||
return sp->eof_code;
|
||||
}
|
||||
|
||||
krb5_ssize_t KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_ssize_t KRB5_LIB_CALL
|
||||
_krb5_put_int(void *buffer, unsigned long value, size_t size)
|
||||
{
|
||||
unsigned char *p = buffer;
|
||||
@@ -234,7 +234,7 @@ _krb5_put_int(void *buffer, unsigned long value, size_t size)
|
||||
return size;
|
||||
}
|
||||
|
||||
krb5_ssize_t KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_ssize_t KRB5_LIB_CALL
|
||||
_krb5_get_int(void *buffer, unsigned long *value, size_t size)
|
||||
{
|
||||
unsigned char *p = buffer;
|
||||
@@ -256,7 +256,7 @@ _krb5_get_int(void *buffer, unsigned long *value, size_t size)
|
||||
* @ingroup krb5_storage
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_storage_free(krb5_storage *sp)
|
||||
{
|
||||
if(sp->free)
|
||||
@@ -277,7 +277,7 @@ krb5_storage_free(krb5_storage *sp)
|
||||
* @ingroup krb5_storage
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_storage_to_data(krb5_storage *sp, krb5_data *data)
|
||||
{
|
||||
off_t pos, size;
|
||||
@@ -331,7 +331,7 @@ krb5_store_int(krb5_storage *sp,
|
||||
* @ingroup krb5_storage
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_store_int32(krb5_storage *sp,
|
||||
int32_t value)
|
||||
{
|
||||
@@ -354,7 +354,7 @@ krb5_store_int32(krb5_storage *sp,
|
||||
* @ingroup krb5_storage
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_store_uint32(krb5_storage *sp,
|
||||
uint32_t value)
|
||||
{
|
||||
@@ -389,7 +389,7 @@ krb5_ret_int(krb5_storage *sp,
|
||||
* @ingroup krb5_storage
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_ret_int32(krb5_storage *sp,
|
||||
int32_t *value)
|
||||
{
|
||||
@@ -415,7 +415,7 @@ krb5_ret_int32(krb5_storage *sp,
|
||||
* @ingroup krb5_storage
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_ret_uint32(krb5_storage *sp,
|
||||
uint32_t *value)
|
||||
{
|
||||
@@ -441,7 +441,7 @@ krb5_ret_uint32(krb5_storage *sp,
|
||||
* @ingroup krb5_storage
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_store_int16(krb5_storage *sp,
|
||||
int16_t value)
|
||||
{
|
||||
@@ -464,7 +464,7 @@ krb5_store_int16(krb5_storage *sp,
|
||||
* @ingroup krb5_storage
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_store_uint16(krb5_storage *sp,
|
||||
uint16_t value)
|
||||
{
|
||||
@@ -482,7 +482,8 @@ krb5_store_uint16(krb5_storage *sp,
|
||||
*
|
||||
* @ingroup krb5_storage
|
||||
*/
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_ret_int16(krb5_storage *sp,
|
||||
int16_t *value)
|
||||
{
|
||||
@@ -511,7 +512,7 @@ krb5_ret_int16(krb5_storage *sp,
|
||||
* @ingroup krb5_storage
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_ret_uint16(krb5_storage *sp,
|
||||
uint16_t *value)
|
||||
{
|
||||
@@ -536,7 +537,7 @@ krb5_ret_uint16(krb5_storage *sp,
|
||||
* @ingroup krb5_storage
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_store_int8(krb5_storage *sp,
|
||||
int8_t value)
|
||||
{
|
||||
@@ -559,7 +560,7 @@ krb5_store_int8(krb5_storage *sp,
|
||||
* @ingroup krb5_storage
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_store_uint8(krb5_storage *sp,
|
||||
uint8_t value)
|
||||
{
|
||||
@@ -577,7 +578,7 @@ krb5_store_uint8(krb5_storage *sp,
|
||||
* @ingroup krb5_storage
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_ret_int8(krb5_storage *sp,
|
||||
int8_t *value)
|
||||
{
|
||||
@@ -600,7 +601,7 @@ krb5_ret_int8(krb5_storage *sp,
|
||||
* @ingroup krb5_storage
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_ret_uint8(krb5_storage *sp,
|
||||
uint8_t *value)
|
||||
{
|
||||
@@ -626,7 +627,7 @@ krb5_ret_uint8(krb5_storage *sp,
|
||||
* @ingroup krb5_storage
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_store_data(krb5_storage *sp,
|
||||
krb5_data data)
|
||||
{
|
||||
@@ -654,7 +655,7 @@ krb5_store_data(krb5_storage *sp,
|
||||
* @ingroup krb5_storage
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_ret_data(krb5_storage *sp,
|
||||
krb5_data *data)
|
||||
{
|
||||
@@ -687,7 +688,7 @@ krb5_ret_data(krb5_storage *sp,
|
||||
* @ingroup krb5_storage
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_store_string(krb5_storage *sp, const char *s)
|
||||
{
|
||||
krb5_data data;
|
||||
@@ -708,7 +709,7 @@ krb5_store_string(krb5_storage *sp, const char *s)
|
||||
*/
|
||||
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_ret_string(krb5_storage *sp,
|
||||
char **string)
|
||||
{
|
||||
@@ -738,7 +739,7 @@ krb5_ret_string(krb5_storage *sp,
|
||||
* @ingroup krb5_storage
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_store_stringz(krb5_storage *sp, const char *s)
|
||||
{
|
||||
size_t len = strlen(s) + 1;
|
||||
@@ -765,7 +766,7 @@ krb5_store_stringz(krb5_storage *sp, const char *s)
|
||||
* @ingroup krb5_storage
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_ret_stringz(krb5_storage *sp,
|
||||
char **string)
|
||||
{
|
||||
@@ -798,7 +799,7 @@ krb5_ret_stringz(krb5_storage *sp,
|
||||
return 0;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_store_stringnl(krb5_storage *sp, const char *s)
|
||||
{
|
||||
size_t len = strlen(s);
|
||||
@@ -823,7 +824,7 @@ krb5_store_stringnl(krb5_storage *sp, const char *s)
|
||||
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_ret_stringnl(krb5_storage *sp,
|
||||
char **string)
|
||||
{
|
||||
@@ -879,7 +880,7 @@ krb5_ret_stringnl(krb5_storage *sp,
|
||||
* @ingroup krb5_storage
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_store_principal(krb5_storage *sp,
|
||||
krb5_const_principal p)
|
||||
{
|
||||
@@ -916,7 +917,7 @@ krb5_store_principal(krb5_storage *sp,
|
||||
* @ingroup krb5_storage
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_ret_principal(krb5_storage *sp,
|
||||
krb5_principal *princ)
|
||||
{
|
||||
@@ -984,7 +985,7 @@ krb5_ret_principal(krb5_storage *sp,
|
||||
* @ingroup krb5_storage
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_store_keyblock(krb5_storage *sp, krb5_keyblock p)
|
||||
{
|
||||
int ret;
|
||||
@@ -1013,7 +1014,7 @@ krb5_store_keyblock(krb5_storage *sp, krb5_keyblock p)
|
||||
* @ingroup krb5_storage
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_ret_keyblock(krb5_storage *sp, krb5_keyblock *p)
|
||||
{
|
||||
int ret;
|
||||
@@ -1043,7 +1044,7 @@ krb5_ret_keyblock(krb5_storage *sp, krb5_keyblock *p)
|
||||
* @ingroup krb5_storage
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_store_times(krb5_storage *sp, krb5_times times)
|
||||
{
|
||||
int ret;
|
||||
@@ -1068,7 +1069,7 @@ krb5_store_times(krb5_storage *sp, krb5_times times)
|
||||
* @ingroup krb5_storage
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_ret_times(krb5_storage *sp, krb5_times *times)
|
||||
{
|
||||
int ret;
|
||||
@@ -1098,7 +1099,7 @@ krb5_ret_times(krb5_storage *sp, krb5_times *times)
|
||||
* @ingroup krb5_storage
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_store_address(krb5_storage *sp, krb5_address p)
|
||||
{
|
||||
int ret;
|
||||
@@ -1119,7 +1120,7 @@ krb5_store_address(krb5_storage *sp, krb5_address p)
|
||||
* @ingroup krb5_storage
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_ret_address(krb5_storage *sp, krb5_address *adr)
|
||||
{
|
||||
int16_t t;
|
||||
@@ -1142,7 +1143,7 @@ krb5_ret_address(krb5_storage *sp, krb5_address *adr)
|
||||
* @ingroup krb5_storage
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_store_addrs(krb5_storage *sp, krb5_addresses p)
|
||||
{
|
||||
int i;
|
||||
@@ -1167,7 +1168,7 @@ krb5_store_addrs(krb5_storage *sp, krb5_addresses p)
|
||||
* @ingroup krb5_storage
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_ret_addrs(krb5_storage *sp, krb5_addresses *adr)
|
||||
{
|
||||
int i;
|
||||
@@ -1198,7 +1199,7 @@ krb5_ret_addrs(krb5_storage *sp, krb5_addresses *adr)
|
||||
* @ingroup krb5_storage
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_store_authdata(krb5_storage *sp, krb5_authdata auth)
|
||||
{
|
||||
krb5_error_code ret;
|
||||
@@ -1225,7 +1226,7 @@ krb5_store_authdata(krb5_storage *sp, krb5_authdata auth)
|
||||
* @ingroup krb5_storage
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_ret_authdata(krb5_storage *sp, krb5_authdata *auth)
|
||||
{
|
||||
krb5_error_code ret;
|
||||
@@ -1270,7 +1271,7 @@ bitswap32(int32_t b)
|
||||
* @ingroup krb5_storage
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_store_creds(krb5_storage *sp, krb5_creds *creds)
|
||||
{
|
||||
int ret;
|
||||
@@ -1322,7 +1323,7 @@ krb5_store_creds(krb5_storage *sp, krb5_creds *creds)
|
||||
* @ingroup krb5_storage
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_ret_creds(krb5_storage *sp, krb5_creds *creds)
|
||||
{
|
||||
krb5_error_code ret;
|
||||
@@ -1394,7 +1395,7 @@ cleanup:
|
||||
* @ingroup krb5_storage
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_store_creds_tag(krb5_storage *sp, krb5_creds *creds)
|
||||
{
|
||||
int ret;
|
||||
@@ -1486,7 +1487,7 @@ krb5_store_creds_tag(krb5_storage *sp, krb5_creds *creds)
|
||||
* @ingroup krb5_storage
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_ret_creds_tag(krb5_storage *sp,
|
||||
krb5_creds *creds)
|
||||
{
|
||||
|
||||
@@ -158,7 +158,7 @@ emem_free(krb5_storage *sp)
|
||||
* @sa krb5_storage_from_data()
|
||||
*/
|
||||
|
||||
krb5_storage * KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_storage * KRB5_LIB_CALL
|
||||
krb5_storage_emem(void)
|
||||
{
|
||||
krb5_storage *sp;
|
||||
|
||||
+1
-1
@@ -85,7 +85,7 @@ fd_free(krb5_storage * sp)
|
||||
* @sa krb5_storage_from_data()
|
||||
*/
|
||||
|
||||
krb5_storage * KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_storage * KRB5_LIB_CALL
|
||||
krb5_storage_from_fd(int fd)
|
||||
{
|
||||
krb5_storage *sp;
|
||||
|
||||
@@ -122,7 +122,7 @@ mem_no_trunc(krb5_storage *sp, off_t offset)
|
||||
* @sa krb5_storage_from_fd()
|
||||
*/
|
||||
|
||||
krb5_storage * KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_storage * KRB5_LIB_CALL
|
||||
krb5_storage_from_mem(void *buf, size_t len)
|
||||
{
|
||||
krb5_storage *sp = malloc(sizeof(krb5_storage));
|
||||
@@ -161,7 +161,7 @@ krb5_storage_from_mem(void *buf, size_t len)
|
||||
* @sa krb5_storage_from_fd()
|
||||
*/
|
||||
|
||||
krb5_storage * KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_storage * KRB5_LIB_CALL
|
||||
krb5_storage_from_data(krb5_data *data)
|
||||
{
|
||||
return krb5_storage_from_mem(data->data, data->length);
|
||||
@@ -180,7 +180,7 @@ krb5_storage_from_data(krb5_data *data)
|
||||
* @sa krb5_storage_from_fd()
|
||||
*/
|
||||
|
||||
krb5_storage * KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_storage * KRB5_LIB_CALL
|
||||
krb5_storage_from_readonly_mem(const void *buf, size_t len)
|
||||
{
|
||||
krb5_storage *sp = malloc(sizeof(krb5_storage));
|
||||
|
||||
@@ -155,12 +155,41 @@ match_addr(krb5_context context, const char *range_addr,
|
||||
krb5_free_addresses(context, &one);
|
||||
}
|
||||
|
||||
#ifdef _MSC_VER
|
||||
|
||||
/* For the truncation tests, calling strcpy_s() or strcat_s() with a
|
||||
size of 0 results in the invalid parameter handler being invoked.
|
||||
For the debug version, the runtime also throws an assert. */
|
||||
|
||||
static void
|
||||
inv_param_handler(const wchar_t* expression,
|
||||
const wchar_t* function,
|
||||
const wchar_t* file,
|
||||
unsigned int line,
|
||||
uintptr_t pReserved)
|
||||
{
|
||||
printf("Invalid parameter handler invoked for: %S in %S(%d) [%S]\n",
|
||||
function, file, line, expression);
|
||||
}
|
||||
|
||||
static _invalid_parameter_handler _inv_old = NULL;
|
||||
|
||||
#define SET_INVALID_PARAM_HANDLER _inv_old = _set_invalid_parameter_handler(inv_param_handler)
|
||||
|
||||
#else
|
||||
|
||||
#define SET_INVALID_PARAM_HANDLER ((void) 0)
|
||||
|
||||
#endif
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
krb5_context context;
|
||||
krb5_error_code ret;
|
||||
|
||||
SET_INVALID_PARAM_HANDLER;
|
||||
|
||||
setprogname(argv[0]);
|
||||
|
||||
ret = krb5_init_context(&context);
|
||||
|
||||
+27
-1
@@ -38,11 +38,17 @@ static int debug_flag = 0;
|
||||
static int version_flag = 0;
|
||||
static int help_flag = 0;
|
||||
|
||||
#ifdef KRB5_USE_PATH_TOKENS
|
||||
#define TEST_CC_NAME "%{TEMP}/krb5-cc-test-foo"
|
||||
#else
|
||||
#define TEST_CC_NAME "/tmp/krb5-cc-test-foo"
|
||||
#endif
|
||||
|
||||
static void
|
||||
test_default_name(krb5_context context)
|
||||
{
|
||||
krb5_error_code ret;
|
||||
const char *p, *test_cc_name = "/tmp/krb5-cc-test-foo";
|
||||
const char *p, *test_cc_name = TEST_CC_NAME;
|
||||
char *p1, *p2, *p3;
|
||||
|
||||
p = krb5_cc_default_name(context);
|
||||
@@ -71,6 +77,14 @@ test_default_name(krb5_context context)
|
||||
krb5_errx (context, 1, "krb5_cc_default_name 2 failed");
|
||||
p3 = estrdup(p);
|
||||
|
||||
#ifndef KRB5_USE_PATH_TOKENS
|
||||
/* If we are using path tokens, we don't expect the p3 and
|
||||
test_cc_name to match since p3 is going to have expanded
|
||||
tokens. */
|
||||
if (strcmp(p3, test_cc_name) != 0)
|
||||
krb5_errx (context, 1, "krb5_cc_set_default_name 1 failed");
|
||||
#endif
|
||||
|
||||
if (strcmp(p3, test_cc_name) != 0)
|
||||
krb5_errx (context, 1, "krb5_cc_set_default_name 1 failed");
|
||||
|
||||
@@ -284,6 +298,16 @@ struct {
|
||||
{ "%{", 1 },
|
||||
{ "%{foo %{", 1 },
|
||||
{ "%{{", 1 },
|
||||
#ifdef KRB5_USE_PATH_TOKENS
|
||||
{ "%{APPDATA}", 0 },
|
||||
{ "%{COMMON_APPDATA}", 0},
|
||||
{ "%{LOCAL_APPDATA}", 0},
|
||||
{ "%{SYSTEM}", 0},
|
||||
{ "%{WINDOWS}", 0},
|
||||
{ "%{TEMP}", 0},
|
||||
{ "%{USERID}", 0},
|
||||
{ "%{uid}", 0},
|
||||
#endif
|
||||
};
|
||||
|
||||
static void
|
||||
@@ -671,7 +695,9 @@ main(int argc, char **argv)
|
||||
|
||||
test_move(context, krb5_cc_type_file);
|
||||
test_move(context, krb5_cc_type_memory);
|
||||
#ifdef HAVE_KCM
|
||||
test_move(context, krb5_cc_type_kcm);
|
||||
#endif
|
||||
test_move(context, krb5_cc_type_scc);
|
||||
|
||||
test_prefix_ops(context, "FILE:/tmp/foo", &krb5_fcc_ops);
|
||||
|
||||
+6
-6
@@ -47,7 +47,7 @@
|
||||
* @ingroup krb5
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_free_ticket(krb5_context context,
|
||||
krb5_ticket *ticket)
|
||||
{
|
||||
@@ -71,7 +71,7 @@ krb5_free_ticket(krb5_context context,
|
||||
* @ingroup krb5
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_copy_ticket(krb5_context context,
|
||||
const krb5_ticket *from,
|
||||
krb5_ticket **to)
|
||||
@@ -120,7 +120,7 @@ krb5_copy_ticket(krb5_context context,
|
||||
* @ingroup krb5
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_ticket_get_client(krb5_context context,
|
||||
const krb5_ticket *ticket,
|
||||
krb5_principal *client)
|
||||
@@ -141,7 +141,7 @@ krb5_ticket_get_client(krb5_context context,
|
||||
* @ingroup krb5
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_ticket_get_server(krb5_context context,
|
||||
const krb5_ticket *ticket,
|
||||
krb5_principal *server)
|
||||
@@ -160,7 +160,7 @@ krb5_ticket_get_server(krb5_context context,
|
||||
* @ingroup krb5
|
||||
*/
|
||||
|
||||
time_t KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION time_t KRB5_LIB_CALL
|
||||
krb5_ticket_get_endtime(krb5_context context,
|
||||
const krb5_ticket *ticket)
|
||||
{
|
||||
@@ -338,7 +338,7 @@ out:
|
||||
* @ingroup krb5
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_ticket_get_authorization_data_type(krb5_context context,
|
||||
krb5_ticket *ticket,
|
||||
int type,
|
||||
|
||||
+5
-5
@@ -47,7 +47,7 @@
|
||||
* @ingroup krb5
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_set_real_time (krb5_context context,
|
||||
krb5_timestamp sec,
|
||||
int32_t usec)
|
||||
@@ -79,7 +79,7 @@ krb5_set_real_time (krb5_context context,
|
||||
* return ``corrected'' time in `timeret'.
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_timeofday (krb5_context context,
|
||||
krb5_timestamp *timeret)
|
||||
{
|
||||
@@ -91,7 +91,7 @@ krb5_timeofday (krb5_context context,
|
||||
* like gettimeofday but with time correction to the KDC
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_us_timeofday (krb5_context context,
|
||||
krb5_timestamp *sec,
|
||||
int32_t *usec)
|
||||
@@ -105,7 +105,7 @@ krb5_us_timeofday (krb5_context context,
|
||||
return 0;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_format_time(krb5_context context, time_t t,
|
||||
char *s, size_t len, krb5_boolean include_time)
|
||||
{
|
||||
@@ -120,7 +120,7 @@ krb5_format_time(krb5_context context, time_t t,
|
||||
return 0;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_string_to_deltat(const char *string, krb5_deltat *deltat)
|
||||
{
|
||||
if((*deltat = parse_time(string, "s")) == -1)
|
||||
|
||||
@@ -328,7 +328,7 @@ decode_realms(krb5_context context,
|
||||
}
|
||||
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_domain_x500_decode(krb5_context context,
|
||||
krb5_data tr, char ***realms, unsigned int *num_realms,
|
||||
const char *client_realm, const char *server_realm)
|
||||
@@ -389,7 +389,7 @@ krb5_domain_x500_decode(krb5_context context,
|
||||
return 0;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_domain_x500_encode(char **realms, unsigned int num_realms,
|
||||
krb5_data *encoding)
|
||||
{
|
||||
@@ -421,7 +421,7 @@ krb5_domain_x500_encode(char **realms, unsigned int num_realms,
|
||||
return 0;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_check_transited(krb5_context context,
|
||||
krb5_const_realm client_realm,
|
||||
krb5_const_realm server_realm,
|
||||
@@ -461,7 +461,7 @@ krb5_check_transited(krb5_context context,
|
||||
return 0;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_check_transited_realms(krb5_context context,
|
||||
const char *const *realms,
|
||||
unsigned int num_realms,
|
||||
|
||||
+17
-11
@@ -58,7 +58,7 @@ static const int _tkt_lifetimes[TKTLIFENUMFIXED] = {
|
||||
1623226, 1735464, 1855462, 1983758, 2120925, 2267576, 2424367, 2592000
|
||||
};
|
||||
|
||||
int KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION int KRB5_LIB_CALL
|
||||
_krb5_krb_time_to_life(time_t start, time_t end)
|
||||
{
|
||||
int i;
|
||||
@@ -82,7 +82,7 @@ _krb5_krb_time_to_life(time_t start, time_t end)
|
||||
|
||||
}
|
||||
|
||||
time_t KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION time_t KRB5_LIB_CALL
|
||||
_krb5_krb_life_to_time(int start, int life_)
|
||||
{
|
||||
unsigned char life = (unsigned char) life_;
|
||||
@@ -118,9 +118,15 @@ get_krb4_cc_name(const char *tkfile, char **cc)
|
||||
if (path)
|
||||
*cc = strdup(path);
|
||||
}
|
||||
#ifdef HAVE_GETUID
|
||||
if(*cc == NULL)
|
||||
if (asprintf(cc, "%s%u", TKT_ROOT, (unsigned)getuid()) < 0)
|
||||
return errno;
|
||||
#elif defined(KRB5_USE_PATH_TOKENS)
|
||||
if(*cc == NULL)
|
||||
if (_krb5_expand_path_tokens(NULL, TKT_ROOT "%{uid}", cc))
|
||||
return ENOMEM;
|
||||
#endif
|
||||
} else {
|
||||
*cc = strdup(tkfile);
|
||||
if (*cc == NULL)
|
||||
@@ -232,7 +238,7 @@ write_v4_cc(krb5_context context, const char *tkfile,
|
||||
*
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
_krb5_krb_tf_setup(krb5_context context,
|
||||
struct credentials *v4creds,
|
||||
const char *tkfile,
|
||||
@@ -288,7 +294,7 @@ _krb5_krb_tf_setup(krb5_context context,
|
||||
*
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
_krb5_krb_dest_tkt(krb5_context context, const char *tkfile)
|
||||
{
|
||||
krb5_error_code ret;
|
||||
@@ -405,7 +411,7 @@ put_nir(krb5_storage *sp, const char *name,
|
||||
*
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
_krb5_krb_create_ticket(krb5_context context,
|
||||
unsigned char flags,
|
||||
const char *pname,
|
||||
@@ -464,7 +470,7 @@ _krb5_krb_create_ticket(krb5_context context,
|
||||
*
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
_krb5_krb_create_ciph(krb5_context context,
|
||||
const krb5_keyblock *session,
|
||||
const char *service,
|
||||
@@ -524,7 +530,7 @@ _krb5_krb_create_ciph(krb5_context context,
|
||||
*
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
_krb5_krb_create_auth_reply(krb5_context context,
|
||||
const char *pname,
|
||||
const char *pinst,
|
||||
@@ -577,7 +583,7 @@ _krb5_krb_create_auth_reply(krb5_context context,
|
||||
*
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
_krb5_krb_cr_err_reply(krb5_context context,
|
||||
const char *name,
|
||||
const char *inst,
|
||||
@@ -644,7 +650,7 @@ get_v4_stringz(krb5_storage *sp, char **str, size_t max_len)
|
||||
*
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
_krb5_krb_decomp_ticket(krb5_context context,
|
||||
const krb5_data *enc_ticket,
|
||||
const krb5_keyblock *key,
|
||||
@@ -738,7 +744,7 @@ _krb5_krb_decomp_ticket(krb5_context context,
|
||||
*
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
_krb5_krb_rd_req(krb5_context context,
|
||||
krb5_data *authent,
|
||||
const char *service,
|
||||
@@ -938,7 +944,7 @@ _krb5_krb_rd_req(krb5_context context,
|
||||
*
|
||||
*/
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
_krb5_krb_free_auth_data(krb5_context context, struct _krb5_krb_auth_data *ad)
|
||||
{
|
||||
if (ad->pname)
|
||||
|
||||
@@ -33,13 +33,13 @@
|
||||
|
||||
#include "krb5_locl.h"
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_verify_init_creds_opt_init(krb5_verify_init_creds_opt *options)
|
||||
{
|
||||
memset (options, 0, sizeof(*options));
|
||||
}
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_verify_init_creds_opt_set_ap_req_nofail(krb5_verify_init_creds_opt *options,
|
||||
int ap_req_nofail)
|
||||
{
|
||||
@@ -67,7 +67,7 @@ fail_verify_is_ok (krb5_context context,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_verify_init_creds(krb5_context context,
|
||||
krb5_creds *creds,
|
||||
krb5_principal ap_req_server,
|
||||
|
||||
+11
-11
@@ -88,7 +88,7 @@ verify_common (krb5_context context,
|
||||
* As a side effect, fresh tickets are obtained and stored in `ccache'.
|
||||
*/
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_verify_opt_init(krb5_verify_opt *opt)
|
||||
{
|
||||
memset(opt, 0, sizeof(*opt));
|
||||
@@ -96,7 +96,7 @@ krb5_verify_opt_init(krb5_verify_opt *opt)
|
||||
opt->service = "host";
|
||||
}
|
||||
|
||||
int KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION int KRB5_LIB_CALL
|
||||
krb5_verify_opt_alloc(krb5_context context, krb5_verify_opt **opt)
|
||||
{
|
||||
*opt = calloc(1, sizeof(**opt));
|
||||
@@ -109,37 +109,37 @@ krb5_verify_opt_alloc(krb5_context context, krb5_verify_opt **opt)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_verify_opt_free(krb5_verify_opt *opt)
|
||||
{
|
||||
free(opt);
|
||||
}
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_verify_opt_set_ccache(krb5_verify_opt *opt, krb5_ccache ccache)
|
||||
{
|
||||
opt->ccache = ccache;
|
||||
}
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_verify_opt_set_keytab(krb5_verify_opt *opt, krb5_keytab keytab)
|
||||
{
|
||||
opt->keytab = keytab;
|
||||
}
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_verify_opt_set_secure(krb5_verify_opt *opt, krb5_boolean secure)
|
||||
{
|
||||
opt->secure = secure;
|
||||
}
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_verify_opt_set_service(krb5_verify_opt *opt, const char *service)
|
||||
{
|
||||
opt->service = service;
|
||||
}
|
||||
|
||||
void KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION void KRB5_LIB_CALL
|
||||
krb5_verify_opt_set_flags(krb5_verify_opt *opt, unsigned int flags)
|
||||
{
|
||||
opt->flags |= flags;
|
||||
@@ -181,7 +181,7 @@ verify_user_opt_int(krb5_context context,
|
||||
#undef OPT
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_verify_user_opt(krb5_context context,
|
||||
krb5_principal principal,
|
||||
const char *password,
|
||||
@@ -215,7 +215,7 @@ krb5_verify_user_opt(krb5_context context,
|
||||
|
||||
/* compat function that calls above */
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_verify_user(krb5_context context,
|
||||
krb5_principal principal,
|
||||
krb5_ccache ccache,
|
||||
@@ -239,7 +239,7 @@ krb5_verify_user(krb5_context context,
|
||||
* ignored and all the local realms are tried.
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_verify_user_lrealm(krb5_context context,
|
||||
krb5_principal principal,
|
||||
krb5_ccache ccache,
|
||||
|
||||
+14
-14
@@ -100,7 +100,7 @@ _warnerr(krb5_context context, int do_errtext,
|
||||
* @ingroup krb5_error
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_vwarn(krb5_context context, krb5_error_code code,
|
||||
const char *fmt, va_list ap)
|
||||
__attribute__ ((format (printf, 3, 0)))
|
||||
@@ -119,7 +119,7 @@ krb5_vwarn(krb5_context context, krb5_error_code code,
|
||||
* @ingroup krb5_error
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_warn(krb5_context context, krb5_error_code code, const char *fmt, ...)
|
||||
__attribute__ ((format (printf, 3, 4)))
|
||||
{
|
||||
@@ -137,7 +137,7 @@ krb5_warn(krb5_context context, krb5_error_code code, const char *fmt, ...)
|
||||
* @ingroup krb5_error
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_vwarnx(krb5_context context, const char *fmt, va_list ap)
|
||||
__attribute__ ((format (printf, 2, 0)))
|
||||
{
|
||||
@@ -153,7 +153,7 @@ krb5_vwarnx(krb5_context context, const char *fmt, va_list ap)
|
||||
* @ingroup krb5_error
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_warnx(krb5_context context, const char *fmt, ...)
|
||||
__attribute__ ((format (printf, 2, 3)))
|
||||
{
|
||||
@@ -174,7 +174,7 @@ krb5_warnx(krb5_context context, const char *fmt, ...)
|
||||
* @ingroup krb5_error
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_verr(krb5_context context, int eval, krb5_error_code code,
|
||||
const char *fmt, va_list ap)
|
||||
__attribute__ ((noreturn, format (printf, 4, 0)))
|
||||
@@ -195,7 +195,7 @@ krb5_verr(krb5_context context, int eval, krb5_error_code code,
|
||||
* @ingroup krb5_error
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_err(krb5_context context, int eval, krb5_error_code code,
|
||||
const char *fmt, ...)
|
||||
__attribute__ ((noreturn, format (printf, 4, 5)))
|
||||
@@ -215,7 +215,7 @@ krb5_err(krb5_context context, int eval, krb5_error_code code,
|
||||
* @ingroup krb5_error
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_verrx(krb5_context context, int eval, const char *fmt, va_list ap)
|
||||
__attribute__ ((noreturn, format (printf, 3, 0)))
|
||||
{
|
||||
@@ -233,7 +233,7 @@ krb5_verrx(krb5_context context, int eval, const char *fmt, va_list ap)
|
||||
* @ingroup krb5_error
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_errx(krb5_context context, int eval, const char *fmt, ...)
|
||||
__attribute__ ((noreturn, format (printf, 3, 4)))
|
||||
{
|
||||
@@ -253,7 +253,7 @@ krb5_errx(krb5_context context, int eval, const char *fmt, ...)
|
||||
* @ingroup krb5_error
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_vabort(krb5_context context, krb5_error_code code,
|
||||
const char *fmt, va_list ap)
|
||||
__attribute__ ((noreturn, format (printf, 3, 0)))
|
||||
@@ -273,7 +273,7 @@ krb5_vabort(krb5_context context, krb5_error_code code,
|
||||
* @ingroup krb5_error
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_abort(krb5_context context, krb5_error_code code, const char *fmt, ...)
|
||||
__attribute__ ((noreturn, format (printf, 3, 4)))
|
||||
{
|
||||
@@ -281,7 +281,7 @@ krb5_abort(krb5_context context, krb5_error_code code, const char *fmt, ...)
|
||||
abort();
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_vabortx(krb5_context context, const char *fmt, va_list ap)
|
||||
__attribute__ ((noreturn, format (printf, 2, 0)))
|
||||
{
|
||||
@@ -299,7 +299,7 @@ krb5_vabortx(krb5_context context, const char *fmt, va_list ap)
|
||||
* @ingroup krb5_error
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_abortx(krb5_context context, const char *fmt, ...)
|
||||
__attribute__ ((noreturn, format (printf, 2, 3)))
|
||||
{
|
||||
@@ -316,7 +316,7 @@ krb5_abortx(krb5_context context, const char *fmt, ...)
|
||||
* @ingroup krb5_error
|
||||
*/
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_set_warn_dest(krb5_context context, krb5_log_facility *fac)
|
||||
{
|
||||
context->warn_dest = fac;
|
||||
@@ -331,7 +331,7 @@ krb5_set_warn_dest(krb5_context context, krb5_log_facility *fac)
|
||||
* @ingroup krb5_error
|
||||
*/
|
||||
|
||||
krb5_log_facility * KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_log_facility * KRB5_LIB_CALL
|
||||
krb5_get_warn_dest(krb5_context context)
|
||||
{
|
||||
return context->warn_dest;
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
#include "krb5_locl.h"
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_write_message (krb5_context context,
|
||||
krb5_pointer p_fd,
|
||||
krb5_data *data)
|
||||
@@ -53,7 +53,7 @@ krb5_write_message (krb5_context context,
|
||||
return 0;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_write_priv_message(krb5_context context,
|
||||
krb5_auth_context ac,
|
||||
krb5_pointer p_fd,
|
||||
@@ -70,7 +70,7 @@ krb5_write_priv_message(krb5_context context,
|
||||
return ret;
|
||||
}
|
||||
|
||||
krb5_error_code KRB5_LIB_FUNCTION
|
||||
KRB5_LIB_FUNCTION krb5_error_code KRB5_LIB_CALL
|
||||
krb5_write_safe_message(krb5_context context,
|
||||
krb5_auth_context ac,
|
||||
krb5_pointer p_fd,
|
||||
|
||||
Reference in New Issue
Block a user