[pacman-dev] [PATCH] use getuid instead of geteuid

Allan McRae allan at archlinux.org
Sun Oct 20 03:48:46 EDT 2013


On 20/10/13 17:27, Allan McRae wrote:
> From: "Vladimir A. Nazarenko" <naszar at 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 at 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. */
> 



More information about the pacman-dev mailing list