diff options
Diffstat (limited to 'password-model.lua')
-rw-r--r-- | password-model.lua | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/password-model.lua b/password-model.lua index eeabd9c..2f81bff 100644 --- a/password-model.lua +++ b/password-model.lua @@ -1,13 +1,13 @@ -- password model methods module (..., package.seeall) -require "fs" +require "format" -- no initializer in model - use controller.init for that get = function (self) - f = io.open ("/etc/shadow") - c = f:read("*l") - temp = fs.string_to_table(":", c) +--hardcoded for root now + f = format.search_for_lines("/etc/shadow", "root:") + temp = format.string_to_table(":", f) if temp[2] == "!" then status = "not set" else |