On Sat, Nov 30, 2024 at 10:02:49AM +0000, Klemens Nanni wrote: > Can't this be what a couple of base scripts do in their unpriv() helper? > > su -s /bin/sh "$INSTALLUSER" -c "'$@'"
Sorry for the double posting. This doesn't work as it is, because in unpriv it's an eval. Without eval, the construction stops working the moment you add parameters. For the eval option, I don't really like it, as it becomes super difficult to understand how the quotes interact. I'm sending a patch in tech@ for discussion about that.