Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#1003059: ITP: su-exec -- switch user and group id, setgroups and exec

10 views
Skip to first unread message

Matteo Chesi

unread,
Jan 3, 2022, 9:40:04 AM1/3/22
to

Package: wnpp
Severity: wishlist

* Package name : su-exec
Version: 0.2, latest commit 2019-02-26
Upstream Author : Natanael Copa <nc...@alpinelinux.org>
* URL : https://github.com/ncopa/su-exec
* License : MIT
Description : switch user and group id, setgroups and exec

This is an alternative to gosu written in C.

It is minimal and already present in alpine linux.
It would be useful to have it for container environments.

Ansgar

unread,
Jan 5, 2022, 6:20:05 AM1/5/22
to
On Mon, 03 Jan 2022 15:21:48 +0100 Matteo Chesi wrote:
> * Package name : su-exec
>    Description : switch user and group id, setgroups and exec
>
> This is an alternative to gosu written in C.

In Debian the essential util-linux package already provides "setpriv".
Is there any reason to use su-exec instead of it?

Ansgar

Matteo Chesi

unread,
Jan 5, 2022, 6:40:03 AM1/5/22
to
Thanks Ansgar,

I did not know setpriv, I will test if it can replace su-exec on my
containers.

Probably the main reason could be binary size on certain small
systems/containers:

$ du -sh /usr/sbin/gosu
2.3M /usr/sbin/gosu
$ du -sh /usr/bin/setpriv
52K /usr/bin/setpriv
$ du -sh /usr/bin/su-exec
16K /usr/bin/su-exec

Best Regards,
Matteo
0 new messages