Repository navigation
Commit 7a152fa
committed
fix(sandbox): make drop_privileges idempotent
When the current euid/egid already equal the policy's resolved target
(e.g. a container entrypoint pre-dropped before exec'ing the sandbox),
skip initgroups(3), which otherwise fails without CAP_SETGID. No
behavioural change when a privilege drop is actually needed.
Signed-off-by: Davanum Srinivas <dsrinivas@nvidia.com>1 parent 82d03f1 commit 7a152fa
1 file changed
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
934 | 934 | | |
935 | 935 | | |
936 | 936 | | |
| 937 | + | |
| 938 | + | |
| 939 | + | |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
937 | 944 | | |
938 | 945 | | |
939 | 946 | | |
| |||
0 commit comments