From: Jeffrey Altman Date: Tue, 31 May 2005 15:19:06 +0000 (+0000) Subject: STABLE14-windows-logon-cleanup-20050531 X-Git-Tag: openafs-devel-1_3_83~4 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=1522febaead1233849be172a9431bb2a011533db;p=packages%2Fo%2Fopenafs.git STABLE14-windows-logon-cleanup-20050531 remove debugging messages (cherry picked from commit e844445243f837f9bc2fc52b503af99ecd44427e) --- diff --git a/src/WINNT/afsd/afskfw.c b/src/WINNT/afsd/afskfw.c index 771a5118f..d86ad7a9f 100644 --- a/src/WINNT/afsd/afskfw.c +++ b/src/WINNT/afsd/afskfw.c @@ -3510,33 +3510,6 @@ KFW_AFS_get_lsa_principal(char * szUser, DWORD *dwSize) return success; } -#define AFS_LOGON_EVENT_NAME TEXT("AFS Logon") - -static void DebugEvent0(char *a) -{ - HANDLE h; char *ptbuf[1]; - h = RegisterEventSource(NULL, AFS_LOGON_EVENT_NAME); - ptbuf[0] = a; - ReportEvent(h, EVENTLOG_INFORMATION_TYPE, 0, 0, NULL, 1, 0, (const char **)ptbuf, NULL); - DeregisterEventSource(h); -} - -#define MAXBUF_ 512 -static void DebugEvent(char *b,...) -{ - HANDLE h; char *ptbuf[1],buf[MAXBUF_+1]; - va_list marker; - h = RegisterEventSource(NULL, AFS_LOGON_EVENT_NAME); - va_start(marker,b); - vsprintf(buf, b, marker); - buf[MAXBUF_] = '\0'; - ptbuf[0] = buf; - ReportEvent(h, EVENTLOG_INFORMATION_TYPE, 0, 0, NULL, 1, 0, (const char **)ptbuf, NULL); - DeregisterEventSource(h); - va_end(marker); -} - - void KFW_AFS_copy_cache_to_system_file(char * user, char * szLogonId) { @@ -3565,8 +3538,6 @@ KFW_AFS_copy_cache_to_system_file(char * user, char * szLogonId) strcat(cachename, filename); - DebugEvent("Copy2File %s", filename); - DeleteFile(filename); code = pkrb5_init_context(&ctx); @@ -3584,12 +3555,8 @@ KFW_AFS_copy_cache_to_system_file(char * user, char * szLogonId) code = pkrb5_cc_initialize(ctx, ncc, princ); if (code) goto cleanup; - DebugEvent0("Copy2File copying"); - code = pkrb5_cc_copy_creds(ctx,cc,ncc); - DebugEvent("Copy2File copy_creds=%d", code); - cleanup: if ( cc ) { pkrb5_cc_close(ctx, cc); @@ -3629,27 +3596,20 @@ KFW_AFS_copy_system_file_to_default_cache(char * filename) strcat(cachename, filename); - DebugEvent("Copy2Cache %s", cachename); - code = pkrb5_init_context(&ctx); if (code) ctx = 0; code = pkrb5_cc_resolve(ctx, cachename, &cc); if (code) goto cleanup; - DebugEvent("Copy2Cache resolve=%d", code); - code = pkrb5_cc_get_principal(ctx, cc, &princ); code = pkrb5_cc_default(ctx, &ncc); - DebugEvent("Copy2Cache default=%d", code); - if (!code) { code = pkrb5_cc_initialize(ctx, ncc, princ); - DebugEvent("Copy2Cache initialize=%d", code); - code = pkrb5_cc_copy_creds(ctx,cc,ncc); - DebugEvent("Copy2Cache copy_creds=%d", code); + if (!code) + code = pkrb5_cc_copy_creds(ctx,cc,ncc); } if ( ncc ) { pkrb5_cc_close(ctx, ncc); diff --git a/src/WINNT/afsd/afslogon.c b/src/WINNT/afsd/afslogon.c index 85ac65af7..5f60b10c7 100644 --- a/src/WINNT/afsd/afslogon.c +++ b/src/WINNT/afsd/afslogon.c @@ -657,7 +657,7 @@ DWORD APIENTRY NPLogonNotify( MSV1_0_INTERACTIVE_LOGON *IL; - DWORD code; + DWORD code, code2; int pw_exp; char *reason; @@ -817,9 +817,9 @@ DWORD APIENTRY NPLogonNotify( p = opt.theseCells; while ( *p ) { - code = KFW_AFS_get_cred(principal, p, 0, 0, opt.smbName, &reason); + code2 = KFW_AFS_get_cred(principal, p, 0, 0, opt.smbName, &reason); DebugEvent("KFW_AFS_get_cred uname=[%s] smbname=[%s] cell=[%s] code=[%d]", - principal,opt.smbName,p,code); + principal,opt.smbName,p,code2); p += strlen(p) + 1; }