From owner-freebsd-current Fri Jan 24 04:54:56 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id EAA27141 for current-outgoing; Fri, 24 Jan 1997 04:54:56 -0800 (PST) Received: from verdi.nethelp.no (verdi.nethelp.no [193.91.212.2]) by freefall.freebsd.org (8.8.5/8.8.5) with SMTP id EAA27135 for ; Fri, 24 Jan 1997 04:54:50 -0800 (PST) From: sthaug@nethelp.no Received: (qmail 20543 invoked by uid 1001); 24 Jan 1997 12:54:08 +0000 (GMT) To: current@freebsd.org Subject: Minor correction to lib/libc/sys/send.2: EACCES error code X-Mailer: Mew version 1.05+ on Emacs 19.28.2 Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Date: Fri, 24 Jan 1997 13:54:08 +0100 Message-ID: <20541.854110448@verdi.nethelp.no> Sender: owner-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk (This may not be the right place to send corrections - but it wasn't obvious what would be better.) send/sendto/sendmsg can return EACCES, and this is not documented. See the following code segment from sys/netinet/ip_output.c: if ((flags & IP_ALLOWBROADCAST) == 0) { error = EACCES; goto bad; } Here is a proposed context diff for 3.0-970114-SNAP/src/lib/libc/sys. Please note that I haven't checked whether this applies to other than IP. Steinar Haug, Nethelp consulting, sthaug@nethelp.no ---------------------------------------------------------------------- *** send.2.orig Tue Jan 14 07:07:28 1997 --- send.2 Fri Jan 24 13:39:56 1997 *************** *** 143,148 **** --- 143,151 ---- .Fn sendmsg fail if: .Bl -tag -width [EMSGSIZE] + .It Bq Er EACCES + The destination address is a broadcast address, and SO_BROADCAST + has not been set on the socket. .It Bq Er EBADF An invalid descriptor was specified. .It Bq Er ENOTSOCK