3 Nov
2013
3 Nov
'13
6:55 p.m.
Am 03.11.2013 19:06, schrieb Jan Alexander Steffens:
On Sun, Nov 3, 2013 at 11:14 AM, Thomas Bächler <thomas@archlinux.org> wrote:
+switch_user() { + local user + + user=$(whoami) + if [[ $user != $DBSCRIPTS_USER ]]; then + exec sudo -u $DBSCRIPTS_USER "$@" + fi +}
Instead of using sudo and adding a convenience hack to the binary, could we use setuid?
E.g. The binaries are chown dbscripts_packages:dev (or dbscripts_community:tu) and chmod 4554.
What binaries?