]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Return proper error for ChangeFileAttributesInGuest API.
authorVMware, Inc <>
Mon, 15 Oct 2012 04:48:20 +0000 (21:48 -0700)
committerDmitry Torokhov <dtor@vmware.com>
Fri, 19 Oct 2012 18:32:39 +0000 (11:32 -0700)
When a user executes ChangeFileAttributesInGuest(), the code calls
File_Exists() to check if the file exists. If File_Exists() fails,
then the code used to return a hard-coded error, but it is much
better to convert the errno/GetLastError() into a more meaningful
error.

Signed-off-by: Dmitry Torokhov <dtor@vmware.com>
open-vm-tools/services/plugins/vix/vixTools.c

index 88397ae2fa5d2354836ed06575c3bdfd62d4b221..a8e5e77b43c24883eecfc7300f88ae8335cd4e0b 100644 (file)
@@ -6428,7 +6428,7 @@ VixToolsSetFileAttributes(VixCommandRequestHeader *requestMsg)    // IN
    impersonatingVMWareUser = TRUE;
 
    if (!(File_Exists(filePathName))) {
-      err = VIX_E_FILE_NOT_FOUND;
+      err = FoundryToolsDaemon_TranslateSystemErr();
       goto abort;
    }