aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/namei.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/namei.h')
-rw-r--r--include/linux/namei.h19
1 files changed, 8 insertions, 11 deletions
diff --git a/include/linux/namei.h b/include/linux/namei.h
index 24d88e98a626..68f8c3203c89 100644
--- a/include/linux/namei.h
+++ b/include/linux/namei.h
@@ -47,27 +47,24 @@ enum {LAST_NORM, LAST_ROOT, LAST_DOT, LAST_DOTDOT, LAST_BIND};
47#define LOOKUP_DIRECTORY 2 47#define LOOKUP_DIRECTORY 2
48#define LOOKUP_CONTINUE 4 48#define LOOKUP_CONTINUE 4
49#define LOOKUP_PARENT 16 49#define LOOKUP_PARENT 16
50#define LOOKUP_NOALT 32
51#define LOOKUP_REVAL 64 50#define LOOKUP_REVAL 64
52/* 51/*
53 * Intent data 52 * Intent data
54 */ 53 */
55#define LOOKUP_OPEN (0x0100) 54#define LOOKUP_OPEN (0x0100)
56#define LOOKUP_CREATE (0x0200) 55#define LOOKUP_CREATE (0x0200)
57#define LOOKUP_ACCESS (0x0400) 56
58#define LOOKUP_CHDIR (0x0800) 57extern int user_path_at(int, const char __user *, unsigned, struct path *);
59 58
60extern int __user_walk(const char __user *, unsigned, struct nameidata *); 59#define user_path(name, path) user_path_at(AT_FDCWD, name, LOOKUP_FOLLOW, path)
61extern int __user_walk_fd(int dfd, const char __user *, unsigned, struct nameidata *); 60#define user_lpath(name, path) user_path_at(AT_FDCWD, name, 0, path)
62#define user_path_walk(name,nd) \ 61#define user_path_dir(name, path) \
63 __user_walk_fd(AT_FDCWD, name, LOOKUP_FOLLOW, nd) 62 user_path_at(AT_FDCWD, name, LOOKUP_FOLLOW | LOOKUP_DIRECTORY, path)
64#define user_path_walk_link(name,nd) \ 63
65 __user_walk_fd(AT_FDCWD, name, 0, nd)
66extern int path_lookup(const char *, unsigned, struct nameidata *); 64extern int path_lookup(const char *, unsigned, struct nameidata *);
67extern int vfs_path_lookup(struct dentry *, struct vfsmount *, 65extern int vfs_path_lookup(struct dentry *, struct vfsmount *,
68 const char *, unsigned int, struct nameidata *); 66 const char *, unsigned int, struct nameidata *);
69 67
70extern int __user_path_lookup_open(const char __user *, unsigned lookup_flags, struct nameidata *nd, int open_flags);
71extern int path_lookup_open(int dfd, const char *name, unsigned lookup_flags, struct nameidata *, int open_flags); 68extern int path_lookup_open(int dfd, const char *name, unsigned lookup_flags, struct nameidata *, int open_flags);
72extern struct file *lookup_instantiate_filp(struct nameidata *nd, struct dentry *dentry, 69extern struct file *lookup_instantiate_filp(struct nameidata *nd, struct dentry *dentry,
73 int (*open)(struct inode *, struct file *)); 70 int (*open)(struct inode *, struct file *));