name_to_handle_at_try_unique_mntid_fid() in its current form is ill-designed for various reasons: * AT_HANDLE_FID requires file system support, while unique mount id is a VFS concept hence is always available if supported. Hence the fallback for AT_HANDLE_MNT_ID_UNIQUE should be independent of fid. * The request for AT_HANDLE_MNT_ID_UNIQUE can be identified via specifying ret_unique_mnt_id, no need for opening up the control to caller (and currently the function simply doesn't handle mismatch between ret params and flags). * The caller cannot realistically differentiate whether the returned mount id is actually unique. * The path_get_unique_mnt_id() fallback did not handle AT_SYMLINK_FOLLOW. Let's instead move the statx() fallback into name_to_handle_at_loop() directly, and revamp interaction of ret_mnt_id/ret_unique_mnt_id: if both are set, it indicates that the caller can handle both, hence set what we have and return 0/1 for whether we managed to acquire the unique one. The !ret_handle && ret_mnt_id logic is removed. Let's not rely on undocumented bizaare behavior and it's unused anyways. path_get_mnt_id_at() exists for a reason...
System and Service Manager
Details
Most documentation is available on systemd's web site.
Assorted, older, general information about systemd can be found in the systemd Wiki.
Information about build requirements is provided in the README file.
Consult our NEWS file for information about what's new in the most recent systemd versions.
Please see the Code Map for information about this repository's layout and content.
Please see the Hacking guide for information on how to hack on systemd and test your modifications.
Please see our Contribution Guidelines for more information about filing GitHub Issues and posting GitHub Pull Requests.
When preparing patches for systemd, please follow our Coding Style Guidelines.
If you are looking for support, please contact our mailing list, join our IRC channel #systemd on libera.chat or Matrix channel
Stable branches with backported patches are available in the stable repo.
We have a security bug bounty program sponsored by the Sovereign Tech Fund hosted on YesWeHack
Repositories with distribution packages built from git main are available on OBS
