From 7563119ac9703d51b7b9c9ffd4e2f7fb8b40746b Mon Sep 17 00:00:00 2001 From: Mike Mason Date: Thu, 14 Feb 2008 22:03:42 +0000 Subject: Getting menu and permission to start working together. Just test code most commented out. git-svn-id: svn://svn.alpinelinux.org/acf/alpine-baselayout/trunk@723 ab2d0c66-481e-0410-8bed-d214d4d58bed --- password-model.lua | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'password-model.lua') diff --git a/password-model.lua b/password-model.lua index e4dfb22..376c0e2 100644 --- a/password-model.lua +++ b/password-model.lua @@ -4,21 +4,8 @@ require "format" -- no initializer in model - use controller.init for that -get = function (self) ---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 - status = "set" - end - f:close() - return (cfe{value=status, name="password"}) -end - --setup so that it will compare password input -set = function (self, cmd1, cmd2) +set = function (self, userid, cmd1, cmd2) if cmd1 ~= cmd2 then report = "Invalid or non matching password. Try again" else command = "/usr/bin/cryptpw" .. " " .. cmd1 -- cgit v1.2.3