svn commit: r313913 - head/sys/compat/linux

Dmitry Chagin dchagin at FreeBSD.org
Sat Feb 18 09:39:22 UTC 2017


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;


More information about the svn-src-all mailing list