From: Keith Vetter Date: Tue, 28 Mar 1995 04:55:24 +0000 (+0000) Subject: Minor bug fixes and clean up in windows/cns X-Git-Tag: krb5-1.0-beta5~438 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=059d65ed7ce4b97b714dc026528978d47fd7783a;p=krb5.git Minor bug fixes and clean up in windows/cns git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5279 dc483132-0cff-0310-8789-dd5450dbe970 --- diff --git a/src/windows/cns/ChangeLog b/src/windows/cns/ChangeLog index 75d8d73ef..0f5445632 100644 --- a/src/windows/cns/ChangeLog +++ b/src/windows/cns/ChangeLog @@ -1,3 +1,10 @@ +Mon Mar 27 20:31:04 1995 Keith Vetter (keithv@fusion.com) + + * cns.c. cns.rc: removed debugging menu item + * cns.c: fixed up parsing and unparsing of user name + * makefile: removed some configuration crud + + Wed Mar 22 16:27:48 1995 Keith Vetter (keithv@fusion.com) * cns.c: added some error checking code to catch missing realms files diff --git a/src/windows/cns/cns.c b/src/windows/cns/cns.c index ab685e4df..facd1a68f 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; } diff --git a/src/windows/cns/cns.rc b/src/windows/cns/cns.rc index f7d6d2c4c..7780b53b0 100644 --- a/src/windows/cns/cns.rc +++ b/src/windows/cns/cns.rc @@ -30,7 +30,6 @@ BEGIN POPUP "&Help" BEGIN MENUITEM "&Index\tF1", IDM_HELP_INDEX - MENUITEM "&Debug", 1234 MENUITEM SEPARATOR MENUITEM "&About Kerberos...", IDM_ABOUT END diff --git a/src/windows/cns/makefile b/src/windows/cns/makefile index 8dc8e5436..7c81c7308 100644 --- a/src/windows/cns/makefile +++ b/src/windows/cns/makefile @@ -20,21 +20,17 @@ INCLUDES = /I$(BUILDTOP)\include !endif !if $(KVERSION) == 5 -BUILDTOP =..\.. +BUILDTOP =..\.. LIBDIR = $(BUILDTOP)\lib KLIB = $(LIBDIR)\libkrb5.lib WLIB = $(LIBDIR)\winsock.lib INCLUDES = /I$(BUILDTOP)\include /I$(BUILDTOP)\include\krb5 - -RM = $(BUILDTOP)\config\rm.bat -WHAT = windows -OBJEXT = obj !endif ##### C Compiler CC = cl -CFLAGS_RELEASE = /f- /nologo /W3 /AL /Gw /Gy /Zp /O2 /DNDEBUG=1 -CFLAGS_DEBUG = /f /nologo /W3 /AL /Gw /Gy /Zp /O2 /Od /Zi +CFLAGS_RELEASE = /f- /nologo /W3 /AL /Gw /Gsy /Zp /O2 /DNDEBUG=1 +CFLAGS_DEBUG = /f /nologo /W3 /AL /Gw /Gsy /Zp /O2 /Od /Zi !if $(DEBUG) CFLAGS = $(CFLAGS_DEBUG) $(INCLUDES) /D$(KRB)=1 !else @@ -66,11 +62,9 @@ $(OBJS) cns.res: cns.h tktlist.h install: copy cns.exe ..\floppy -clean:: tidy +clean:: if exist *.exe del *.exe if exist ..\floppy\cns.exe del ..\floppy\cns.exe - -tidy:: if exist *.obj del *.obj if exist *.res del *.res if exist *.map del *.map