+Sat Feb 24 18:57:56 1996 Theodore Y. Ts'o <tytso@dcl>
+
+ * ktdefname.c (krb5_kt_default_name): Under Windows, assume that
+ the keytab file is located in the Windows directory.
+
Thu Feb 22 13:16:16 1996 Ezra Peisach <epeisach@kangaroo.mit.edu>
* Makefile.in (check-unix): Set LD_LIBRARY_PATH for kdb5_anadd.
* Return default keytab file name.
*/
+#define NEED_WINDOWS
+
#include "k5-int.h"
extern char *krb5_defkeyname;
if (strlen(cp) >= (size_t) namesize)
return KRB5_CONFIG_NOTENUFSPACE;
} else {
+#if defined (_WINDOWS) || defined(WIN32)
+ {
+ char defname[160];
+ int len;
+
+ len= GetWindowsDirectory( defname, sizeof(defname)-2 );
+ defname[len]= '\0';
+ if ( (len + strlen(krb5_defkeyname) + 1) > namesize )
+ return KRB5_CONFIG_NOTENUFSPACE;
+ sprintf(name, krb5_defkeyname, defname);
+ }
+#else
strncpy(name, krb5_defkeyname, namesize);
if ((size_t) namesize < strlen(krb5_defkeyname))
return KRB5_CONFIG_NOTENUFSPACE;
+#endif
}
return 0;
}