mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
Add an AT_NO_AUTOMOUNT flag to suppress terminal automount
Add an AT_NO_AUTOMOUNT flag to suppress terminal automounting of automount point directories. This can be used by fstatat() users to permit the gathering of attributes on an automount point and also prevent mass-automounting of a directory of automount points by ls. Signed-off-by: David Howells <[email protected]> Acked-by: Ian Kent <[email protected]> Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
parent
cc53ce53c8
commit
6f45b65672
4 changed files with 12 additions and 1 deletions
|
|
@ -75,11 +75,13 @@ int vfs_fstatat(int dfd, const char __user *filename, struct kstat *stat,
|
|||
int error = -EINVAL;
|
||||
int lookup_flags = 0;
|
||||
|
||||
if ((flag & ~AT_SYMLINK_NOFOLLOW) != 0)
|
||||
if ((flag & ~(AT_SYMLINK_NOFOLLOW | AT_NO_AUTOMOUNT)) != 0)
|
||||
goto out;
|
||||
|
||||
if (!(flag & AT_SYMLINK_NOFOLLOW))
|
||||
lookup_flags |= LOOKUP_FOLLOW;
|
||||
if (flag & AT_NO_AUTOMOUNT)
|
||||
lookup_flags |= LOOKUP_NO_AUTOMOUNT;
|
||||
|
||||
error = user_path_at(dfd, filename, lookup_flags, &path);
|
||||
if (error)
|
||||
|
|
|
|||
Loading…
Reference in a new issue