The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=fdff89256fd921e40f2fa532895315b1dab6f5e6
commit fdff89256fd921e40f2fa532895315b1dab6f5e6 Author: Baptiste Daroussin <[email protected]> AuthorDate: 2026-06-04 18:59:30 +0000 Commit: Baptiste Daroussin <[email protected]> CommitDate: 2026-06-04 18:59:30 +0000 nuageinit: fix non-standard f:close(cmd) and remove dead precmd - f:close(cmd) -> f:close() in adduser() and exec_change_password(): the 'cmd' argument is not standard Lua and is silently ignored. - Remove dead 'precmd' variable in adduser(). --- libexec/nuageinit/nuage.lua | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/libexec/nuageinit/nuage.lua b/libexec/nuageinit/nuage.lua index c443d6711b14..7e7b2a64305f 100644 --- a/libexec/nuageinit/nuage.lua +++ b/libexec/nuageinit/nuage.lua @@ -271,7 +271,6 @@ local function adduser(pwd) if not pwd.shell then pwd.shell = "/bin/sh" end - local precmd = "" local postcmd = "" local input = nil if pwd.passwd then @@ -281,7 +280,7 @@ local function adduser(pwd) input = pwd.plain_text_passwd postcmd = " -h 0" end - cmd = precmd .. "pw " + cmd = "pw " if root then cmd = cmd .. "-R " .. root .. " " end @@ -293,7 +292,7 @@ local function adduser(pwd) if input then f:write(input) end - local r = f:close(cmd) + local r = f:close() if not r then warnmsg("fail to add user " .. pwd.name) warnmsg(cmd) @@ -536,7 +535,7 @@ local function exec_change_password(user, password, type, expire) f:write(input) end -- ignore stdout to avoid printing the password in case of random password - local r = f:close(cmd) + local r = f:close() if not r then warnmsg("fail to change user password ".. user) warnmsg(cmd)
