summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorJohn Kohl <jtkohl@mit.edu>1990-05-08 10:13:54 +0000
committerJohn Kohl <jtkohl@mit.edu>1990-05-08 10:13:54 +0000
commitbc16888bfb7a3897576709fd109794dfe10c6143 (patch)
tree67f50666065cc1f33dff6eba66c21d6fd8b486d2 /src/lib
parent7ad3b3bc253221d8b1dd73c44bc1feade65c5871 (diff)
downloadkrb5-bc16888bfb7a3897576709fd109794dfe10c6143.tar.gz
krb5-bc16888bfb7a3897576709fd109794dfe10c6143.tar.xz
krb5-bc16888bfb7a3897576709fd109794dfe10c6143.zip
*** empty log message ***
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@770 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/krb5/keytab/file/ktf_wreslv.c55
1 files changed, 55 insertions, 0 deletions
diff --git a/src/lib/krb5/keytab/file/ktf_wreslv.c b/src/lib/krb5/keytab/file/ktf_wreslv.c
new file mode 100644
index 000000000..ed9b0bc50
--- /dev/null
+++ b/src/lib/krb5/keytab/file/ktf_wreslv.c
@@ -0,0 +1,55 @@
+/*
+ * $Source$
+ * $Author$
+ *
+ * Copyright 1990 by the Massachusetts Institute of Technology.
+ *
+ * For copying and distribution information, please see the file
+ * <krb5/mit-copyright.h>.
+ *
+ * This is an implementation specific resolver. It returns a keytab id
+ * initialized with file keytab routines.
+ */
+
+#if !defined(lint) && !defined(SABER)
+static char krb5_ktfile_wresolve_c[] =
+"$Id$";
+#endif /* !lint & !SABER */
+
+#include <krb5/copyright.h>
+#include <krb5/krb5.h>
+#include <krb5/ext-proto.h>
+#include <errno.h>
+
+#include "ktfile.h"
+
+krb5_error_code
+krb5_ktfile_wresolve(name, id)
+ char *name;
+ krb5_keytab *id;
+{
+ krb5_ktfile_data *data;
+
+ if ((*id = (krb5_keytab) malloc(sizeof(**id))) == NULL)
+ return(ENOMEM);
+
+ (*id)->ops = &krb5_ktf_writable_ops;
+ if ((data = (krb5_ktfile_data *)malloc(sizeof(krb5_ktfile_data))) == NULL) {
+ xfree(*id);
+ return(ENOMEM);
+ }
+
+ if ((data->name = (char *)calloc(strlen(name) + 1, sizeof(char))) == NULL) {
+ xfree(data);
+ xfree(*id);
+ return(ENOMEM);
+ }
+
+ (void) strcpy(data->name, name);
+ data->openf = 0;
+
+ (*id)->data = (krb5_pointer)data;
+
+ return(0); /* XXX */
+}
+