From owner-freebsd-current@FreeBSD.ORG Mon Mar 31 15:30:26 2008 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 11E40106564A for ; Mon, 31 Mar 2008 15:30:26 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from relay03.kiev.sovam.com (relay03.kiev.sovam.com [62.64.120.201]) by mx1.freebsd.org (Postfix) with ESMTP id AC51A8FC18 for ; Mon, 31 Mar 2008 15:30:25 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from [212.82.216.226] (helo=skuns.kiev.zoral.com.ua) by relay03.kiev.sovam.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.67) (envelope-from ) id 1JgLxl-000Fdw-Ui for current@freebsd.org; Mon, 31 Mar 2008 18:30:24 +0300 Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by skuns.kiev.zoral.com.ua (8.14.2/8.14.2) with ESMTP id m2VFUHqh083526 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 31 Mar 2008 18:30:17 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.2/8.14.2) with ESMTP id m2VFU7BQ013781 for ; Mon, 31 Mar 2008 18:30:07 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.2/8.14.2/Submit) id m2VFU6ZA013780 for current@freebsd.org; Mon, 31 Mar 2008 18:30:06 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 31 Mar 2008 18:30:06 +0300 From: Kostik Belousov To: current@freebsd.org Message-ID: <20080331153006.GK21209@deviant.kiev.zoral.com.ua> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="M9pltayyoy9lWEMH" Content-Disposition: inline User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: ClamAV version 0.91.2, clamav-milter version 0.91.2 on skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.4 X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on skuns.kiev.zoral.com.ua X-Scanner-Signature: 96b5a640d20a32298b7e0b1f479135d9 X-DrWeb-checked: yes X-SpamTest-Envelope-From: kostikbel@gmail.com X-SpamTest-Group-ID: 00000000 X-SpamTest-Info: Profiles 2528 [Mar 31 2008] X-SpamTest-Info: helo_type=3 X-SpamTest-Info: {received from trusted relay: not dialup} X-SpamTest-Method: none X-SpamTest-Method: Local Lists X-SpamTest-Rate: 0 X-SpamTest-Status: Not detected X-SpamTest-Status-Extended: not_detected X-SpamTest-Version: SMTP-Filter Version 3.0.0 [0255], KAS30/Release Cc: Subject: Openat() and fexecve() committed X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 31 Mar 2008 15:30:26 -0000 --M9pltayyoy9lWEMH Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable This is a notice for the list that the implementation of the openat(2) and accompanied syscalls, among them fexecve(2), as specified in The Open Group document titled "Extended API Set Part 2", is committed today into the HEAD. Besides (now) FreeBSD, the functionality is implemented on Linux, and I believe that it originated on Solaris. The work was started as GSoC 2007 by Roman Divacky, with the help by Robert Watson, and this is the first batch of the changes. Further, the implementation of the fdopendir(), linux compatibility shims and man pages updates are planned. There is one known issue with the code. The following test #define _ATFILE_SOURCE #include #include #include #include #include /* * create /tmp/foo/ and /tmp/foo/bar prior calling this, * set the access mode a+rx on /tmp/foo */ int main() { int dfd =3D open("/tmp/foo", O_RDONLY); int res; =20 chmod("/tmp/foo", 0666); =20 if (dfd !=3D -1) { res =3D openat(dfd, "bar", 0); printf("OPENAT returns: %d, errno: %s\n", res, strerror(errno)); } } gives the error EACCESS on both Linux and FreeBSD, and succeeds on Solaris. The Solaris behaviour seems to be specified in the document cited above. There are arguments in support of the both observed behaviour. --M9pltayyoy9lWEMH Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (FreeBSD) iEYEARECAAYFAkfxA30ACgkQC3+MBN1Mb4ivIQCeN3jSHfGUp4+Bp8YLnMsHtFNt 66wAoJaoB74PgkhZ61idFu7wjZ/hVPj5 =uwub -----END PGP SIGNATURE----- --M9pltayyoy9lWEMH--