fix: fleets, proxmox and automations not getting the host sudo password

This commit is contained in:
LukeGus committed 2026-10-03 15:31:05 -05:00
1 parent 6f442c5863
commit 5e31642379
8 files changed
+65 -5

No files matched your search

+4 -4
View File
@@ -1357,9 +1357,9 @@ export function registerFleetRoutes(
fleetId,
"manage",
async (host) => {
// Package actions need the host's sudo password, an operational
// secret ctx.hosts.get() leaves out. ctx.ssh.connect resolves the
// full host the connect pipeline uses, which carries it.
// Package actions need the host's sudo password. connect() hands
// back a redacted host, so read it through resolveHost.
const full = await ctx.ssh.resolveHost(host.id);
const connection = await ctx.ssh.connect(host.id, {
purpose: "fleet",
});
@@ -1388,7 +1388,7 @@ export function registerFleetRoutes(
const result = await execElevated(
sshClient,
cmd,
connection.host.sudoPassword as string | undefined,
full?.sudoPassword as string | undefined,
{ forceSudo: true, timeoutMs: 600000 },
);
return {