[pacman-dev] [PATCH] use getuid instead of geteuid
From: "Vladimir A. Nazarenko" <naszar@ya.ru> Signed-off-by: Vladimir A. Nazarenko <naszar@ya.ru> --- src/pacman/pacman.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c index f485692..169fbc2 100644 --- a/src/pacman/pacman.c +++ b/src/pacman/pacman.c @@ -1030,7 +1030,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. */ -- 1.8.4
On 20/10/13 17:27, Allan McRae wrote:
From: "Vladimir A. Nazarenko" <naszar@ya.ru>
I'm going to add a message that this prevents pacman attempting to work when the binary is set as setuid. FS#37174.
Signed-off-by: Vladimir A. Nazarenko <naszar@ya.ru> --- src/pacman/pacman.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/pacman/pacman.c b/src/pacman/pacman.c index f485692..169fbc2 100644 --- a/src/pacman/pacman.c +++ b/src/pacman/pacman.c @@ -1030,7 +1030,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. */
participants (1)
-
Allan McRae