Commit 83de3ff
committed
Skip privilege drop when already running as target user
When rc.d uses daemon_user to run the process as an
unprivileged user, the config may also specify the same
user. setgroups requires root and fails with EPERM.
Skip the drop if getuid already matches the target.1 parent 16da988 commit 83de3ff
1 file changed
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1730 | 1730 | | |
1731 | 1731 | | |
1732 | 1732 | | |
| 1733 | + | |
| 1734 | + | |
1733 | 1735 | | |
1734 | 1736 | | |
1735 | 1737 | | |
| |||
0 commit comments