From 0ae3c93acaec04b1bea8098a921a235340744d36 Mon Sep 17 00:00:00 2001 From: ttrask Date: Thu, 19 Mar 2009 14:12:35 +0000 Subject: 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 --- lib/authenticator-plaintext.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/authenticator-plaintext.lua') 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} -- cgit v1.2.3