diff options
author | 2014-07-31 16:57:42 +0800 | |
---|---|---|
committer | 2014-07-31 16:57:42 +0800 | |
commit | af14cf8f8bedd69c5ce3259758ba96ffd2ca7b4e (patch) | |
tree | 77dee6fa2b9c823348f638b37df6b829a63ffba8 /fishd.cpp | |
parent | c0989dce2d882c94eb3183e7b94402ba53534abb (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.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
@@ -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); |