From owner-cvs-all@FreeBSD.ORG Wed Jul 23 15:00:09 2003 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9F1FC37B401; Wed, 23 Jul 2003 15:00:09 -0700 (PDT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4AFD643F85; Wed, 23 Jul 2003 15:00:09 -0700 (PDT) (envelope-from dds@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id h6NM090U035870; Wed, 23 Jul 2003 15:00:09 -0700 (PDT) (envelope-from dds@repoman.freebsd.org) Received: (from dds@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id h6NM08vo035869; Wed, 23 Jul 2003 15:00:08 -0700 (PDT) Message-Id: <200307232200.h6NM08vo035869@repoman.freebsd.org> From: Diomidis Spinellis Date: Wed, 23 Jul 2003 15:00:08 -0700 (PDT) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/lib/libc/sys connect.2 X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Jul 2003 22:00:10 -0000 dds 2003/07/23 15:00:08 PDT FreeBSD src repository Modified files: lib/libc/sys connect.2 Log: Document an additional error return value. The connect(2) call can also return EACCES on non-Unix domain sockets as demonstrated by the following program: #include #include #include #include #include #include #include #include int main(int argc, char *argv[]) { struct sockaddr_in rem_addr; int sock; if ((sock = socket(AF_INET, SOCK_STREAM, 0)) < 0) { perror("socket"); exit(1); } bzero((char *)&rem_addr, sizeof(rem_addr)); rem_addr.sin_family = AF_INET; rem_addr.sin_addr.s_addr = INADDR_NONE; rem_addr.sin_port = htons(10000); if (connect(sock, (struct sockaddr *)&rem_addr, sizeof(rem_addr)) < 0) { perror("connect"); exit(1); } } The call chain returning this value is probably: kern/uipc_syscalls.c:connect kern/uipc_socket.c:soconnect netinet/tcp_usrreq.c:tcp_usr_connect netinet/tcp_output.c:tcp_output netinet/ip_output.c:ip_output Reviewed by: schweikh (mentor) MFC after: 2 weeks Revision Changes Path 1.24 +6 -0 src/lib/libc/sys/connect.2