From 6a56366a9eb80ad26ca2bb97ce424b40cf25933e Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Mon, 13 Oct 2014 08:18:18 +0000 Subject: [PATCH] * net.cc (cygwin_setsockopt): Drop redundant test for AF_LOCAL and SOCK_STREAM in SO_PEERCRED case, as in the original patch. --- winsup/cygwin/ChangeLog | 5 +++++ winsup/cygwin/net.cc | 4 +--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 26cc2f8d2..9c7395943 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2014-10-13 Corinna Vinschen + + * net.cc (cygwin_setsockopt): Drop redundant test for AF_LOCAL and + SOCK_STREAM in SO_PEERCRED case, as in the original patch. + 2014-10-12 Corinna Vinschen * dlfcn.cc (gfpod_helper): Only check for POSIX dir separator, same as diff --git a/winsup/cygwin/net.cc b/winsup/cygwin/net.cc index a01dbedf1..8ff88ba11 100644 --- a/winsup/cygwin/net.cc +++ b/winsup/cygwin/net.cc @@ -820,9 +820,7 @@ cygwin_setsockopt (int fd, int level, int optname, const void *optval, SO_PEERCRED credentials. */ if (level == SOL_SOCKET && optname == SO_PEERCRED) { - if (optval || optlen - || fh->get_addr_family () != AF_LOCAL - || fh->get_socket_type () != SOCK_STREAM) + if (optval || optlen) set_errno (EINVAL); else res = fh->af_local_set_no_getpeereid ();