Commit 1fd4117
cli: Handle PermissionDenied when reading /proc/1/ns/ipc
In restricted build environments such as Tekton/Buildah containers,
/proc/1/ns/ipc can be masked even when the process has CAP_SYS_ADMIN.
The read_link() call fails with EACCES, which causes bootc to exit
with a fatal error.
Handle PermissionDenied by silently skipping the IPC namespace join,
consistent with the existing CAP_SYS_ADMIN gate.
Also drop tracing::debug! from join_host_ipc_namespace() since tracing
is not yet initialized when global_init() runs.
Fixes: bootc-dev@d250000
Assisted-by: OpenCode (Claude Opus 4.6)
Signed-off-by: Joseph Marrero Corchado <jmarrero@redhat.com>1 parent 298bb47 commit 1fd4117
1 file changed
Lines changed: 10 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1620 | 1620 | | |
1621 | 1621 | | |
1622 | 1622 | | |
| 1623 | + | |
| 1624 | + | |
| 1625 | + | |
1623 | 1626 | | |
1624 | 1627 | | |
1625 | 1628 | | |
| |||
1628 | 1631 | | |
1629 | 1632 | | |
1630 | 1633 | | |
1631 | | - | |
| 1634 | + | |
| 1635 | + | |
| 1636 | + | |
| 1637 | + | |
| 1638 | + | |
| 1639 | + | |
| 1640 | + | |
1632 | 1641 | | |
1633 | 1642 | | |
1634 | 1643 | | |
| |||
1637 | 1646 | | |
1638 | 1647 | | |
1639 | 1648 | | |
1640 | | - | |
1641 | 1649 | | |
1642 | 1650 | | |
1643 | 1651 | | |
| |||
0 commit comments