From 72e8bac22201e194242e715a107f3b3cb8a480df Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Sat, 19 Sep 2009 04:55:09 -0400 Subject: [PATCH] Windows: Use "Name not found" instead of "File not found" When a file cannot be opened because the name of the file or a directory in the path cannot be found, return "Name not found" instead of "File not found". "File not found" is the error returned by the smb redirector to the application when the file cannot be located in the search path. "Name not found" indicates that the entry is not present at the location requested. The use of "File not found" prevented execution of applications from the \\AFS name space on Windows 7. LICENSE MIT Reviewed-on: http://gerrit.openafs.org/469 Tested-by: Jeffrey Altman Reviewed-by: Jeffrey Altman --- src/WINNT/afsd/smb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/WINNT/afsd/smb.c b/src/WINNT/afsd/smb.c index 8a259a497..7e2ddec9e 100644 --- a/src/WINNT/afsd/smb.c +++ b/src/WINNT/afsd/smb.c @@ -2996,10 +2996,10 @@ void smb_MapNTError(long code, unsigned long *NTStatusp) NTStatus = 0; } else if (code == CM_ERROR_NOSUCHCELL) { - NTStatus = 0xC000000FL; /* No such file */ + NTStatus = 0xC0000034L; /* Name not found */ } else if (code == CM_ERROR_NOSUCHVOLUME) { - NTStatus = 0xC000000FL; /* No such file */ + NTStatus = 0xC0000034L; /* Name not found */ } else if (code == CM_ERROR_TIMEDOUT) { #ifdef COMMENT @@ -3019,7 +3019,7 @@ void smb_MapNTError(long code, unsigned long *NTStatusp) } else if (code == CM_ERROR_NOSUCHFILE || code == CM_ERROR_BPLUS_NOMATCH) { - NTStatus = 0xC000000FL; /* No such file */ + NTStatus = 0xC0000034L; /* Name not found */ } else if (code == CM_ERROR_NOSUCHPATH) { NTStatus = 0xC000003AL; /* Object path not found */ -- 2.39.5