svn rev #21632: trunk/src/lib/rpc/

epeisach@MIT.EDU epeisach at MIT.EDU
Mon Dec 29 12:39:30 EST 2008


http://src.mit.edu/fisheye/changelog/krb5/?cs=21632
Commit By: epeisach
Log Message:
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.




Changed Files:
U   trunk/src/lib/rpc/Makefile.in
U   trunk/src/lib/rpc/auth_gssapi.c
U   trunk/src/lib/rpc/auth_gssapi_misc.c
A   trunk/src/lib/rpc/gssrpcint.h
U   trunk/src/lib/rpc/svc_auth_gssapi.c
Modified: trunk/src/lib/rpc/Makefile.in
===================================================================
--- trunk/src/lib/rpc/Makefile.in	2008-12-29 17:12:54 UTC (rev 21631)
+++ trunk/src/lib/rpc/Makefile.in	2008-12-29 17:39:29 UTC (rev 21632)
@@ -282,7 +282,7 @@
   $(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 @@
   $(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 @@
   $(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 \

Modified: trunk/src/lib/rpc/auth_gssapi.c
===================================================================
--- trunk/src/lib/rpc/auth_gssapi.c	2008-12-29 17:12:54 UTC (rev 21631)
+++ trunk/src/lib/rpc/auth_gssapi.c	2008-12-29 17:39:29 UTC (rev 21632)
@@ -16,6 +16,8 @@
 #include <gssrpc/rpc.h>
 #include <gssrpc/auth_gssapi.h>
 
+#include "gssrpcint.h"
+
 #ifdef __CODECENTER__
 #define DEBUG_GSSAPI 1
 #endif

Modified: trunk/src/lib/rpc/auth_gssapi_misc.c
===================================================================
--- trunk/src/lib/rpc/auth_gssapi_misc.c	2008-12-29 17:12:54 UTC (rev 21631)
+++ trunk/src/lib/rpc/auth_gssapi_misc.c	2008-12-29 17:39:29 UTC (rev 21632)
@@ -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 @@
 	  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)

Added: trunk/src/lib/rpc/gssrpcint.h
===================================================================
--- trunk/src/lib/rpc/gssrpcint.h	2008-12-29 17:12:54 UTC (rev 21631)
+++ trunk/src/lib/rpc/gssrpcint.h	2008-12-29 17:39:29 UTC (rev 21632)
@@ -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__ */

Modified: trunk/src/lib/rpc/svc_auth_gssapi.c
===================================================================
--- trunk/src/lib/rpc/svc_auth_gssapi.c	2008-12-29 17:12:54 UTC (rev 21631)
+++ trunk/src/lib/rpc/svc_auth_gssapi.c	2008-12-29 17:39:29 UTC (rev 21632)
@@ -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 @@
 		    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 @@
 	  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]); 




More information about the cvs-krb5 mailing list