Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 17 Feb 2013 23:25:45 +0100
From:      Jilles Tjoelker <jilles@stack.nl>
To:        Pawel Jakub Dawidek <pjd@FreeBSD.org>
Cc:        Konstantin Belousov <kostikbel@gmail.com>, freebsd-arch@FreeBSD.org
Subject:   Re: bindat(2) and connectat(2) syscalls for review.
Message-ID:  <20130217222545.GA58436@stack.nl>
In-Reply-To: <20130214220853.GB1407@garage.freebsd.pl>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130217222545.GA58436>