# Re: \[PATCH 01/14\] VFS: Add additional RESOLVE\_\* flags \[ver \#18\]

- From: Stefan Metzmacher \<metze@samba.org\>
- Date: 2020-03-09 20:56:37 
- List: linux-api
- Page: https://ratatoskr.run/linux-api/2020/03/174906
- Thread: https://ratatoskr.run/linux-api/2020/03/174844/t.md

```text
Hi David,

> Add additional RESOLVE_* flags to correspond to AT_* flags that aren't
> currently implemented:
> 
> 	RESOLVE_NO_TRAILING_SYMLINKS    for AT_SYMLINK_NOFOLLOW
> 	RESOLVE_NO_TRAILING_AUTOMOUNTS  for AT_NO_AUTOMOUNT
> 	RESOLVE_EMPTY_PATH              for AT_EMPTY_PATH

Thanks for changing the names!

> This is necessary for fsinfo() to use RESOLVE_* flags instead of AT_* flags
> if the latter are to be considered deprecated for new system calls.
> 
> Also make openat2() handle RESOLVE_NO_TRAILING_SYMLINKS.
> 
> Automounting is currently forced by doing an open(), so adding support to
> openat2() for RESOLVE_NO_TRAILING_AUTOMOUNTS is not trivial.

lookup_flags &= ~LOOKUP_AUTOMOUNT won't work?

At least it should cause EINVAL (or something similar) instead of being
silently ignored. The same applies to RESOLVE_EMPTY_PATH, it should be
handled with some logic or also cause EINVAL.

vfs_statx()/vfs_stat_set_lookup_flags() seems to have a similar logic
using the AT_* flags.

metze

```

## Attachments

- [signature.asc](https://ratatoskr.run/linux-api/2020/03/174906/attachment/0) (application/pgp-signature, 833 bytes)
