]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Minor] Don't use O_EXCL flag when creating files from Lua
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Sun, 11 Nov 2018 17:57:26 +0000 (17:57 +0000)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Sun, 11 Nov 2018 17:57:26 +0000 (17:57 +0000)
src/lua/lua_util.c

index 15f6c1b8189fa71be3e3248c6a4f06c5f32dda45..b98feb1b2969ce0617f2b1137401451467677168 100644 (file)
@@ -1872,7 +1872,7 @@ lua_util_create_file (lua_State *L)
                        mode = lua_tointeger (L, 2);
                }
 
-               fd = rspamd_file_xopen (fpath, O_RDWR | O_CREAT | O_EXCL, mode, 0);
+               fd = rspamd_file_xopen (fpath, O_RDWR | O_CREAT | O_TRUNC, mode, 0);
 
                if (fd == -1) {
                        lua_pushnil (L);