svn commit: r297306 - stable/10/sys/compat/linux

Dmitry Chagin dchagin at FreeBSD.org
Sun Mar 27 07:34:43 UTC 2016


Author: dchagin
Date: Sun Mar 27 07:34:42 2016
New Revision: 297306
URL: https://svnweb.freebsd.org/changeset/base/297306

Log:
  Revert r297303.

Modified:
  stable/10/sys/compat/linux/linux_socket.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/compat/linux/linux_socket.c
==============================================================================
--- stable/10/sys/compat/linux/linux_socket.c	Sun Mar 27 06:55:49 2016	(r297305)
+++ stable/10/sys/compat/linux/linux_socket.c	Sun Mar 27 07:34:42 2016	(r297306)
@@ -838,10 +838,7 @@ linux_accept_common(struct thread *td, i
 		socklen_t * __restrict anamelen;
 		int	flags;
 	} */ bsd_args;
-	cap_rights_t rights;
-	struct socket *so;
-	struct file *fp;
-	int error, error1;
+	int error;
 
 	bsd_args.s = s;
 	/* XXX: */
@@ -856,17 +853,6 @@ linux_accept_common(struct thread *td, i
 	if (error) {
 		if (error == EFAULT && namelen != sizeof(struct sockaddr_in))
 			return (EINVAL);
-		if (error == EINVAL) {
-			error1 = getsock_cap(td, s, &rights, &fp, NULL);
-			if (error1 != 0)
-				return (error1);
-			so = fp->f_data;
-			if (so->so_type == SOCK_DGRAM) {
-				fdrop(fp, td);
-				return (EOPNOTSUPP);
-			}
-			fdrop(fp, td);
-		}
 		return (error);
 	}
 	if (addr)


More information about the svn-src-all mailing list