summaryrefslogtreecommitdiffstats
path: root/heimdal-model.lua
diff options
context:
space:
mode:
Diffstat (limited to 'heimdal-model.lua')
-rw-r--r--heimdal-model.lua12
1 files changed, 8 insertions, 4 deletions
diff --git a/heimdal-model.lua b/heimdal-model.lua
index 7458c92..abf3745 100644
--- a/heimdal-model.lua
+++ b/heimdal-model.lua
@@ -68,11 +68,15 @@ function klist()
return cfe({ value=result, label="List of Kerberos Tickets" })
end
-function kdestroy()
+function get_kdestroy()
+ return cfe({ type="group", value={}, label="Destroy Tickets" })
+end
+
+function kdestroy(self, kd)
local cmd = path.."kdestroy"
local f = io.popen(cmd)
- local result = f:read("*a") or ""
+ kd.descr = f:read("*a") or ""
f:close()
- if result == "" then result = "Success" end
- return cfe({ value=result, label="Result of kdestroy" })
+ if kd.descr == "" then kd.descr = "Successfully Destroyed Tickets" end
+ return kd
end