diff options
author | Ezra Peisach <epeisach@mit.edu> | 2008-12-29 17:39:29 +0000 |
---|---|---|
committer | Ezra Peisach <epeisach@mit.edu> | 2008-12-29 17:39:29 +0000 |
commit | ff46eba6cf90aa87a1ae04c3bc660f8cd1bbba5e (patch) | |
tree | f672de8b29e2222cc34c7e185f70f1782accf559 /src/lib/rpc | |
parent | c27165044b675285c475ad31dccf7570a8471035 (diff) | |
download | krb5-ff46eba6cf90aa87a1ae04c3bc660f8cd1bbba5e.zip krb5-ff46eba6cf90aa87a1ae04c3bc660f8cd1bbba5e.tar.gz krb5-ff46eba6cf90aa87a1ae04c3bc660f8cd1bbba5e.tar.bz2 |
Add gssrpcint.h to contain prototype for gssrpcint_printf. Include
gcc printf attribute if supported. Include header file and fix up some
of the debugging printf arguments.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@21632 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/rpc')
-rw-r--r-- | src/lib/rpc/Makefile.in | 6 | ||||
-rw-r--r-- | src/lib/rpc/auth_gssapi.c | 2 | ||||
-rw-r--r-- | src/lib/rpc/auth_gssapi_misc.c | 4 | ||||
-rw-r--r-- | src/lib/rpc/gssrpcint.h | 39 | ||||
-rw-r--r-- | src/lib/rpc/svc_auth_gssapi.c | 6 |
5 files changed, 51 insertions, 6 deletions
diff --git a/src/lib/rpc/Makefile.in b/src/lib/rpc/Makefile.in index e4a8eac..29a9926 100644 --- a/src/lib/rpc/Makefile.in +++ b/src/lib/rpc/Makefile.in @@ -282,7 +282,7 @@ auth_gssapi.so auth_gssapi.po $(OUTPRE)auth_gssapi.$(OBJEXT): \ $(SRCTOP)/include/gssrpc/rename.h $(SRCTOP)/include/gssrpc/rpc.h \ $(SRCTOP)/include/gssrpc/rpc_msg.h $(SRCTOP)/include/gssrpc/svc.h \ $(SRCTOP)/include/gssrpc/svc_auth.h $(SRCTOP)/include/gssrpc/xdr.h \ - $(SRCTOP)/include/krb5.h auth_gssapi.c + $(SRCTOP)/include/krb5.h auth_gssapi.c gssrpcint.h auth_gssapi_misc.so auth_gssapi_misc.po $(OUTPRE)auth_gssapi_misc.$(OBJEXT): \ $(BUILDTOP)/include/gssapi/gssapi.h $(BUILDTOP)/include/gssrpc/types.h \ $(SRCTOP)/include/gssrpc/auth.h $(SRCTOP)/include/gssrpc/auth_gss.h \ @@ -290,7 +290,7 @@ auth_gssapi_misc.so auth_gssapi_misc.po $(OUTPRE)auth_gssapi_misc.$(OBJEXT): \ $(SRCTOP)/include/gssrpc/clnt.h $(SRCTOP)/include/gssrpc/rename.h \ $(SRCTOP)/include/gssrpc/rpc.h $(SRCTOP)/include/gssrpc/rpc_msg.h \ $(SRCTOP)/include/gssrpc/svc.h $(SRCTOP)/include/gssrpc/svc_auth.h \ - $(SRCTOP)/include/gssrpc/xdr.h auth_gssapi_misc.c + $(SRCTOP)/include/gssrpc/xdr.h auth_gssapi_misc.c gssrpcint.h bindresvport.so bindresvport.po $(OUTPRE)bindresvport.$(OBJEXT): \ $(BUILDTOP)/include/gssapi/gssapi.h $(BUILDTOP)/include/gssrpc/types.h \ $(SRCTOP)/include/gssrpc/auth.h $(SRCTOP)/include/gssrpc/auth_gss.h \ @@ -495,7 +495,7 @@ svc_auth_gssapi.so svc_auth_gssapi.po $(OUTPRE)svc_auth_gssapi.$(OBJEXT): \ $(SRCTOP)/include/gssrpc/rpc.h $(SRCTOP)/include/gssrpc/rpc_msg.h \ $(SRCTOP)/include/gssrpc/svc.h $(SRCTOP)/include/gssrpc/svc_auth.h \ $(SRCTOP)/include/gssrpc/xdr.h $(SRCTOP)/include/krb5.h \ - svc_auth_gssapi.c + gssrpcint.h svc_auth_gssapi.c svc_raw.so svc_raw.po $(OUTPRE)svc_raw.$(OBJEXT): $(BUILDTOP)/include/gssapi/gssapi.h \ $(BUILDTOP)/include/gssrpc/types.h $(SRCTOP)/include/gssrpc/auth.h \ $(SRCTOP)/include/gssrpc/auth_gss.h $(SRCTOP)/include/gssrpc/auth_unix.h \ diff --git a/src/lib/rpc/auth_gssapi.c b/src/lib/rpc/auth_gssapi.c index fa8ce4b..7211156 100644 --- a/src/lib/rpc/auth_gssapi.c +++ b/src/lib/rpc/auth_gssapi.c @@ -16,6 +16,8 @@ #include <gssrpc/rpc.h> #include <gssrpc/auth_gssapi.h> +#include "gssrpcint.h" + #ifdef __CODECENTER__ #define DEBUG_GSSAPI 1 #endif diff --git a/src/lib/rpc/auth_gssapi_misc.c b/src/lib/rpc/auth_gssapi_misc.c index 89569f0..908ac0c 100644 --- a/src/lib/rpc/auth_gssapi_misc.c +++ b/src/lib/rpc/auth_gssapi_misc.c @@ -9,6 +9,8 @@ #include <gssapi/gssapi.h> #include <gssrpc/auth_gssapi.h> +#include "gssrpcint.h" + #ifdef __CODECENTER__ #define DEBUG_GSSAPI 1 #endif @@ -181,7 +183,7 @@ static void auth_gssapi_display_status_1( putc ('\n', stderr); if (misc_debug_gssapi) gssrpcint_printf("GSS-API authentication error %s: %*s\n", - m, msg.length, msg.value); + m, msg.length, (char *) msg.value); (void) gss_release_buffer(&minor_stat, &msg); if (!msg_ctx) diff --git a/src/lib/rpc/gssrpcint.h b/src/lib/rpc/gssrpcint.h new file mode 100644 index 0000000..c9f03d8 --- /dev/null +++ b/src/lib/rpc/gssrpcint.h @@ -0,0 +1,39 @@ +/* + * lib/rpc/gssrpcint.h + * + * Copyright (C) 2008 by the Massachusetts Institute of Technology. + * All rights reserved. + * + * Export of this software from the United States of America may + * require a specific license from the United States Government. + * It is the responsibility of any person or organization contemplating + * export to obtain such a license before exporting. + * + * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and + * distribute this software and its documentation for any purpose and + * without fee is hereby granted, provided that the above copyright + * notice appear in all copies and that both that copyright notice and + * this permission notice appear in supporting documentation, and that + * the name of M.I.T. not be used in advertising or publicity pertaining + * to distribution of the software without specific, written prior + * permission. Furthermore if you modify this software you must label + * your software as modified software and not distribute it in such a + * fashion that it might be confused with the original M.I.T. software. + * M.I.T. makes no representations about the suitability of + * this software for any purpose. It is provided "as is" without express + * or implied warranty. + * + * + * <<< Description >>> + */ + +#ifndef __GSSRPCINT_H__ +#define __GSSRPCINT_H__ + +extern void gssrpcint_printf(const char *format, ...) +#if !defined(__cplusplus) && (__GNUC__ > 2) + __attribute__((__format__(__printf__, 1, 2))) +#endif + ; + +#endif /* __GSSRPCINT_H__ */ diff --git a/src/lib/rpc/svc_auth_gssapi.c b/src/lib/rpc/svc_auth_gssapi.c index f899c89..e374f00 100644 --- a/src/lib/rpc/svc_auth_gssapi.c +++ b/src/lib/rpc/svc_auth_gssapi.c @@ -24,6 +24,8 @@ #include <gssapi/gssapi_krb5.h> #endif +#include "gssrpcint.h" + #ifdef GSSAPI_KRB5 /* This is here for the krb5_error_code typedef and the KRB5KRB_AP_WRONG_PRINC #define.*/ @@ -403,7 +405,7 @@ enum auth_stat gssrpc__svcauth_gssapi( break; PRINTF(("accept_sec_context returned 0x%x 0x%x wrong-princ=%#x\n", - call_res.gss_major, call_res.gss_minor, KRB5KRB_AP_WRONG_PRINC)); + call_res.gss_major, call_res.gss_minor, (int) KRB5KRB_AP_WRONG_PRINC)); if (call_res.gss_major == GSS_S_COMPLETE || call_res.gss_major == GSS_S_CONTINUE_NEEDED) { /* server_creds was right, set it! */ @@ -950,7 +952,7 @@ bool_t svcauth_gssapi_set_names( in_buf.value = names[i].name; in_buf.length = strlen(in_buf.value) + 1; - PRINTF(("svcauth_gssapi_set_names: importing %s\n", in_buf.value)); + PRINTF(("svcauth_gssapi_set_names: importing %s\n", names[i].name)); gssstat = gss_import_name(&minor_stat, &in_buf, names[i].type, &server_name_list[i]); |