Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 18 Feb 2017 09:39:21 +0000 (UTC)
From:      Dmitry Chagin <dchagin@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r313913 - head/sys/compat/linux
Message-ID:  <201702180939.v1I9dL2o019485@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dchagin
Date: Sat Feb 18 09:39:20 2017
New Revision: 313913
URL: https://svnweb.freebsd.org/changeset/base/313913

Log:
  Initialize cap_rights before use.
  
  MFC after:	1 week

Modified:
  head/sys/compat/linux/linux_socket.c

Modified: head/sys/compat/linux/linux_socket.c
==============================================================================
--- head/sys/compat/linux/linux_socket.c	Sat Feb 18 07:21:50 2017	(r313912)
+++ head/sys/compat/linux/linux_socket.c	Sat Feb 18 09:39:20 2017	(r313913)
@@ -843,7 +843,8 @@ linux_accept_common(struct thread *td, i
 		if (error == EFAULT && namelen != sizeof(struct sockaddr_in))
 			return (EINVAL);
 		if (error == EINVAL) {
-			error1 = getsock_cap(td, s, &rights, &fp, NULL, NULL);
+			error1 = getsock_cap(td, s,
+			    cap_rights_init(&rights, CAP_ACCEPT), &fp, NULL, NULL);
 			if (error1 != 0)
 				return (error1);
 			so = fp->f_data;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201702180939.v1I9dL2o019485>