From casper@sac.sfbay.sun.com Wed May  6 02:40:34 2009
Received: from sunmail4.singapore.sun.com (sunmail4.Singapore.Sun.COM [129.158.71.19])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id n469eXrN018239
	for <psarc-ext@sac.sfbay.sun.com>; Wed, 6 May 2009 02:40:34 -0700 (PDT)
Received: from brm-avmta-1.central.sun.com (brm-avmta-1.Central.Sun.COM [129.147.4.11])
	by sunmail4.singapore.sun.com (8.13.4+Sun/8.13.3/ENSMAIL,v2.2) with ESMTP id n469eUZS008331;
	Wed, 6 May 2009 17:40:32 +0800 (SGT)
Received: from pmxchannel-daemon.brm-avmta-1.central.sun.com by
 brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0KJ700B09UVJRP00@brm-avmta-1.central.sun.com>; Wed,
 06 May 2009 03:40:31 -0600 (MDT)
Received: from dm-sfbay-02.sfbay.sun.com ([129.146.11.31])
 by brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0KJ700E3QUVI9WD0@brm-avmta-1.central.sun.com>; Wed,
 06 May 2009 03:40:30 -0600 (MDT)
Received: from sac.sfbay.sun.com (sac.SFBay.Sun.COM [129.146.226.132])
	by dm-sfbay-02.sfbay.sun.com (8.13.8+Sun/8.13.8/ENSMAIL,v2.2)
 with ESMTP id n469eUeE001889; Wed, 06 May 2009 02:40:30 -0700 (PDT)
Received: from sac.sfbay.sun.com (localhost [127.0.0.1])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id n469eT1j018234; Wed,
 06 May 2009 02:40:29 -0700 (PDT)
Received: (from casper@localhost)
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8/Submit) id n469eTP9018230; Wed,
 06 May 2009 02:40:29 -0700 (PDT)
Date: Wed, 06 May 2009 02:40:29 -0700 (PDT)
From: Casper Dik <casper@sac.sfbay.sun.com>
Subject: faccessat(2) - determine accessibility of a file using file
 descriptors [PSARC/2009/284 Self Review]
To: PSARC-ext@sun.com
Cc: Sumanth.Naropanth@sun.com
Message-id: <200905060940.n469eTP9018230@sac.sfbay.sun.com>
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.4.1.325704
Status: RO
Content-Length: 9501


