mirror of
https://github.com/Llewellynvdm/Tomb.git
synced 2024-11-12 07:46:28 +00:00
tomb forge: useless sudo and chown
Depending script invokation, behavior is not exactly similar. Assuming that if SUDO_USER is set, the _sudo invokation can be dropped (EUID=0). In the other case, user has created file, owner is already good, don't call chown. Preparation: $ tomb dig foo.tomb -s 10 Method 1: $ sudo tomb forge foo.tomb.key -v Method 2: $ tomb forge foo.tomb.key -v ... ask user password to gain superuser privileges ... Sorry, user <username> is not allowed to execute '/bin/chown <uid>:<gid> foo.tomb.key' as root on <hostname>. Signed-off-by: Matthieu Crapet <mcrapet@gmail.com>
This commit is contained in:
parent
99f10bf215
commit
02812f4c06
Loading…
Reference in New Issue
Block a user