+Tue Oct 15 17:04:09 1996 Barry Jaspan <bjaspan@mit.edu>
+
+ * configure.in: add DO_SUBDIRS so make will descend into unit-test
+
Wed Oct 9 14:15:34 1996 Tom Yu <tlyu@mit.edu>
* Makefile.in (all-unix): Force $(OBJS) to depend on includes,
-CFLAGS = $(CCOPTS) $(DEFS) -DDEBUG_GSSAPI=0
+CFLAGS = $(CCOPTS) $(DEFS) -DGSSAPI_KRB5 -DDEBUG_GSSAPI=0
##DOSBUILDTOP = ..\..
##DOSLIBNAME=libgssrpc.lib
#include <gssapi/gssapi.h>
#include <gssapi/gssapi_generic.h>
+#ifdef GSSAPI_KRB5
+#include <gssapi/gssapi_krb5.h>
+#endif
#include <rpc/rpc.h>
#include <rpc/auth_gssapi.h>
clnt->cl_auth = auth;
/* start by trying latest version */
- call_arg.version = 3;
+ call_arg.version = 4;
try_new_version:
/* set state for initial call to init_sec_context */
AUTH_PRIVATE(auth)->context = GSS_C_NO_CONTEXT;
init_func = AUTH_GSSAPI_INIT;
- if (call_arg.version == 3) {
+#ifdef GSSAPI_KRB5
+ /*
+ * OV servers up to version 3 used the old mech id. Beta 7
+ * servers used version 3 with the new mech id; however, the beta
+ * 7 gss-api accept_sec_context accepts either mech id. Thus, if
+ * any server rejects version 4, we fall back to version 3 with
+ * the old mech id; for the OV server it will be right, and for
+ * the beta 7 server it will be accepted. Not ideal, but it
+ * works.
+ */
+ if (call_arg.version < 4 && mech_type == gss_mech_krb5)
+ mech_type = gss_mech_krb5_old;
+#endif
+
+ if (call_arg.version >= 3) {
if (clnt_control(clnt, CLGET_LOCAL_ADDR, &laddr) == FALSE) {
PRINTF(("gssapi_create: CLGET_LOCAL_ADDR failed"));
goto cleanup;
AC_INIT(auth_gssapi.c)
CONFIG_RULES
+CONFIG_DIRS(unit-test)
+DO_SUBDIRS
AC_PROG_ARCHIVE
AC_PROG_ARCHIVE_ADD
AC_PROG_RANLIB
* $Source$
*
* $Log$
+ * Revision 1.40 1996/10/15 21:05:10 bjaspan
+ * * configure.in: add DO_SUBDIRS so make will descend into unit-test
+ *
* Revision 1.39 1996/08/14 00:01:48 tlyu
* * getrpcent.c: Add PROTOTYPE and conditionalize function
* prototypes.
#include <gssapi/gssapi_krb5.h>
#endif
+#ifdef GSSAPI_KRB5
/* This is here for the krb5_error_code typedef and the
KRB5KRB_AP_WRONG_PRINC #define.*/
#include <krb5.h>
+#endif
#include <sys/file.h>
#include <fcntl.h>
client_data->server_creds = server_creds;
client_data->server_name = server_name_list[i];
break;
- } else if (call_res.gss_major != GSS_S_FAILURE ||
+ } else if (call_res.gss_major != GSS_S_FAILURE
+#ifdef GSSAPI_KRB5
/*
- * XXX hard-coded because there is no other
- * way to prevent all GSS_S_FAILURES from
+ * hard-coded because there is no other way
+ * to prevent all GSS_S_FAILURES from
* returning a "wrong principal in request"
* error
*/
- ((krb5_error_code) call_res.gss_minor !=
- (krb5_error_code) KRB5KRB_AP_WRONG_PRINC)) {
- break;
- }
+ || ((krb5_error_code) call_res.gss_minor !=
+ (krb5_error_code) KRB5KRB_AP_WRONG_PRINC)
+#endif
+ ) {
+ break;
+ }
}
gssstat = call_res.gss_major;