diff options
author | Andy Whitcroft <[email protected]> | 2011-11-02 09:44:39 +0100 |
---|---|---|
committer | Christoph Hellwig <[email protected]> | 2011-11-02 12:53:42 +0100 |
commit | 1fa1e7f615f4d3ae436fa319af6e4eebdd4026a8 (patch) | |
tree | aa3521aaa762424cc7fb38dbf924a34dac1b03c2 /tools/perf/util/scripting-engines/trace-event-python.c | |
parent | 32096ea1aac14e6f29d4744924092eca52b937b0 (diff) |
readlinkat: ensure we return ENOENT for the empty pathname for normal lookups
Since the commit below which added O_PATH support to the *at() calls, the
error return for readlink/readlinkat for the empty pathname has switched
from ENOENT to EINVAL:
commit 65cfc6722361570bfe255698d9cd4dccaf47570d
Author: Al Viro <[email protected]>
Date: Sun Mar 13 15:56:26 2011 -0400
readlinkat(), fchownat() and fstatat() with empty relative pathnames
This is both unexpected for userspace and makes readlink/readlinkat
inconsistant with all other interfaces; and inconsistant with our stated
return for these pathnames.
As the readlinkat call does not have a flags parameter we cannot use the
AT_EMPTY_PATH approach used in the other calls. Therefore expose whether
the original path is infact entry via a new user_path_at_empty() path
lookup function. Use this to determine whether to default to EINVAL or
ENOENT for failures.
Addresses http://bugs.launchpad.net/bugs/817187
[[email protected]: remove unused getname_flags()]
Signed-off-by: Andy Whitcroft <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Cc: Al Viro <[email protected]>
Cc: <[email protected]>
Cc: <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-python.c')
0 files changed, 0 insertions, 0 deletions