bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Re : breakage in emacsclient


From: Andrew Eggenberger
Subject: Re: Re : breakage in emacsclient
Date: Thu, 29 Oct 2020 16:12:47 -0500

I think the problem is with the pflocal/io.c implementation of S_io_stat. emacsclient is trying to 
compare the uid provided by geteuid with the uid in the stat buffer from calling fstat on the 
file descriptor of a socket created with cloexec_socket (AF_UNIX, SOCK_STREAM, 0);. But 
S_io_stat doesn't set uid.

This seems to be correct I was able to get the check to pass if I hardcode the st->st_uid in 
S_io_stat in pflocal.io.c. The problem is that /hurd/pflocal is owned by and in the group root,
so when I call getuid() or geteuid() it returns 0 (the uid for root). I tried setting the SETUID bit
of the file itself with

sudo chmod +s /hurd/local

but this had no impact on either result from what I could see. I'm at an impasse, then, because I
can't find a way to get the uid of the user that actually requested the port to put in st_uid.

Any suggestions?

Andrew

reply via email to

[Prev in Thread] Current Thread [Next in Thread]