Template Version: @(#)sac_nextcase 1.68 02/23/09 SMI
This information is Copyright 2009 Sun Microsystems
1. Introduction
    1.1. Project/Component Working Name:
	 faccessat(2) - determine accessibility of a file using file descriptors
    1.2. Name of Document Author/Supplier:
	 Author:  Sumanth Naropanth
    1.3  Date of This Document:
	06 May, 2009
4. Technical Description
faccessat(2) - determine accessibility of a file using file descriptors

AUTHOR:
	Sumanth Naropanth

SUMMARY:

	Promotion of the private __accessat() function in OpenSolaris to public
	visibility as faccessat(2)

PROBLEM:

	RFE 6478917 introduced a new extended attribute system interface:

		int __accessat(int fd, const char *path, int amode);

	This function is equivalent to the access(2) system call, except in
	the case where the "path" variable specifies a relative path. In this
	case the file whose accessibility is to be determined shall be located
	relative to the directory associated with the file descriptor "fd"
	instead of the current working directory.

	If "__accessat()" is passed the special value AT_FDCWD in the "fd"
	parameter, the current working directory is used and the behavior
	shall be identical to a call to access().

	This function was kept private at the time of writing since there
	had been discussions among the standards body on the name for this
	function.

	Recent publications of the Open Group Technical Standards, including 
	[IEEE P1003.1 Draft 5.1, 15 May 2008] has confirmed that this interface
	shall be named 'faccessat' and shall have the following prototype:

		int faccessat(int fd, const char *path, int amode, int flag);

	The 'accessat' function in OpenSolaris is rewritten to conform to the
	new specifications and is renamed as 'faccessat'. The function should
	promoted to be a public interface, with an updated access(2) man page.


PROPOSED SOLUTION:

	Promoting the '__accessat()' interface to public status and modifying
	the function to include the 'int flag' variable.

ISSUES:
	NONE

BINDING:
	This case seeks a Minor Release binding.

COMMITMENT LEVEL:

	-------------------------------------------------------
	|         Interface             |  Commitment Level   |
	-------------------------------------------------------
	|        faccessat()            |     Committed       |
	-------------------------------------------------------


REFERENCE DOCUMENTS:

	See the updated man page for access(2) below.

------------------------------------------------------------------------------

System Calls                                            access(2)

NAME
     access, faccessat - determine accessibility of a file

SYNOPSIS
     #include <unistd.h>
     #include <sys/fcntl.h>

     int access(const char *path, int amode);
     int faccessat(int fd, const char *path, int amode, int flag);

DESCRIPTION
     The access() function checks the file named by the  pathname
     pointed  to by the _path_ argument for accessibility according
     to the bit pattern contained in _amode_, using the  real  user
     ID  in  place of the effective user ID and the real group ID
     in place of the effective group ID.  This  allows  a  setuid
     process  to  verify  that the user running it would have had
     permission to access this file.

     The value of _amode_ is either the bitwise inclusive OR of the
     access  permissions  to be checked (R_OK, W_OK, X_OK) or the
     existence test, F_OK.

     These constants are defined in <unistd.h> as follows:

     R_OK    Test for read permission.

     W_OK    Test for write permission.

     X_OK    Test for execute or search permission.

     F_OK    Check existence of file

     See Intro(2) for additional information about  "File  Access
     Permission".

     If any access permissions are to be checked,  each  will  be
     checked  individually, as described in Intro(2). If the pro-
     cess has appropriate privileges, an implementation may indi-
     cate  success for X_OK even if none of the execute file per-
     mission bits are set.

     The faccessat() function is equivalent to the access() function,
     except in the case where _path_ specifies a relative path. In
     this case the file whose accessibility is to be determined
     should be located relative to the directory associated with
     the file descriptor _fd_ instead of the current working directory.

     If faccessat() is passed the special value AT_FDCWD in the
     _fd_ parameter, the current working directory is used and
     the behavior is identical to a call to access().

     Values for _flag_ are constructed by a bitwise-inclusive OR of
     flags from the following list, defined in <fcntl.h>:


     AT_EACCESS           The checks for accessibility are performed
                          using the effective user and group IDs
                          instead of the real user and group ID as
                          required in a call to access().

RETURN VALUES
     If the requested access is permitted, access() and faccessat()
     succeed and return 0. Otherwise, -1 is returned and errno is set
     to indicate the error.

ERRORS
     These functions will fail if:

     EACCES          Permission bits of the file mode do not per-
                     mit  the requested access, or search permis-
                     sion is denied on a component  of  the  path
                     prefix.


     EFAULT          _path_ points to an illegal address.


     EINTR           A signal  was  caught  during  the  access()
                     function.


     ELOOP           Too many symbolic links were encountered  in
                     resolving _path_.


     ELOOP           A loop exists in symbolic links  encountered
                     during resolution of the _path_ argument.


     ENAMETOOLONG    The length  of  the  _path_  argument  exceeds
                     {PATH_MAX},   or  a  pathname  component  is
                     longer than {NAME_MAX} while _POSIX_NO_TRUNC
                     is in effect.


     ENOENT          A component of _path_ does not name an  exist-
                     ing file or _path_ is an empty string.


     ENOLINK         _path_ points to a remote machine and the link
                     to that machine is no longer active.


     ENOTDIR         A component of the  path  prefix  is  not  a
                     directory.


     ENXIO           The _path_ argument points to a  character  or
                     block    device   special   file   and   the
                     corresponding device has been retired by the
                     fault management framework.


     EROFS           Write access is requested for a  file  on  a
                     read-only file system.


    The faccessat() function will fail if

     EBADF           The _path_ argument does not specify an absolute
                     path and the fd argument is neither AT_FDCWD
                     nor a valid file descriptor open for reading
                     or searching.


    These functions function may fail if:

     EINVAL          The value of the _amode_ argument is invalid.


     ENAMETOOLONG    Pathname resolution of a symbolic link  pro-
                     duced  an  intermediate  result whose length
                     exceeds {PATH_MAX}.


     ETXTBSY         Write access is requested for  a  pure  pro-
                     cedure (shared text) file that is being exe-
                     cuted.

     The faccessat() function may fail if:

     EINVAL          The value of the flag argument is not valid.

     ENOTDIR         The _path_ argument is not an absolute path
                     and _fd_ is neither AT_FDCWD nor a file
                     descriptor associated with a directory.


USAGE
     Additional values of _amode_ other than the set defined in the
     description  might  be  valid,  for example, if a system has
     extended access controls.

     The purpose of the faccessat() function is to enable the checking
     of the accessibility of files in directories other than the
     current working directory without exposure to race conditions. Any
     part of the path of a file could be changed in parallel to a call
     to access(), resulting in unspecified behavior. By opening a file
     descriptor for the target directory and using the faccessat()
     function it can be guaranteed that the file tested for
     accessibility is located relative to the desired directory.

ATTRIBUTES
     See attributes(5) for descriptions of the  following  attri-
     butes:



     ____________________________________________________________
    |       ATTRIBUTE TYPE        |       ATTRIBUTE VALUE       |
    |_____________________________|_____________________________|
    | Interface Stability         | Committed                   |
    |_____________________________|_____________________________|
    | MT-Level                    | Async-Signal-Safe           |
    |_____________________________|_____________________________|
    | Standard                    | See standards(5).           |
    |_____________________________|_____________________________|


SEE ALSO
     Intro(2), chmod(2), stat(2), attributes(5), standards(5),
     fsattr(5), fstatat(2)


6. Resources and Schedule
    6.4. Steering Committee requested information
   	6.4.1. Consolidation C-team Name:
		ON
    6.5. ARC review type: Automatic
    6.6. ARC Exposure: open


From carlsonj@phorcys.east.sun.com Wed May  6 06:16:36 2009
Received: from sunmail5.uk.sun.com (sunmail5.UK.Sun.COM [129.156.85.165])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id n46DGZxe018824
	for <psarc-ext@sac.sfbay.sun.com>; Wed, 6 May 2009 06:16:36 -0700 (PDT)
Received: from nwk-avmta-1.SFBay.Sun.COM (nwk-avmta-1.SFBay.Sun.COM [129.146.11.74])
	by sunmail5.uk.sun.com (8.13.8+Sun/8.13.8/ENSMAIL,v2.2) with ESMTP id n46DGYhS017046
	for <@sunmail2sca.sfbay.sun.com:PSARC-ext@Sun.Com>; Wed, 6 May 2009 14:16:35 +0100 (BST)
Received: from pmxchannel-daemon.nwk-avmta-1.sfbay.Sun.COM by
 nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0KJ800K014VM2J00@nwk-avmta-1.sfbay.Sun.COM> for PSARC-ext@Sun.Com
 (ORCPT PSARC-ext@Sun.Com); Wed, 06 May 2009 06:16:34 -0700 (PDT)
Received: from dm-east-02.east.sun.com ([129.148.13.5])
 by nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0KJ800IWN4VK2BA0@nwk-avmta-1.sfbay.Sun.COM> for
 PSARC-ext@Sun.Com (ORCPT PSARC-ext@Sun.Com); Wed,
 06 May 2009 06:16:33 -0700 (PDT)
Received: from phorcys.east.sun.com (phorcys.East.Sun.COM [129.148.174.143])
	by dm-east-02.east.sun.com (8.13.8+Sun/8.13.8/ENSMAIL,v2.2)
 with ESMTP id n46DGUaW065417; Wed, 06 May 2009 09:16:30 -0400 (EDT)
Received: from phorcys.east.sun.com (phorcys.local [127.0.0.1])
	by phorcys.east.sun.com (8.14.3+Sun/8.14.3) with ESMTP id n46DFiCM022562; Wed,
 06 May 2009 09:15:44 -0400 (EDT)
Received: (from carlsonj@localhost)
	by phorcys.east.sun.com (8.14.3+Sun/8.14.3/Submit) id n46DFid1022559; Wed,
 06 May 2009 09:15:44 -0400 (EDT)
Date: Wed, 06 May 2009 09:15:44 -0400
From: James Carlson <james.d.carlson@sun.com>
Subject: Re: faccessat(2) - determine accessibility of a file using file
 descriptors [PSARC/2009/284 Self Review]
In-reply-to: <200905060940.n469eTP9018230@sac.sfbay.sun.com>
To: Casper Dik <casper@sac.sfbay.sun.com>
Cc: PSARC-ext@sun.com, Sumanth.Naropanth@sun.com
Message-id: <18945.36224.133038.29786@gargle.gargle.HOWL>
MIME-version: 1.0
X-Mailer: VM 7.01 under Emacs 21.3.1
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
X-PMX-Version: 5.4.1.325704
References: <200905060940.n469eTP9018230@sac.sfbay.sun.com>
Status: RO
Content-Length: 563

Casper Dik writes:
> 	Recent publications of the Open Group Technical Standards, including 
> 	[IEEE P1003.1 Draft 5.1, 15 May 2008] has confirmed that this interface
> 	shall be named 'faccessat' and shall have the following prototype:
> 
> 		int faccessat(int fd, const char *path, int amode, int flag);

Seems plenty obvious to me; +1.

-- 
James Carlson, Solaris Networking              <james.d.carlson@sun.com>
Sun Microsystems / 35 Network Drive        71.232W   Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757   42.496N   Fax +1 781 442 1677

From Joerg.Schilling9ab33xy531fokus.fraunhofer.de@bounce.antispameurope.com Wed May  6 10:20:31 2009
Received: from sunmail5.uk.sun.com (sunmail5.UK.Sun.COM [129.156.85.165])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id n46HKUVK025319
	for <psarc-ext@sac.sfbay.sun.com>; Wed, 6 May 2009 10:20:31 -0700 (PDT)
Received: from nwk-avmta-1.SFBay.Sun.COM (nwk-avmta-1.SFBay.Sun.COM [129.146.11.74])
	by sunmail5.uk.sun.com (8.13.8+Sun/8.13.8/ENSMAIL,v2.2) with ESMTP id n46HKRZl000111
	for <@sunmail2sca.sfbay.sun.com:PSARC-ext@sun.com>; Wed, 6 May 2009 18:20:29 +0100 (BST)
Received: from pmxchannel-daemon.nwk-avmta-1.sfbay.Sun.COM by
 nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0KJ80030RG636L00@nwk-avmta-1.sfbay.Sun.COM> for PSARC-ext@sun.com
 (ORCPT PSARC-ext@sun.com); Wed, 06 May 2009 10:20:27 -0700 (PDT)
Received: from brmea-mail-2.sun.com ([192.18.98.43])
 by nwk-avmta-1.sfbay.Sun.COM
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0KJ800FUUG620270@nwk-avmta-1.sfbay.Sun.COM> for
 PSARC-ext@sun.com (ORCPT PSARC-ext@sun.com); Wed,
 06 May 2009 10:20:26 -0700 (PDT)
Received: from relay12i.sun.com
 (ip122.net129179-4.block1.us.syntegra.com [129.179.4.122])
	by brmea-mail-2.sun.com (8.13.6+Sun/8.12.9) with ESMTP id n46HINxV029232	for
 <PSARC-ext@sun.com>; Wed, 06 May 2009 17:20:25 +0000 (GMT)
Received: from mmp14es.mmp.us.syntegra.com ([160.41.208.14] [160.41.208.14])
 by relay12i.sun.com with ESMTP id BT-MMP-84281 for PSARC-ext@sun.com; Wed,
 06 May 2009 17:18:25 +0000 (Z)
Received: from relay14i.sun.com (relay14i.sun.com [129.179.4.124])
 by mmp14es.mmp.us.syntegra.com with ESMTP id BT-MMP-194550 for
 PSARC-ext@sun.com; Wed, 06 May 2009 17:18:21 +0000 (Z)
Received: from relay03-haj2.antispameurope.com ([83.246.65.53] [83.246.65.53])
 by relay1i.sun.com with ESMTP id BT-MMP-4569154 for PSARC-ext@sun.com; Wed,
 06 May 2009 17:17:35 +0000 (Z)
Received: by relay03-haj2.antispameurope.com (ASE-Secure-MTA, from userid 1000)
	id DC4EB63C05F; Wed, 06 May 2009 19:17:33 +0200 (CEST)
Received: from pluto.fokus.fraunhofer.de
 (pluto.fokus.fraunhofer.de [195.37.77.164])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)	by relay03-haj2.antispameurope.com
 (ASE-Secure-MTA) with ESMTP id 3188D63C05F; Wed,
 06 May 2009 19:17:33 +0200 (CEST)
