]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
windows-afsd-no-more-ods-20090402
authorJeffrey Altman <jaltman@secure-endpoints.com>
Fri, 3 Apr 2009 03:56:36 +0000 (03:56 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Fri, 3 Apr 2009 03:56:36 +0000 (03:56 +0000)
LICENSE MIT

Any use of OutputDebugString() in production can result in serious
delays in the execution of the thread that issues the call.  Remove
the last of the unprotected calls within afsd_service.

src/WINNT/afsd/smb.c
src/WINNT/afsd/smb3.c

index 62640793526324c2a20f4ceb6e0fcb634e816e57..44cf35c80152acb8be705975cb35ac471f0f59b7 100644 (file)
@@ -10080,13 +10080,12 @@ void smb_Init(osi_log_t *logp, int useV3,
                                                     );
 
                 if (nts != STATUS_SUCCESS && ntsEx != STATUS_SUCCESS) {
-                    char message[AFSPATHMAX];
-                    sprintf(message,"MsV1_0SetProcessOption failure: nts 0x%x ntsEx 0x%x",
-                                       nts, ntsEx);
-                    OutputDebugString(message);
-                    afsi_log(message);
+                    osi_Log2(smb_logp, "MsV1_0SetProcessOption failure: nts 0x%x ntsEx 0x%x",
+                             nts, ntsEx);
+
+                    afsi_log("MsV1_0SetProcessOption failure: nts 0x%x ntsEx 0x%x", nts, ntsEx);
                 } else {
-                    OutputDebugString("MsV1_0SetProcessOption success");
+                    osi_Log0(smb_logp, "MsV1_0SetProcessOption success");
                     afsi_log("MsV1_0SetProcessOption success");
                 }
                 /* END - code from Larry */
index 955e893a3cdc04ac590c8e318922a5ca28c02278..39cc6acf632f1ce1c2d6fd6831d26ac835aaee00 100644 (file)
@@ -144,8 +144,6 @@ void OutputDebugF(clientchar_t * format, ...) {
     va_start( args, format );
     cm_ClientStrPrintfV(vbuffer, lengthof(vbuffer), format, args);
     osi_Log1(smb_logp, "%S", osi_LogSaveClientString(smb_logp, vbuffer));
-    cm_ClientStrCat(vbuffer, lengthof(vbuffer), _C("\n"));
-    OutputDebugStringW(vbuffer);
 }
 
 void OutputDebugHexDump(unsigned char * buffer, int len) {
@@ -159,8 +157,6 @@ void OutputDebugHexDump(unsigned char * buffer, int len) {
         if(!(i%16)) {
             if(i) {
                 osi_Log1(smb_logp, "%s", osi_LogSaveString(smb_logp, buf));
-                StringCchCatA(buf, lengthof(buf), "\r\n");
-                OutputDebugString(buf);
             }
             StringCchPrintfA(buf, lengthof(buf), "%5x", i);
             memset(buf+5,' ',80);
@@ -180,8 +176,6 @@ void OutputDebugHexDump(unsigned char * buffer, int len) {
     }    
     if(i) {
         osi_Log1(smb_logp, "%s", osi_LogSaveString(smb_logp, buf));
-        StringCchCatA(buf, lengthof(buf), "\r\n");
-        OutputDebugString(buf);
     }   
 }