Added support for systems that don't have the hash library
authorTheodore Tso <tytso@mit.edu>
Fri, 14 Jan 1994 19:52:47 +0000 (19:52 +0000)
committerTheodore Tso <tytso@mit.edu>
Fri, 14 Jan 1994 19:52:47 +0000 (19:52 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@3334 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/gssapi/generic/Imakefile
src/lib/gssapi/generic/util_val_nohash.c [new file with mode: 0644]

index 46a2b1deec6e9eab71f14b1b202d762e6422f172..8f45fd58308c77c9b06de684f2e808f8d334adf9 100644 (file)
@@ -2,7 +2,7 @@
 #      $Author$
 #      $Id$
 #
-#  Copyright 1993 by the Massachusetts Institute of Technology.
+#  Copyright 1993, 1994 by the Massachusetts Institute of Technology.
 #  All Rights Reserved.
 # 
 # Export of this software from the United States of America may
@@ -27,6 +27,14 @@ ETSRCS= gssapi_generic_err.c
 ETOBJS= gssapi_generic_err.o
 ETHDRS= gssapi_generic_err.h
 
+#ifdef HasHashLibrary
+UTIL_VALIDATE_SRC= util_validate.c
+UTIL_VALIDATE_OBJ= util_validate.o
+#else
+UTIL_VALIDATE_SRC= util_val_nohash.c
+UTIL_VALIDATE_OBJ= util_val_nohash.o
+#endif
+
 CCSRCS = \
        display_major_status.c \
        display_com_err_status.c \
@@ -37,8 +45,8 @@ CCSRCS = \
        util_canonhost.c \
        util_dup.c \
        util_oid.c \
-#      util_validate.c \
-       util_token.c 
+       util_token.c \
+       $(UTIL_VALIDATE_SRC)
 
 CCOBJS = \
        display_major_status.o \
@@ -50,8 +58,9 @@ CCOBJS = \
        util_canonhost.o \
        util_dup.o \
        util_oid.o \
-#      util_validate.o \
-       util_token.o
+       util_token.o \
+       $(UTIL_VALIDATE_OBJ)
+
 
 EHDRDIR= $(TOP)/include/gssapi
 EXPORTED_HEADERS= gssapi.h gssapi_generic.h
diff --git a/src/lib/gssapi/generic/util_val_nohash.c b/src/lib/gssapi/generic/util_val_nohash.c
new file mode 100644 (file)
index 0000000..3a6ff7e
--- /dev/null
@@ -0,0 +1,83 @@
+/*
+ *  Copyright 1990,1994 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.  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.
+ * 
+ */
+
+/*
+ * $Id$
+ */
+
+/*
+ * stub functions for those without the hash library.
+ */
+
+#include "gssapiP_generic.h"
+
+#include <sys/types.h>
+#include <sys/file.h>
+#include <limits.h>
+
+/* functions for each type */
+
+/* save */
+
+int g_save_name(void **vdb, gss_name_t *name)
+{
+       return 1;
+}
+int g_save_cred_id(void **vdb, gss_cred_id_t *cred)
+{
+       return 1;
+}
+int g_save_ctx_id(void **vdb, gss_ctx_id_t *ctx)
+{
+       return 1;
+}
+
+/* validate */
+
+int g_validate_name(void **vdb, gss_name_t *name)
+{
+       return 1;
+}
+int g_validate_cred_id(void **vdb, gss_cred_id_t *cred)
+{
+       return 1;
+}
+int g_validate_ctx_id(void **vdb, gss_ctx_id_t *ctx)
+{
+       return 1;
+}
+
+/* delete */
+
+int g_delete_name(void **vdb, gss_name_t *name)
+{
+       return 1;
+}
+int g_delete_cred_id(void **vdb, gss_cred_id_t *cred)
+{
+       return 1;
+}
+int g_delete_ctx_id(void **vdb, gss_ctx_id_t *ctx)
+{
+       return 1;
+}
+