Date: Wed, 08 Apr 2020 19:25:18 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 245314] /usr/bin/logger: cannot write to unix socket or network socket to log since r358919 Message-ID: <bug-245314-227-HJael3tkS9@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-245314-227@https.bugs.freebsd.org/bugzilla/> References: <bug-245314-227@https.bugs.freebsd.org/bugzilla/>
index | next in thread | previous in thread | raw e-mail
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=245314 --- Comment #5 from Conrad Meyer <cem@freebsd.org> --- It seems like that check in sendit() is bogus. In kern_sendit(), we permit msg_name == NULL if CAP_CONNECT is present: 730 int 731 kern_sendit(struct thread *td, int s, struct msghdr *mp, int flags, 732 struct mbuf *control, enum uio_seg segflg) 733 { 734 struct file *fp; 735 struct uio auio; 736 struct iovec *iov; 737 struct socket *so; 738 cap_rights_t *rights; 739 #ifdef KTRACE 740 struct uio *ktruio = NULL; 741 #endif 742 ssize_t len; 743 int i, error; 744 745 AUDIT_ARG_FD(s); 746 rights = &cap_send_rights; 747 if (mp->msg_name != NULL) { 748 AUDIT_ARG_SOCKADDR(td, AT_FDCWD, mp->msg_name); 749 rights = &cap_send_connect_rights; 750 } 751 error = getsock_cap(td, s, rights, &fp, NULL, NULL); And sendit() is just a shim around kern_sendit(). -- You are receiving this mail because: You are the assignee for the bug.help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-245314-227-HJael3tkS9>
