fs-util: teach xopenat_full() about XO_SOCKET and XO_TRIGGER_AUTOMOUNT

XO_SOCKET asks for the opened inode to be verified as a socket, analogous to
the existing XO_REGULAR. A new fd_verify_socket() helper is added to
stat-util to perform the check on an opened fd.

XO_TRIGGER_AUTOMOUNT asks O_PATH opens to trigger automounts by going via
open_tree() without OPEN_TREE_CLONE, falling back to openat() if the kernel
or sandbox rejects open_tree().
This commit is contained in:
Daan De Meyer
2026-04-20 23:33:02 +02:00
parent c99e93ce0a
commit 038aaba475
5 changed files with 154 additions and 7 deletions
+1
View File
@@ -23,6 +23,7 @@ int is_symlink(const char *path);
int stat_verify_socket(const struct stat *st);
int statx_verify_socket(const struct statx *stx);
int fd_verify_socket(int fd);
int is_socket(const char *path);
int stat_verify_linked(const struct stat *st);