mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
16 lines
335 B
Lua
16 lines
335 B
Lua
|
|
#!/usr/libexec/flua
|
||
|
|
|
||
|
|
local n = require("nuage")
|
||
|
|
if n.adduser() then
|
||
|
|
n.err("adduser should not accept empty value")
|
||
|
|
end
|
||
|
|
if n.adduser("plop") then
|
||
|
|
n.err("adduser should not accept empty value")
|
||
|
|
end
|
||
|
|
local pw = {}
|
||
|
|
pw.name = "impossible_username"
|
||
|
|
local res = n.adduser(pw)
|
||
|
|
if not res then
|
||
|
|
n.err("valid adduser should return a path")
|
||
|
|
end
|