+Fri Feb 5 01:05:43 1999 Theodore Y. Ts'o <tytso@mit.edu>
+
+ * ccdefname.c (get_from_os): On the Windows platform,
+ automatically generate the correct default cache name
+ based on what krb5_cc_dfl_ops is set to.
+
+ * realm_dom.c (krb5_get_realm_domain): Add modifiers so that this
+ function can get exported in a Windows DLL.
+
Tue Feb 2 16:01:58 1999 Tom Yu <tlyu@mit.edu>
* read_pwd.c: Remove reference to CPP symbol "unix".
static krb5_error_code get_from_os(char *name_buf, int name_size)
{
char defname[160]; /* Default value */
+ char *prefix = krb5_cc_dfl_ops->prefix;
+ int len;
- strcpy (defname, "default_cache_name");
- strcpy (name_buf, "API:");
+ if (!strcmp(prefix, "FILE") || !strcmp(prefix, "STDIO")) {
+ GetWindowsDirectory (defname, sizeof(defname)-7);
+ strcat (defname, "\\krb5cc");
+ } else {
+ strcpy (defname, "default_cache_name");
+ }
+ sprintf(name_buf, "%s:", prefix);
+ len = strlen(name_buf);
GetPrivateProfileString(INI_FILES, INI_KRB_CCACHE, defname,
- name_buf+4, name_size-4, KERBEROS_INI);
+ name_buf+len, name_size-len, KERBEROS_INI);
return 0;
}
#endif