aboutsummaryrefslogtreecommitdiff
path: root/src/lib/rpc
diff options
context:
space:
mode:
authorBarry Jaspan <bjaspan@mit.edu>1996-10-15 21:05:10 +0000
committerBarry Jaspan <bjaspan@mit.edu>1996-10-15 21:05:10 +0000
commit1c13573311e9547e31bc4b39ef613ac546871135 (patch)
treec0cb1d4955235cfb9644e91685bfde51a21b5b1e /src/lib/rpc
parent911da81c6ddae3de2210b5278c4db795bc2295d3 (diff)
downloadkrb5-1c13573311e9547e31bc4b39ef613ac546871135.zip
krb5-1c13573311e9547e31bc4b39ef613ac546871135.tar.gz
krb5-1c13573311e9547e31bc4b39ef613ac546871135.tar.bz2
* configure.in: add DO_SUBDIRS so make will descend into unit-test
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@9177 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/rpc')
-rw-r--r--src/lib/rpc/ChangeLog4
-rw-r--r--src/lib/rpc/Makefile.in2
-rw-r--r--src/lib/rpc/auth_gssapi.c21
-rw-r--r--src/lib/rpc/configure.in2
-rw-r--r--src/lib/rpc/svc_auth_gssapi.c22
5 files changed, 41 insertions, 10 deletions
diff --git a/src/lib/rpc/ChangeLog b/src/lib/rpc/ChangeLog
index 0b62729..7a7d812 100644
--- a/src/lib/rpc/ChangeLog
+++ b/src/lib/rpc/ChangeLog
@@ -1,3 +1,7 @@
+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,
diff --git a/src/lib/rpc/Makefile.in b/src/lib/rpc/Makefile.in
index 2b75d1d..5c4a32b 100644
--- a/src/lib/rpc/Makefile.in
+++ b/src/lib/rpc/Makefile.in
@@ -1,4 +1,4 @@
-CFLAGS = $(CCOPTS) $(DEFS) -DDEBUG_GSSAPI=0
+CFLAGS = $(CCOPTS) $(DEFS) -DGSSAPI_KRB5 -DDEBUG_GSSAPI=0
##DOSBUILDTOP = ..\..
##DOSLIBNAME=libgssrpc.lib
diff --git a/src/lib/rpc/auth_gssapi.c b/src/lib/rpc/auth_gssapi.c
index 7d4e77a..2263512 100644
--- a/src/lib/rpc/auth_gssapi.c
+++ b/src/lib/rpc/auth_gssapi.c
@@ -15,6 +15,9 @@ static char *rcsid = "$Header$";
#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>
@@ -203,7 +206,7 @@ AUTH *auth_gssapi_create(clnt, gssstat, minor_stat,
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 */
@@ -211,7 +214,21 @@ try_new_version:
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;
diff --git a/src/lib/rpc/configure.in b/src/lib/rpc/configure.in
index fede091..c23c77f 100644
--- a/src/lib/rpc/configure.in
+++ b/src/lib/rpc/configure.in
@@ -1,5 +1,7 @@
AC_INIT(auth_gssapi.c)
CONFIG_RULES
+CONFIG_DIRS(unit-test)
+DO_SUBDIRS
AC_PROG_ARCHIVE
AC_PROG_ARCHIVE_ADD
AC_PROG_RANLIB
diff --git a/src/lib/rpc/svc_auth_gssapi.c b/src/lib/rpc/svc_auth_gssapi.c
index b65996a..be277ec 100644
--- a/src/lib/rpc/svc_auth_gssapi.c
+++ b/src/lib/rpc/svc_auth_gssapi.c
@@ -5,6 +5,9 @@
* $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.
@@ -198,9 +201,11 @@ static char *rcsid = "$Header$";
#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>
@@ -556,17 +561,20 @@ enum auth_stat _svcauth_gssapi(rqst, msg, no_dispatch)
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;