summaryrefslogtreecommitdiffstats
path: root/src/windows/cns/cns.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/windows/cns/cns.c')
-rw-r--r--src/windows/cns/cns.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/windows/cns/cns.c b/src/windows/cns/cns.c
index ab685e4df2..facd1a68fa 100644
--- a/src/windows/cns/cns.c
+++ b/src/windows/cns/cns.c
@@ -1940,8 +1940,10 @@ kwin_command (
principal = server = NULL;
memset(&creds, 0, sizeof(creds));
- code = krb5_parse_name(k5_context, name, &principal);
+ sprintf (menuitem, "%s@%s", name, realm);
+ code = krb5_parse_name(k5_context, menuitem, &principal);
if (code) break;
+
code = krb5_cc_initialize(k5_context, k5_ccache, principal);
if (code) break;
@@ -2049,11 +2051,6 @@ kwin_command (
return TRUE;
- case 1234:
- ticket_init_list(GetDlgItem(hwnd, IDD_TICKET_LIST));
-
- return TRUE;
-
case IDM_ABOUT:
if (isblocking)
return TRUE;
@@ -2872,16 +2869,20 @@ k5_kname_parse (char *name, char *realm, char *fullname) {
ptr = strchr (fullname, '@'); /* Name, realm separator */
+ if (ptr != NULL) /* Get realm */
+ strcpy (realm, ptr + 1);
+ else
+ *realm = '\0';
+
if (ptr != NULL) { /* Get the name */
strncpy (name, fullname, ptr - fullname);
name[ptr - fullname] = '\0';
} else
strcpy (name, fullname);
- if (ptr != NULL) /* Get realm */
- strcpy (realm, ptr + 1);
- else
- *realm = '\0';
+ ptr = strchr (name, '.'); /* K4 compatability */
+ if (ptr != NULL)
+ *ptr = '\0';
return 0;
}