Received: from EXCHSRV.fokus.fraunhofer.de (bohr [10.147.9.231])
	by pluto.fokus.fraunhofer.de (8.13.7/8.13.7) with SMTP id n46HHXTj023826; Wed,
 06 May 2009 19:17:33 +0200 (MEST)
Received: from rigel ([10.147.65.195]) by EXCHSRV.fokus.fraunhofer.de with
 Microsoft SMTPSVC(6.0.3790.3959); Wed, 06 May 2009 19:17:33 +0200
Date: Wed, 06 May 2009 19:17:33 +0200
From: Joerg.Schilling@fokus.fraunhofer.de (Joerg Schilling)
Subject: Re: faccessat(2) - determine accessibility of a file using file
 descriptors [PSARC/2009/284 Self Review]
In-reply-to: <200905060940.n469eTP9018230@sac.sfbay.sun.com>
Sender: Joerg.Schilling9ab33xy531fokus.fraunhofer.de@bounce.antispameurope.com
To: PSARC-ext@sun.com, casper@sac.sfbay.sun.com
Cc: Sumanth.Naropanth@sun.com
Message-id: <4a01c62d.bnvdJr84SB7ej9WH%Joerg.Schilling@fokus.fraunhofer.de>
MIME-version: 1.0
Content-type: text/plain; charset=ISO-8859-1
Content-transfer-encoding: 8BIT
X-PMX-Version: 5.4.1.325704
X-Brightmail-Tracker: AAAAAA==
X-Antispam: No, score=0.0/5.0, scanned in 2.639sec at (localhost [127.0.0.1])
	by smf-spamd v1.3.1 - http://smfs.sf.net/
