]> git.ipfire.org Git - thirdparty/systemd.git/commit
fs-util: teach xopenat_full() about XO_SOCKET and XO_TRIGGER_AUTOMOUNT
authorDaan De Meyer <daan@amutable.com>
Wed, 15 Apr 2026 22:55:59 +0000 (22:55 +0000)
committerDaan De Meyer <daan@amutable.com>
Mon, 20 Apr 2026 21:33:02 +0000 (23:33 +0200)
commit038aaba475719cbb1ba63b78a16ca87e6df51598
tree8a82c659750883e5cdca81677b95c346068989b1
parentc99e93ce0a195eafe988b1769729c526ca68352b
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().
src/basic/fs-util.c
src/basic/fs-util.h
src/basic/stat-util.c
src/basic/stat-util.h
src/test/test-fs-util.c