Commit dbca4df
committed
orchestrator: warn when elevated privileges discard the environment
A privilege-gaining exec — set-uid, set-gid, or one carrying file
capabilities — has its KASLD_* settings dropped before main() runs, and
nothing in the run said so. The difference is not cosmetic: a discarded
KASLD_SYSROOT means the readout describes the machine doing the analysis
while the caller named a captured tree, and the default output mentions
no sysroot at all, so there was nothing to notice. The same command
against the same absent sysroot resolves 3 facts unprivileged and 141
set-gid, the gap being the whole live host.
Print one line on stderr beside the environment snapshot when the exec
gained privilege, naming the consequence rather than only the cause: this
readout describes the local system. It goes out even under --quiet, which
suppresses progress noise rather than a caveat on the answer, matching
the component-limit warning already there.
Unconditional on a privileged exec, because the variables are gone by the
time main() could ask which of them were set, and true whichever were:
the sysroot is dropped on every such run. kasld(1) records that the run
reports this, beside the env_reset note it already carried.1 parent eb0c940 commit dbca4df
2 files changed
Lines changed: 15 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
196 | | - | |
| 196 | + | |
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4749 | 4749 | | |
4750 | 4750 | | |
4751 | 4751 | | |
| 4752 | + | |
| 4753 | + | |
| 4754 | + | |
| 4755 | + | |
| 4756 | + | |
| 4757 | + | |
| 4758 | + | |
| 4759 | + | |
| 4760 | + | |
| 4761 | + | |
| 4762 | + | |
| 4763 | + | |
| 4764 | + | |
| 4765 | + | |
4752 | 4766 | | |
4753 | 4767 | | |
4754 | 4768 | | |
| |||
0 commit comments