mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-13 21:49:38 +00:00
* fix(daemon): skip machine-scope fallback on permission-denied bus errors; fall back to --user when sudo machine scope fails When systemctl --user fails with "Failed to connect to bus: Permission denied", the machine-scope fallback is now skipped. A Permission denied error means the bus socket exists but the process cannot connect to it, so --machine user@ would hit the same wall. Additionally, the sudo path in execSystemctlUser now tries machine scope first but falls through to a direct --user attempt if it fails, instead of returning the error immediately. Fixes #61959 * fix(daemon): guard against double machine-scope call when sudo path already tried it When SUDO_USER is set and machine scope fails with a non-permission-denied bus error, execution falls through to the direct --user attempt. If that also fails with a bus-unavailable message, shouldFallbackToMachineUserScope returns true and machine scope is tried a second time -- a redundant exec that was never reachable before this PR opened the fallthrough path. Add machineScopeAlreadyTried flag and include it in the bottom-fallback guard condition so the second call is skipped when machine scope was already attempted in the sudo branch. Add regression test asserting exactly 2 execFile calls in this scenario. * fix: keep sudo systemctl scoped --------- Co-authored-by: Peter Steinberger <steipete@gmail.com> |
||
|---|---|---|
| .. | ||
| test-helpers | ||
| arg-split.ts | ||
| cmd-argv.test.ts | ||
| cmd-argv.ts | ||
| cmd-set.ts | ||
| constants.test.ts | ||
| constants.ts | ||
| container-context.ts | ||
| diagnostics.ts | ||
| exec-file.ts | ||
| inspect.test.ts | ||
| inspect.ts | ||
| launchd-plist.ts | ||
| launchd-restart-handoff.test.ts | ||
| launchd-restart-handoff.ts | ||
| launchd.integration.e2e.test.ts | ||
| launchd.test.ts | ||
| launchd.ts | ||
| node-service.ts | ||
| output.ts | ||
| paths.ts | ||
| program-args.test.ts | ||
| program-args.ts | ||
| runtime-binary.test.ts | ||
| runtime-binary.ts | ||
| runtime-format.ts | ||
| runtime-hints.test.ts | ||
| runtime-hints.ts | ||
| runtime-hints.windows-paths.test.ts | ||
| runtime-parse.ts | ||
| runtime-paths.test.ts | ||
| runtime-paths.ts | ||
| schtasks-exec.test.ts | ||
| schtasks-exec.ts | ||
| schtasks.install.test.ts | ||
| schtasks.startup-fallback.test.ts | ||
| schtasks.stop.test.ts | ||
| schtasks.test.ts | ||
| schtasks.ts | ||
| service-audit.test.ts | ||
| service-audit.ts | ||
| service-env.test.ts | ||
| service-env.ts | ||
| service-runtime.ts | ||
| service-types.ts | ||
| service.test-helpers.ts | ||
| service.test.ts | ||
| service.ts | ||
| systemd-hints.test.ts | ||
| systemd-hints.ts | ||
| systemd-linger.ts | ||
| systemd-unavailable.test.ts | ||
| systemd-unavailable.ts | ||
| systemd-unit.test.ts | ||
| systemd-unit.ts | ||
| systemd.test.ts | ||
| systemd.ts | ||