summaryrefslogtreecommitdiffstats
path: root/fetchmail-model.lua
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2009-05-29 15:29:02 +0000
committerTed Trask <ttrask01@yahoo.com>2009-05-29 15:29:02 +0000
commit9ec5b6b4903cdab7cc03a82304415a0db647c4b6 (patch)
tree2783e90389a20af6cc2b6583cb630f806894686c /fetchmail-model.lua
parent3e7a40ed0af5c07ccdcc5a9cb0d60a9c4df385d5 (diff)
downloadacf-fetchmail-9ec5b6b4903cdab7cc03a82304415a0db647c4b6.tar.bz2
acf-fetchmail-9ec5b6b4903cdab7cc03a82304415a0db647c4b6.tar.xz
Chown /etc/fetchmailrc to user fetchmail for alpine 1.9
Diffstat (limited to 'fetchmail-model.lua')
-rw-r--r--fetchmail-model.lua3
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..'"'))