diff options
author | ttrask <ttrask@ab2d0c66-481e-0410-8bed-d214d4d58bed> | 2009-03-19 14:12:35 +0000 |
---|---|---|
committer | ttrask <ttrask@ab2d0c66-481e-0410-8bed-d214d4d58bed> | 2009-03-19 14:12:35 +0000 |
commit | 0ae3c93acaec04b1bea8098a921a235340744d36 (patch) | |
tree | 5d3aa6e1dd968042e3edbedb9c6ca5df5b17cb45 /lib/authenticator-plaintext.lua | |
parent | 969224c2e6c50ba63ef82f6afa2920d8b065f845 (diff) | |
download | acf-core-0ae3c93acaec04b1bea8098a921a235340744d36.tar.bz2 acf-core-0ae3c93acaec04b1bea8098a921a235340744d36.tar.xz |
Set permissions 600 on passwd and roles file if creating them.
git-svn-id: svn://svn.alpinelinux.org/acf/core/trunk@1734 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'lib/authenticator-plaintext.lua')
-rw-r--r-- | lib/authenticator-plaintext.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/authenticator-plaintext.lua b/lib/authenticator-plaintext.lua index ad6c632..2b6a064 100644 --- a/lib/authenticator-plaintext.lua +++ b/lib/authenticator-plaintext.lua @@ -65,7 +65,7 @@ write_entry = function(self, tabl, field, id, entry) -- Set path to passwordfile local passwd_path = self.conf.confdir .. field .. tabl -- Write the newline into the file - if fs.is_file(passwd_path) == false then fs.create_file(passwd_path) end + if fs.is_file(passwd_path) == false then fs.create_file(passwd_path) posix.chmod(passwd_path, "rw-------") end if fs.is_file(passwd_path) == false then return false end local passwdfilecontent = fs.read_file_as_array(passwd_path) or {} local output = {id .. ":" .. entry} |