git: 7e11a18e74ba - main - nuageinit: Use -n with pw usershow
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 19 Nov 2026 14:56:28 UTC
The branch main has been updated by emaste:
URL: https://cgit.FreeBSD.org/src/commit/?id=7e11a18e74baf3fe6491b36249f8dfea8230d842
commit 7e11a18e74baf3fe6491b36249f8dfea8230d842
Author: Ed Maste <emaste@FreeBSD.org>
AuthorDate: 2026-11-19 14:32:51 +0000
Commit: Ed Maste <emaste@FreeBSD.org>
CommitDate: 2026-11-19 14:56:10 +0000
nuageinit: Use -n with pw usershow
We previously used `"pw usershow " .. shell_escape(pwd.name)`, which
returns root's info for a user named `0`. Add `-n` to explicitly
perform a name lookup.
Reported by: llm-postcr
Reviewed by: bapt
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D61753
---
libexec/nuageinit/nuage.lua | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libexec/nuageinit/nuage.lua b/libexec/nuageinit/nuage.lua
index 5dc8c5d30110..c69155b0aae7 100644
--- a/libexec/nuageinit/nuage.lua
+++ b/libexec/nuageinit/nuage.lua
@@ -322,7 +322,7 @@ local function adduser(pwd)
if root then
cmd = cmd .. "-R " .. root .. " "
end
- local f = io.popen(cmd .. " usershow " .. shell_escape(pwd.name) .. " -7 2> /dev/null")
+ local f = io.popen(cmd .. " usershow -n " .. shell_escape(pwd.name) .. " -7 2> /dev/null")
local pwdstr = f:read("*a")
f:close()
if pwdstr:len() ~= 0 then