From owner-freebsd-arch@FreeBSD.ORG Sun Feb 17 22:26:02 2013 Return-Path: Delivered-To: freebsd-arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id EC439638; Sun, 17 Feb 2013 22:26:02 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (unknown [IPv6:2001:610:1108:5012::107]) by mx1.freebsd.org (Postfix) with ESMTP id AE4DAB0E; Sun, 17 Feb 2013 22:26:02 +0000 (UTC) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mx1.stack.nl (Postfix) with ESMTP id 8973C1203C5; Sun, 17 Feb 2013 23:25:46 +0100 (CET) Received: by snail.stack.nl (Postfix, from userid 1677) id 09CB92848C; Sun, 17 Feb 2013 23:25:46 +0100 (CET) Date: Sun, 17 Feb 2013 23:25:45 +0100 From: Jilles Tjoelker To: Pawel Jakub Dawidek Subject: Re: bindat(2) and connectat(2) syscalls for review. Message-ID: <20130217222545.GA58436@stack.nl> References: <20130213230354.GC1375@garage.freebsd.pl> <20130213232004.GA2522@kib.kiev.ua> <20130213234030.GD1375@garage.freebsd.pl> <20130214185549.GA36288@stack.nl> <20130214220853.GB1407@garage.freebsd.pl> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130214220853.GB1407@garage.freebsd.pl> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Konstantin Belousov , freebsd-arch@FreeBSD.org X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 Feb 2013 22:26:03 -0000 On Thu, Feb 14, 2013 at 11:08:53PM +0100, Pawel Jakub Dawidek wrote: > bind(2) and connect(2) are used just fine currently without any flags. > I'd like to see good example before I decide to add such argument. The > AT_SYMLINK_NOFOLLOW flag is of no use here, it is used for syscalls that > can operate on symlinks (you can chmod, chown or stat a symlink, so it > does make sense there). By that reasoning, the O_NOFOLLOW open flag should not exist. However, it seems that it is uncommon to bind/connect to sockets located in untrusted directories. Also, any flag could be implemented instead as a setsockopt() on the socket. -- Jilles Tjoelker