mirror of
https://github.com/moparisthebest/pacman
synced 2025-02-28 17:31:52 -05:00
Use getuid instead of geteuid
If someone gives the pacman binary setuid permissions, the geteuid check allows it to start running but subsequently fail. As we do not support setting pacman setuid, use getuid to check permissions instead. FS#37174. Signed-off-by: Vladimir A. Nazarenko <naszar@ya.ru> Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
8f5dbd5614
commit
7e767b7e90
@ -1031,7 +1031,7 @@ int main(int argc, char *argv[])
|
||||
size_t i;
|
||||
struct sigaction new_action, old_action;
|
||||
const int signals[] = { SIGHUP, SIGINT, SIGTERM, SIGSEGV };
|
||||
uid_t myuid = geteuid();
|
||||
uid_t myuid = getuid();
|
||||
|
||||
/* Set signal handlers */
|
||||
/* Set up the structure to specify the new action. */
|
||||
|
Loading…
x
Reference in New Issue
Block a user