windows-smb-error-codes-20050815
authorJeffrey Altman <jaltman@secure-endpoints.com>
Mon, 15 Aug 2005 18:27:52 +0000 (18:27 +0000)
committerJeffrey Altman <jaltman@secure-endpoints.com>
Mon, 15 Aug 2005 18:27:52 +0000 (18:27 +0000)
Do not return error codes from the SMB/CIFS server that can be interpretted
by the SMB/CIFS client as meaning that the AFS Client Service is not
available.

doc/txt/winnotes/afs-changes-since-1.2.txt
src/WINNT/afsd/smb.c

index 3df4bd7..a3aeea4 100644 (file)
@@ -1,4 +1,15 @@
 Since 1.3.87:
+ * When the cache manager reports ALLBUSY or ALLOFFLINE for
+   a resource we should not be returning status codes such
+   as Network Busy or Remote Host Down because these errors
+   will imply that the AFS Client Service is Busy or Down
+   and that is simply not the case.   Instead we will return
+   Bad Network Path as the path is temporarily not available.
+
+   Instead of returning Sharing Paused when there is a
+   timeout error, return Timeout.  Once again, the AFS Client
+   Service is not paused.
+
  * afscreds.exe would display an Obtain Creds dialog when
    the expired credentials reminder was triggered even 
    if there was no network path to the KDC.  This is prevented
index 5042c51..67f7f24 100644 (file)
@@ -2313,7 +2313,11 @@ void smb_MapNTError(long code, unsigned long *NTStatusp)
         NTStatus = 0xC000000FL;        /* No such file */
     }
     else if (code == CM_ERROR_TIMEDOUT) {
+#ifdef COMMENT
         NTStatus = 0xC00000CFL;        /* Sharing Paused */
+#else
+        NTStatus = 0x00000102L; /* Timeout */
+#endif
     }
     else if (code == CM_ERROR_RETRY) {
         NTStatus = 0xC000022DL;        /* Retry */
@@ -2431,12 +2435,22 @@ void smb_MapNTError(long code, unsigned long *NTStatusp)
     else if (code == CM_ERROR_PATH_NOT_COVERED) {
         NTStatus = 0xC0000257L; /* Path Not Covered */
     } 
+#ifdef COMMENT
     else if (code == CM_ERROR_ALLBUSY) {
         NTStatus = 0xC00000BFL; /* Network Busy */
     } 
     else if (code == CM_ERROR_ALLOFFLINE) {
         NTStatus = 0xC0000350L; /* Remote Host Down */
     } 
+#else
+    /* we do not want to be telling the SMB/CIFS client that
+     * the AFS Client Service is busy or down.  
+     */
+    else if (code == CM_ERROR_ALLBUSY || 
+             code == CM_ERROR_ALLOFFLINE) {
+        NTStatus = 0xC00000BEL; /* Bad Network Path */
+    }
+#endif
     else {
         NTStatus = 0xC0982001L;        /* SMB non-specific error */
     }