Commit c921172
committed
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: d250000
Assisted-by: OpenCode (Claude Opus 4.6)
Signed-off-by: Joseph Marrero Corchado <jmarrero@redhat.com>1 parent 8ef2ae9 commit c921172
1 file changed
Lines changed: 10 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1595 | 1595 | | |
1596 | 1596 | | |
1597 | 1597 | | |
| 1598 | + | |
| 1599 | + | |
| 1600 | + | |
1598 | 1601 | | |
1599 | 1602 | | |
1600 | 1603 | | |
| |||
1603 | 1606 | | |
1604 | 1607 | | |
1605 | 1608 | | |
1606 | | - | |
| 1609 | + | |
| 1610 | + | |
| 1611 | + | |
| 1612 | + | |
| 1613 | + | |
| 1614 | + | |
| 1615 | + | |
1607 | 1616 | | |
1608 | 1617 | | |
1609 | 1618 | | |
| |||
1612 | 1621 | | |
1613 | 1622 | | |
1614 | 1623 | | |
1615 | | - | |
1616 | 1624 | | |
1617 | 1625 | | |
1618 | 1626 | | |
| |||
0 commit comments