* net.cc (cygwin_setsockopt): Drop redundant test for AF_LOCAL and

SOCK_STREAM in SO_PEERCRED case, as in the original patch.
This commit is contained in:
Corinna Vinschen 2014-10-13 08:18:18 +00:00
parent 7563a26d9b
commit 6a56366a9e
2 changed files with 6 additions and 3 deletions

View File

@ -1,3 +1,8 @@
2014-10-13 Corinna Vinschen <corinna@vinschen.de>
* 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 <corinna@vinschen.de>
* dlfcn.cc (gfpod_helper): Only check for POSIX dir separator, same as

View File

@ -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 ();