summaryrefslogtreecommitdiffstats
path: root/lib/authenticator-plaintext.lua
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2008-07-25 19:00:03 +0000
committerTed Trask <ttrask01@yahoo.com>2008-07-25 19:00:03 +0000
commit4bf00bc98b36c0233e1ea833571acffefe2ec73b (patch)
tree13379b4d21cedc5a3137a508db94e3e243d3d6de /lib/authenticator-plaintext.lua
parent0b933c7c8b5daf0fd62d9f9dfef973b8383250f1 (diff)
downloadacf-core-4bf00bc98b36c0233e1ea833571acffefe2ec73b.tar.bz2
acf-core-4bf00bc98b36c0233e1ea833571acffefe2ec73b.tar.xz
Modified authenticator to allow reading/writing role-based options. Modified viewfunctions to display multi values that are not in options.
git-svn-id: svn://svn.alpinelinux.org/acf/core/trunk@1320 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'lib/authenticator-plaintext.lua')
-rw-r--r--lib/authenticator-plaintext.lua10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/authenticator-plaintext.lua b/lib/authenticator-plaintext.lua
index c72b7c5..aa3e2e3 100644
--- a/lib/authenticator-plaintext.lua
+++ b/lib/authenticator-plaintext.lua
@@ -16,7 +16,7 @@ read_field = function(self, tabl, field)
local row = {}
-- open our password file
- local passwd_path = self.conf.confdir .. tabl .. field
+ local passwd_path = self.conf.confdir .. field .. tabl
local f = io.open(passwd_path)
if f then
local m = (f:read("*all") or "" ).. "\n"
@@ -37,7 +37,7 @@ delete_field = function(self, tabl, field)
if not tabl or tabl == "" or not field then
return false
end
- local passwd_path = self.conf.confdir .. tabl .. field
+ local passwd_path = self.conf.confdir .. field .. tabl
os.remove(passwd_path)
return true
end
@@ -49,7 +49,7 @@ write_entry = function(self, tabl, field, id, entry)
delete_entry(self, tabl, field, id)
-- Set path to passwordfile
- local passwd_path = self.conf.confdir .. tabl .. field
+ 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 return false end
@@ -62,7 +62,7 @@ read_entry = function(self, tabl, field, id)
return nil
end
-- Set path to passwordfile
- local passwd_path = self.conf.confdir .. tabl .. field
+ local passwd_path = self.conf.confdir .. field .. tabl
local passwdfilecontent = fs.read_file_as_array(passwd_path) or {}
local entry
for k,v in pairs(passwdfilecontent) do
@@ -79,7 +79,7 @@ delete_entry = function (self, tabl, field, id)
end
local result = false
- local passwd_path = self.conf.confdir .. tabl .. field
+ local passwd_path = self.conf.confdir .. field .. tabl
local passwdfilecontent = fs.read_file_as_array(passwd_path) or {}
local output = {}
for k,v in pairs(passwdfilecontent) do