[arch-projects] [dbscripts] [RFC] Perform all database and copy operations using a dedicated user

Jan Alexander Steffens jan.steffens at gmail.com
Sun Nov 3 13:06:20 EST 2013


On Sun, Nov 3, 2013 at 11:14 AM, Thomas Bächler <thomas at 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.

Or is the distinction of EUID/RUID a problem here?


More information about the arch-projects mailing list