#include "vmware/tools/utils.h"
#include <stdio.h>
+#include <sys/stat.h>
#ifdef _WIN32
#include <windows.h>
*
* DeployPkgLog_Open --
*
- * Init the log. Creates a file in %temp%/vmware and
- * opens it for writing. On error, the file will not be opened and logging
+ * Init the log. Creates a file in %temp%/vmware and
+ * opens it for writing. On linux, only root own r/w right.
+ * On error, the file will not be opened and logging
* will be disabled.
*
* Results:
if (ret == 0) {
return;
}
-
+
Str_Strcat(logPath, "vmware-imc", sizeof logPath);
#else
Str_Strcpy(logPath, "/var/log/vmware-imc", sizeof logPath);
if (_file != NULL) {
#ifndef _WIN32
setlinebuf(_file);
+ (void) chmod(logPath, 0600);
#endif
DeployPkgLog_Log(log_debug, "## Starting deploy pkg operation");
}