References: <200905060940.n469eTP9018230@sac.sfbay.sun.com>
User-Agent: nail 11.22 3/20/05
X-OriginalArrivalTime: 06 May 2009 17:17:33.0371 (UTC)
 FILETIME=[8B3090B0:01C9CE6E]
Status: RO
Content-Length: 975

Casper Dik <casper@sac.sfbay.sun.com> wrote:

>
> Template Version: @(#)sac_nextcase 1.68 02/23/09 SMI
> This information is Copyright 2009 Sun Microsystems
> 1. Introduction
>     1.1. Project/Component Working Name:
> 	 faccessat(2) - determine accessibility of a file using file descriptors
>     1.2. Name of Document Author/Supplier:
> 	 Author:  Sumanth Naropanth
>     1.3  Date of This Document:
> 	06 May, 2009
> 4. Technical Description
> faccessat(2) - determine accessibility of a file using file descriptors
>
> AUTHOR:
> 	Sumanth Naropanth
>
> SUMMARY:
>
> 	Promotion of the private __accessat() function in OpenSolaris to public
> 	visibility as faccessat(2)

+1

Jörg

-- 
 EMail:joerg@schily.isdn.cs.tu-berlin.de (home) Jörg Schilling D-13353 Berlin
       js@cs.tu-berlin.de                (uni)  
       joerg.schilling@fokus.fraunhofer.de (work) Blog: http://schily.blogspot.com/
 URL:  http://cdrecord.berlios.de/private/ ftp://ftp.berlios.de/pub/schily

From roland.mainz@nrubsig.org Wed May  6 16:12:43 2009
Received: from sunmail4.singapore.sun.com (sunmail4.Singapore.Sun.COM [129.158.71.19])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id n46NCfWb004091
	for <psarc-ext@sac.sfbay.sun.com>; Wed, 6 May 2009 16:12:41 -0700 (PDT)
Received: from brm-avmta-1.central.sun.com (brm-avmta-1.Central.Sun.COM [129.147.4.11])
	by sunmail4.singapore.sun.com (8.13.4+Sun/8.13.3/ENSMAIL,v2.2) with ESMTP id n46NCYrE024053;
	Thu, 7 May 2009 07:12:38 +0800 (SGT)
Received: from pmxchannel-daemon.brm-avmta-1.central.sun.com by
 brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0KJ800009WH08L00@brm-avmta-1.central.sun.com>; Wed,
 06 May 2009 17:12:36 -0600 (MDT)
Received: from brmea-mail-1.sun.com ([192.18.98.31])
 by brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0KJ800HPQWGZ8030@brm-avmta-1.central.sun.com>; Wed,
 06 May 2009 17:12:35 -0600 (MDT)
Received: from relay41i.sun.com ([192.5.209.70])
	by brmea-mail-1.sun.com (8.13.6+Sun/8.12.9) with ESMTP id n46NAW6t008181; Wed,
 06 May 2009 23:12:35 +0000 (GMT)
Received: from mmp42es.mmp.us.syntegra.com ([160.41.221.11] [160.41.221.11])
 by relay41i.sun.com with ESMTP id BT-MMP-2825865; Wed,
 06 May 2009 23:12:35 +0000 (Z)
Received: from relay41i.sun.com (relay41i.sun.com [192.5.209.70])
 by mmp42es.mmp.us.syntegra.com with ESMTP id BT-MMP-232414; Wed,
 06 May 2009 23:12:34 +0000 (Z)
Received: from mail-in-08.arcor-online.net ([151.189.21.48] [151.189.21.48])
 by relay4i.sun.com with ESMTP id BT-MMP-759007; Wed,
 06 May 2009 23:12:34 +0000 (Z)
Received: from mail-in-19-z2.arcor-online.net
 (mail-in-19-z2.arcor-online.net [151.189.8.36])	by mx.arcor.de (Postfix)
 with ESMTP id 5C0D52AEB12; Thu, 07 May 2009 01:11:33 +0200 (CEST)
Received: from mail-in-09.arcor-online.net
 (mail-in-09.arcor-online.net [151.189.21.49])
	by mail-in-19-z2.arcor-online.net (Postfix) with ESMTP id 480D16C42B; Thu,
 07 May 2009 01:11:33 +0200 (CEST)
Received: from jupiterb48.nrubsig.org
 (dslb-094-219-212-156.pools.arcor-ip.net [94.219.212.156])
	by mail-in-09.arcor-online.net (Postfix) with ESMTPS id 972361AF3A7; Thu,
 07 May 2009 01:11:32 +0200 (CEST)
Received: from nrubsig.org (localhost [127.0.0.1])	by jupiterb48.nrubsig.org
 (8.13.8+Sun/8.13.8) with ESMTP id n46NBUwt002143; Thu,
 07 May 2009 01:11:30 +0200 (CEST)
Date: Thu, 07 May 2009 01:11:29 +0200
From: Roland Mainz <roland.mainz@nrubsig.org>
Subject: Re: faccessat(2) - determine accessibility of a file using
 filedescriptors [PSARC/2009/284 Self Review]
Sender: gisburn@jupiterb48.nrubsig.org
To: Casper Dik <casper@sac.sfbay.sun.com>
Cc: PSARC-ext@sun.com, Sumanth.Naropanth@sun.com
Message-id: <4A021921.EDDC23A6@nrubsig.org>
MIME-version: 1.0
X-Mailer: Mozilla 4.76 [en] (X11; U; SunOS 5.11 sun4u)
Content-type: text/plain; charset=us-ascii
Content-transfer-encoding: 7BIT
X-Accept-Language: en
X-PMX-Version: 5.4.1.325704
X-Brightmail-Tracker: AAAAAA==
X-DKIM: Sendmail DKIM Filter v2.8.2 mail-in-09.arcor-online.net 972361AF3A7
X-Antispam: No, score=0.0/5.0, scanned in 0.130sec at (localhost [127.0.0.1])
	by smf-spamd v1.3.1 - http://smfs.sf.net/
References: <200905060940.n469eTP9018230@sac.sfbay.sun.com>
Status: RO
Content-Length: 2771

Casper Dik wrote:
> 
> Template Version: @(#)sac_nextcase 1.68 02/23/09 SMI
> This information is Copyright 2009 Sun Microsystems
> 1. Introduction
>     1.1. Project/Component Working Name:
>          faccessat(2) - determine accessibility of a file using file descriptors
>     1.2. Name of Document Author/Supplier:
>          Author:  Sumanth Naropanth
>     1.3  Date of This Document:
>         06 May, 2009
> 4. Technical Description
> faccessat(2) - determine accessibility of a file using file descriptors
> 
> AUTHOR:
>         Sumanth Naropanth
> 
> SUMMARY:
> 
>         Promotion of the private __accessat() function in OpenSolaris to public
>         visibility as faccessat(2)
> 
> PROBLEM:
> 
>         RFE 6478917 introduced a new extended attribute system interface:
> 
>                 int __accessat(int fd, const char *path, int amode);
> 
>         This function is equivalent to the access(2) system call, except in
>         the case where the "path" variable specifies a relative path. In this
>         case the file whose accessibility is to be determined shall be located
>         relative to the directory associated with the file descriptor "fd"
>         instead of the current working directory.
> 
>         If "__accessat()" is passed the special value AT_FDCWD in the "fd"
>         parameter, the current working directory is used and the behavior
>         shall be identical to a call to access().
> 
>         This function was kept private at the time of writing since there
>         had been discussions among the standards body on the name for this
>         function.
> 
>         Recent publications of the Open Group Technical Standards, including
>         [IEEE P1003.1 Draft 5.1, 15 May 2008] has confirmed that this interface
>         shall be named 'faccessat' and shall have the following prototype:
> 
>                 int faccessat(int fd, const char *path, int amode, int flag);
[snip]
> 
>         -------------------------------------------------------
>         |         Interface             |  Commitment Level   |
>         -------------------------------------------------------
>         |        faccessat()            |     Committed       |
>         -------------------------------------------------------


Is it possible to make this interface "Uncommited" until the IEEE
P1003.1 Draft has been made an official standard (e.g. what would you do
if somehow the Draft changes the prototype or functionality in a subtle
way - add another symbol or add some more hacks which depend on the
|libc::__xpg6| variable) ?

----

Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) roland.mainz@nrubsig.org
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 3992797
 (;O/ \/ \O;)

From dcragun@sonic.net Wed May  6 21:59:15 2009
Received: from newsunmail1brm.central.sun.com (newsunmail1brm.Central.Sun.COM [129.147.62.245])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id n474xFWF006874
	for <psarc-ext@sac.sfbay.sun.com>; Wed, 6 May 2009 21:59:15 -0700 (PDT)
Received: from brm-avmta-1.central.sun.com (brm-avmta-1.Central.Sun.COM [129.147.4.11])
	by newsunmail1brm.central.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id n474xEcZ063995
	for <@sunmail2sca.sfbay.sun.com:PSARC-ext@sun.com>; Wed, 6 May 2009 22:59:14 -0600 (MDT)
Received: from pmxchannel-daemon.brm-avmta-1.central.sun.com by
 brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0KJ900F09CIP6O00@brm-avmta-1.central.sun.com> for PSARC-ext@sun.com
 (ORCPT PSARC-ext@sun.com); Wed, 06 May 2009 22:59:13 -0600 (MDT)
Received: from brmea-mail-1.sun.com ([192.18.98.31])
 by brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0KJ9003B0CIOBC40@brm-avmta-1.central.sun.com> for
 PSARC-ext@sun.com (ORCPT PSARC-ext@sun.com); Wed,
 06 May 2009 22:59:13 -0600 (MDT)
Received: from relay44i.sun.com ([192.5.209.118])
	by brmea-mail-1.sun.com (8.13.6+Sun/8.12.9) with ESMTP id n474xCYl001414	for
 <PSARC-ext@sun.com>; Thu, 07 May 2009 04:59:12 +0000 (GMT)
Received: from mmp41es.mmp.us.syntegra.com ([160.41.221.10] [160.41.221.10])
 by relay44i.sun.com with ESMTP id BT-MMP-658176 for PSARC-ext@sun.com; Thu,
 07 May 2009 04:50:03 +0000 (Z)
Received: from relay42i.sun.com (relay42i.sun.com [192.5.209.72])
 by mmp41es.mmp.us.syntegra.com with ESMTP id BT-MMP-635488 for
 PSARC-ext@sun.com; Thu, 07 May 2009 04:50:03 +0000 (Z)
Received: from a.mail.sonic.net ([64.142.16.245] [64.142.16.245])
 by relay4i.sun.com with ESMTP id BT-MMP-1082060 for PSARC-ext@sun.com; Thu,
 07 May 2009 04:50:03 +0000 (Z)
Received: from webmail.sonic.net (a.webmail.sonic.net [64.142.100.132])
	by a.mail.sonic.net (8.13.8.Beta0-Sonic/8.13.7) with ESMTP id n473H0Of003711;
 Wed, 06 May 2009 20:17:00 -0700
Received: from 76.191.129.144 (SquirrelMail authenticated user dcragun)
 by webmail.sonic.net with HTTP; Wed, 06 May 2009 20:16:59 -0700 (PDT)
Date: Wed, 06 May 2009 20:16:59 -0700 (PDT)
From: Don Cragun <dcragun@sonic.net>
Subject: Re: faccessat(2) - determine accessibility of a file using file
 descriptors [PSARC/2009/284 Self Review]
In-reply-to: <mailman.17469.1241662192.23866.opensolaris-arc@opensolaris.org>
To: roland.mainz@nrubsig.org
Cc: PSARC-ext@sun.com
Message-id: <20281.76.191.129.144.1241666219.squirrel@webmail.sonic.net>
MIME-version: 1.0
Content-type: text/plain; charset=iso-8859-1
Content-transfer-encoding: 7BIT
Importance: Normal
X-Priority: 3 (Normal)
X-PMX-Version: 5.4.1.325704
X-Brightmail-Tracker: AAAAAA==
X-Antispam: No, score=0.0/5.0, scanned in 0.063sec at (localhost [127.0.0.1])
	by smf-spamd v1.3.1 - http://smfs.sf.net/
References: <mailman.17469.1241662192.23866.opensolaris-arc@opensolaris.org>
User-Agent: SquirrelMail/1.4.9a
Status: RO
Content-Length: 1530

> Date: Thu, 07 May 2009 01:11:29 +0200
> From: Roland Mainz <roland.mainz@nrubsig.org>
> Message-ID: <4A021921.EDDC23A6@nrubsig.org>
>
> Casper Dik wrote:
>>
 ... ... ...
>>         Recent publications of the Open Group Technical Standards, including
>>         [IEEE P1003.1 Draft 5.1, 15 May 2008] has confirmed that this
>> interface
>>         shall be named 'faccessat' and shall have the following prototype:
>>
>>                 int faccessat(int fd, const char *path, int amode, int
>> flag);
> [snip]
>>
>>         -------------------------------------------------------
>>         |         Interface             |  Commitment Level   |
>>         -------------------------------------------------------
>>         |        faccessat()            |     Committed       |
>>         -------------------------------------------------------
>
>
> Is it possible to make this interface "Uncommited" until the IEEE
> P1003.1 Draft has been made an official standard (e.g. what would you do
> if somehow the Draft changes the prototype or functionality in a subtle
> way - add another symbol or add some more hacks which depend on the
> |libc::__xpg6| variable) ?
>
> Bye,
> Roland

Roland,
It is no longer a draft standard.  It was formally approved by all three
bodies (The Open Group as SUSv4, by IEEE as IEEE Std 1003.1-2008,
and by ISO as ISO/IEC IS 9945:2008) last year.  The specification for
this function did not change during balloting.

The branding program for the next UNIX brand is not yet in place.

 - Don



From Joerg.Schilling9ab33xy531fokus.fraunhofer.de@bounce.antispameurope.com Thu May  7 01:56:51 2009
Received: from sunmail2sca.sfbay.sun.com (sunmail2sca.SFBay.Sun.COM [129.145.155.234])
	by sac.sfbay.sun.com (8.13.8+Sun/8.13.8) with ESMTP id n478uoHU009441
	for <psarc-ext@sac.sfbay.sun.com>; Thu, 7 May 2009 01:56:50 -0700 (PDT)
Received: from brm-avmta-1.central.sun.com (brm-avmta-1.Central.Sun.COM [129.147.4.11])
	by sunmail2sca.sfbay.sun.com (8.13.7+Sun/8.13.7/ENSMAIL,v2.2) with ESMTP id n478uf1x011726
	for <@sunmail2sca.sfbay.sun.com:PSARC-ext@sun.com>; Thu, 7 May 2009 01:56:50 -0700 (PDT)
Received: from pmxchannel-daemon.brm-avmta-1.central.sun.com by
 brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 id <0KJ900G1XNIQTV00@brm-avmta-1.central.sun.com> for PSARC-ext@sun.com
 (ORCPT PSARC-ext@sun.com); Thu, 07 May 2009 02:56:50 -0600 (MDT)
Received: from sca-ea-mail-1.sun.com ([192.18.43.24])
 by brm-avmta-1.central.sun.com
 (Sun Java System Messaging Server 6.2-3.04 (built Jul 15 2005))
 with ESMTP id <0KJ900DF5NIP2T30@brm-avmta-1.central.sun.com> for
 PSARC-ext@sun.com (ORCPT PSARC-ext@sun.com); Thu,
 07 May 2009 02:56:49 -0600 (MDT)
Received: from relay43i.sun.com ([192.5.209.74])
	by sca-ea-mail-1.sun.com (8.13.7+Sun/8.12.9) with ESMTP id n478nVSm002996	for
 <PSARC-ext@sun.com>; Thu, 07 May 2009 08:56:49 +0000 (GMT)
Received: from mms48es.mms.us.syntegra.com ([160.41.221.230] [160.41.221.230])
 by relay43i.sun.com with ESMTP id BT-MMP-2867572 for PSARC-ext@sun.com; Thu,
 07 May 2009 08:56:48 +0000 (Z)
Received: from relay43i.sun.com (relay43i.sun.com [192.5.209.74])
 by mms48es.mms.us.syntegra.com with ESMTP id BT-MMP-9523227 for
 PSARC-ext@sun.com; Thu, 07 May 2009 08:56:47 +0000 (Z)
Received: from relay02-haj2.antispameurope.com ([83.246.65.52] [83.246.65.52])
 by relay4i.sun.com with ESMTP id BT-MMP-1321722 for PSARC-ext@sun.com; Thu,
 07 May 2009 08:56:47 +0000 (Z)
Received: by relay02-haj2.antispameurope.com (ASE-Secure-MTA, from userid 1000)
	id C47D56F0518; Thu, 07 May 2009 10:56:16 +0200 (CEST)
Received: from pluto.fokus.fraunhofer.de
 (pluto.fokus.fraunhofer.de [195.37.77.164])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)	by relay02-haj2.antispameurope.com
 (ASE-Secure-MTA) with ESMTP id 662986F0516; Thu,
 07 May 2009 10:56:16 +0200 (CEST)
