Lines Matching refs:filename
124 #define EMBEDDED_NAME_MAX (PATH_MAX - offsetof(struct filename, iname))
126 struct filename *
127 getname_flags(const char __user *filename, int flags, int *empty) in getname_flags() argument
129 struct filename *result; in getname_flags()
133 result = audit_reusename(filename); in getname_flags()
148 len = strncpy_from_user(kname, filename, EMBEDDED_NAME_MAX); in getname_flags()
161 const size_t size = offsetof(struct filename, iname[1]); in getname_flags()
175 len = strncpy_from_user(kname, filename, PATH_MAX); in getname_flags()
199 result->uptr = filename; in getname_flags()
205 struct filename *
206 getname(const char __user * filename) in getname() argument
208 return getname_flags(filename, 0, NULL); in getname()
211 struct filename *
212 getname_kernel(const char * filename) in getname_kernel() argument
214 struct filename *result; in getname_kernel()
215 int len = strlen(filename) + 1; in getname_kernel()
224 const size_t size = offsetof(struct filename, iname[1]); in getname_kernel()
225 struct filename *tmp; in getname_kernel()
238 memcpy((char *)result->name, filename, len); in getname_kernel()
247 void putname(struct filename *name) in putname()
538 struct filename *name;
545 static void set_nameidata(struct nameidata *p, int dfd, struct filename *name) in set_nameidata()
2305 static int filename_lookup(int dfd, struct filename *name, unsigned flags, in filename_lookup()
2350 static struct filename *filename_parentat(int dfd, struct filename *name, in filename_parentat()
2380 struct filename *filename; in kern_path_locked() local
2385 filename = filename_parentat(AT_FDCWD, getname_kernel(name), 0, path, in kern_path_locked()
2387 if (IS_ERR(filename)) in kern_path_locked()
2388 return ERR_CAST(filename); in kern_path_locked()
2391 putname(filename); in kern_path_locked()
2400 putname(filename); in kern_path_locked()
2589 static inline struct filename *
2709 filename_mountpoint(int dfd, struct filename *name, struct path *path, in filename_mountpoint()
3560 struct file *do_filp_open(int dfd, struct filename *pathname, in do_filp_open()
3582 struct filename *filename; in do_file_open_root() local
3591 filename = getname_kernel(name); in do_file_open_root()
3592 if (IS_ERR(filename)) in do_file_open_root()
3593 return ERR_CAST(filename); in do_file_open_root()
3595 set_nameidata(&nd, -1, filename); in do_file_open_root()
3602 putname(filename); in do_file_open_root()
3606 static struct dentry *filename_create(int dfd, struct filename *name, in filename_create()
3752 SYSCALL_DEFINE4(mknodat, int, dfd, const char __user *, filename, umode_t, mode, in SYSCALL_DEFINE4() argument
3764 dentry = user_path_create(dfd, filename, &path, lookup_flags); in SYSCALL_DEFINE4()
3796 SYSCALL_DEFINE3(mknod, const char __user *, filename, umode_t, mode, unsigned, dev) in SYSCALL_DEFINE3() argument
3798 return sys_mknodat(AT_FDCWD, filename, mode, dev); in SYSCALL_DEFINE3()
3911 struct filename *name; in do_rmdir()
4045 struct filename *name; in do_unlinkat()
4162 struct filename *from; in SYSCALL_DEFINE3()
4555 struct filename *from; in SYSCALL_DEFINE5()
4556 struct filename *to; in SYSCALL_DEFINE5()