From ffe04f710b41120f1bbd843c73ee2d95bc179d9c Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Sat, 4 Apr 2009 21:16:27 +0000 Subject: [PATCH] windows-smb-error-map-20090404 LICENSE MIT For CM_ERROR_BADSHARENAME return BAD_NETWORK_PATH instead of BAD_NETWORK_NAME. The latter refers to the server name and the former to the share name. Returning BAD_NETWORK_NAME will causes the smb redirector to break its connection to \\AFS. For CM_ERROR_ALLOFFLINE and CM_ERROR_ALLDOWN return PATH_NOT_FOUND instead of BAD_NETWORK_PATH. We don't want the smb redirector to tear down all open files just because some volume in the path is inaccessible at the moment. --- src/WINNT/afsd/smb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/WINNT/afsd/smb.c b/src/WINNT/afsd/smb.c index 44cf35c80..357df62f9 100644 --- a/src/WINNT/afsd/smb.c +++ b/src/WINNT/afsd/smb.c @@ -3183,7 +3183,7 @@ void smb_MapNTError(long code, unsigned long *NTStatusp) #endif /* COMMENT */ } else if (code == CM_ERROR_BADSHARENAME) { - NTStatus = 0xC00000CCL; /* Bad network name */ + NTStatus = 0xC00000BEL; /* Bad network path (server valid, share bad) */ } else if (code == CM_ERROR_NOIPC) { #ifdef COMMENT @@ -3254,7 +3254,7 @@ void smb_MapNTError(long code, unsigned long *NTStatusp) NTStatus = 0xC000022DL; /* Retry */ } else if (code == CM_ERROR_ALLOFFLINE || code == CM_ERROR_ALLDOWN) { - NTStatus = 0xC00000BEL; /* Bad Network Path */ + NTStatus = 0xC000003AL; /* Path not found */ } else if (code >= ERROR_TABLE_BASE_RXK && code < ERROR_TABLE_BASE_RXK + 256) { NTStatus = 0xC0000322L; /* No Kerberos key */ -- 2.39.5