Bug 15712 - setpriv uid/gid support
Summary: setpriv uid/gid support
Status: NEW
Alias: None
Product: Busybox
Classification: Unclassified
Component: Standard Compliance (show other bugs)
Version: 1.35.x
Hardware: All Linux
: P5 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-03 14:29 UTC by Istvan Beregszaszi
Modified: 2023-08-04 08:37 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Istvan Beregszaszi 2023-08-03 14:29:49 UTC
util-linux variant supports the following options:

 --ruid <uid|user>           set real uid
 --euid <uid|user>           set effective uid
 --rgid <gid|user>           set real gid
 --egid <gid|group>          set effective gid
 --reuid <uid|user>          set real and effective uid
 --regid <gid|group>         set real and effective gid

https://github.com/util-linux/util-linux/blob/master/sys-utils/setpriv.1.adoc
Comment 1 bitstreamout 2023-08-04 06:23:49 UTC
Not to forget

```
      --keep-groups
           Preserve supplementary groups. Only useful in conjunction with --rgid, --egid, or --regid.

       --init-groups
           Initialize supplementary groups using initgroups3. Only useful in conjunction with --ruid or --reuid.

```

this in combination is used e.g. in cron jobs as well as in rpm scriplets to create e.g. symbolic links or crate/clean files for system users/groups.