[PATCH -V26 16/16] vfs: enable "" pathname in openat syscall

From: Aneesh Kumar K.V
Date: Sat Jan 29 2011 - 14:09:44 EST


This enable the below usage

fd = openat(dir_fd, "", O_RDONLY);

dir_fd can be O_PATH descriptor. It does all access check as per the
open flags.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@xxxxxxxxxxxxxxxxxx>
---
fs/open.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/open.c b/fs/open.c
index 328a76e..bccb12d 100644
--- a/fs/open.c
+++ b/fs/open.c
@@ -893,7 +893,7 @@ EXPORT_SYMBOL(fd_install);

long do_sys_open(int dfd, const char __user *filename, int flags, int mode)
{
- char *tmp = getname(filename);
+ char *tmp = getname_null(filename);
int fd = PTR_ERR(tmp);

if (!IS_ERR(tmp)) {
--
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/