diff options
Diffstat (limited to 'fetchmail-model.lua')
-rw-r--r-- | fetchmail-model.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fetchmail-model.lua b/fetchmail-model.lua index 10fc46a..eab1701 100644 --- a/fetchmail-model.lua +++ b/fetchmail-model.lua @@ -279,6 +279,7 @@ local function writeentryline(entrystruct, entryline) fs.write_file(configfile, string.gsub(table.concat(lines), "\n+$", "")) posix.chmod(configfile, "rw-------") + posix.chown(configfile, posix.getpasswd("fetchmail", "uid") or 0) config = nil end @@ -396,6 +397,7 @@ function update_filecontent(filedetails) -- FIXME - validation local retval = modelfunctions.setfiledetails(filedetails, {configfile}) posix.chmod(configfile, "rw-------") + posix.chown(configfile, posix.getpasswd("fetchmail", "uid") or 0) config = nil return retval end @@ -450,6 +452,7 @@ function updateconfig(conf) fs.write_file(configfile, table.concat(lines)) posix.chmod(configfile, "rw-------") + posix.chown(configfile, posix.getpasswd("fetchmail", "uid") or 0) config = nil fs.write_file(confdfile, format.update_ini_file(fs.read_file(confdfile) or "", "", "polling_period", '"'..conf.value.interval.value..'"')) |