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;
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to