aboutsummaryrefslogtreecommitdiffhomepage
path: root/fishd.cpp
diff options
context:
space:
mode:
authorGravatar David Adam <zanchey@ucc.gu.uwa.edu.au>2014-07-31 16:57:42 +0800
committerGravatar David Adam <zanchey@ucc.gu.uwa.edu.au>2014-07-31 16:57:42 +0800
commitaf14cf8f8bedd69c5ce3259758ba96ffd2ca7b4e (patch)
tree77dee6fa2b9c823348f638b37df6b829a63ffba8 /fishd.cpp
parentc0989dce2d882c94eb3183e7b94402ba53534abb (diff)
Revert "Check effective credentials of socket peers"
This reverts commit 8412c867a501e3a68e55fef6215e86d3ac9f617b. Just checking the credentials of the peer turns out to be insufficient. See https://github.com/fish-shell/fish-shell/issues/1436.
Diffstat (limited to 'fishd.cpp')
-rw-r--r--fishd.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/fishd.cpp b/fishd.cpp
index 1e095244..edb79c22 100644
--- a/fishd.cpp
+++ b/fishd.cpp
@@ -880,8 +880,6 @@ int main(int argc, char ** argv)
int child_socket;
struct sockaddr_un remote;
socklen_t t;
- uid_t sock_euid;
- gid_t sock_egid;
int max_fd;
int update_count=0;
@@ -1002,12 +1000,7 @@ int main(int argc, char ** argv)
{
debug(4, L"Connected with new child on fd %d", child_socket);
- if (((getpeereid(child_socket, &sock_euid, &sock_egid) != 0) || sock_euid != geteuid()))
- {
- debug(1, L"Wrong credentials for child on fd %d", child_socket);
- close(child_socket);
- }
- else if (make_fd_nonblocking(child_socket) != 0)
+ if (make_fd_nonblocking(child_socket) != 0)
{
wperror(L"fcntl");
close(child_socket);