Received: from EXCHSRV.fokus.fraunhofer.de (bohr [10.147.9.231])
	by pluto.fokus.fraunhofer.de (8.13.7/8.13.7) with SMTP id n478uGTi020490; Thu,
 07 May 2009 10:56:16 +0200 (MEST)
Received: from rigel ([10.147.65.195]) by EXCHSRV.fokus.fraunhofer.de with
 Microsoft SMTPSVC(6.0.3790.3959); Thu, 07 May 2009 10:56:15 +0200
Date: Thu, 07 May 2009 10:56:15 +0200
From: Joerg.Schilling@fokus.fraunhofer.de (Joerg Schilling)
Subject: Re: faccessat(2) - determine accessibility of a file using
 filedescriptors [PSARC/2009/284 Self Review]
In-reply-to: <4A021921.EDDC23A6@nrubsig.org>
Sender: Joerg.Schilling9ab33xy531fokus.fraunhofer.de@bounce.antispameurope.com
To: roland.mainz@nrubsig.org, casper@sac.sfbay.sun.com
Cc: Sumanth.Naropanth@sun.com, PSARC-ext@sun.com
Message-id: <4a02a22f.AUi+5I9A1OQ+HB+c%Joerg.Schilling@fokus.fraunhofer.de>
MIME-version: 1.0
Content-type: text/plain; charset=ISO-8859-1
Content-transfer-encoding: 8BIT
X-PMX-Version: 5.4.1.325704
X-Brightmail-Tracker: AAAAAA==
X-Antispam: No, score=0.0/5.0, scanned in 0.434sec at (localhost [127.0.0.1])
	by smf-spamd v1.3.1 - http://smfs.sf.net/
