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

Thomas Bächler thomas at archlinux.org
Sun Nov 3 13:55:41 EST 2013


Am 03.11.2013 19:06, schrieb Jan Alexander Steffens:
> 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.

What binaries?


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 901 bytes
Desc: OpenPGP digital signature
URL: <http://mailman.archlinux.org/pipermail/arch-projects/attachments/20131103/adb69198/attachment-0001.asc>


More information about the arch-projects mailing list