Openat() and fexecve() committed
- From: Kostik Belousov <kostikbel@xxxxxxxxx>
- Date: Mon, 31 Mar 2008 18:30:06 +0300
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 <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdio.h>
#include <errno.h>
/*
* create /tmp/foo/ and /tmp/foo/bar prior calling this,
* set the access mode a+rx on /tmp/foo
*/
int main() {
int dfd = open("/tmp/foo", O_RDONLY);
int res;
chmod("/tmp/foo", 0666);
if (dfd != -1) {
res = 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.
Attachment:
pgpX6bbYZXzSV.pgp
Description: PGP signature
- Follow-Ups:
- Re: Openat() and fexecve() committed
- From: David Schultz
- Re: Openat() and fexecve() committed
- From: Garrett Wollman
- Re: Openat() and fexecve() committed
- Prev by Date: Antwort: Re: hdaps (accelerator) driver for thinkpads
- Next by Date: Re: Openat() and fexecve() committed
- Previous by thread: cvs: something wrong wrt vendor branch behavior
- Next by thread: Re: Openat() and fexecve() committed
- Index(es):
Relevant Pages
|
|