References: <200905060940.n469eTP9018230@sac.sfbay.sun.com>
 <4A021921.EDDC23A6@nrubsig.org>
User-Agent: nail 11.22 3/20/05
X-OriginalArrivalTime: 07 May 2009 08:56:15.0958 (UTC)
 FILETIME=[AE114F60:01C9CEF1]
Status: RO
Content-Length: 970

Roland Mainz <roland.mainz@nrubsig.org> wrote:

> Is it possible to make this interface "Uncommited" until the IEEE
> P1003.1 Draft has been made an official standard (e.g. what would you do
> if somehow the Draft changes the prototype or functionality in a subtle
> way - add another symbol or add some more hacks which depend on the
> |libc::__xpg6| variable) ?

The function is in the Opengroup draft since a few years and the opengroup 
standard was accepted last year.

Why do you believe this will be changed?


Also note that the other functions from this interface group have been added by 
Sun in August 2001 and the standard is based on this Sun implementation. 

Jörg

-- 
 EMail:joerg@schily.isdn.cs.tu-berlin.de (home) Jörg Schilling D-13353 Berlin
       js@cs.tu-berlin.de                (uni)  
       joerg.schilling@fokus.fraunhofer.de (work) Blog: http://schily.blogspot.com/
 URL:  http://cdrecord.berlios.de/private/ ftp://ftp.berlios.de/pub/schily

