[checkmk-commits] Check_MK Git: check_mk: windows agent: extended file sharing option on CreateFile

git version control git at mathias-kettner.de
Fri Nov 2 12:54:54 CET 2012


Module: check_mk
Branch: master
Commit: f4c46a6868a5d81bc3068a2954afab2dbbf4f900
URL:    http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=f4c46a6868a5d81bc3068a2954afab2dbbf4f900

Author: Andreas Boesl <ab at mathias-kettner.de>
Date:   Fri Nov  2 12:53:52 2012 +0100

windows agent: extended file sharing option on CreateFile

---

 agents/windows/check_mk_agent.cc  |    4 ++--
 agents/windows/check_mk_agent.exe |  Bin 109568 -> 109568 bytes
 agents/windows/install_agent.exe  |  Bin 129960 -> 129962 bytes
 3 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/agents/windows/check_mk_agent.cc b/agents/windows/check_mk_agent.cc
index 53e59c9..15c945e 100755
--- a/agents/windows/check_mk_agent.cc
+++ b/agents/windows/check_mk_agent.cc
@@ -1397,7 +1397,7 @@ bool add_new_logwatch_textfile(const char *full_filename, pattern_container *pat
     
     HANDLE hFile = CreateFile(full_filename,// file to open
            GENERIC_READ,          // open for reading
-           FILE_SHARE_READ,       // share for reading
+           FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE,
            NULL,                  // default security
            OPEN_EXISTING,         // existing file only
            FILE_ATTRIBUTE_NORMAL, // normal file
@@ -1430,7 +1430,7 @@ void update_or_create_logwatch_textfile(const char *full_filename, pattern_conta
         printf("File already exists %s\n", full_filename);
         HANDLE hFile = CreateFile(textfile->path,// file to open
                GENERIC_READ,          // open for reading
-               FILE_SHARE_READ,       // share for reading
+               FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE,
                NULL,                  // default security
                OPEN_EXISTING,         // existing file only
                FILE_ATTRIBUTE_NORMAL, // normal file
diff --git a/agents/windows/check_mk_agent.exe b/agents/windows/check_mk_agent.exe
index 8de1f7a..59e9dd9 100755
Binary files a/agents/windows/check_mk_agent.exe and b/agents/windows/check_mk_agent.exe differ
diff --git a/agents/windows/install_agent.exe b/agents/windows/install_agent.exe
index 1c78a11..fbab14f 100755
Binary files a/agents/windows/install_agent.exe and b/agents/windows/install_agent.exe differ



More information about the checkmk-commits mailing list