stat-util: add shortcut for fd_verify_symlink()

We have a similar shortcut in the other fd_verify_xyz() calls, let's add
it here too, just for completion's sake.
This commit is contained in:
Lennart Poettering
2026-04-13 13:20:43 +02:00
parent 596c0a259d
commit 7f2410deb1
+3
View File
@@ -145,6 +145,9 @@ int stat_verify_symlink(const struct stat *st) {
}
int fd_verify_symlink(int fd) {
if (IN_SET(fd, AT_FDCWD, XAT_FDROOT))
return -EISDIR;
return verify_stat_at(fd, /* path= */ NULL, /* follow= */ false, stat_verify_symlink, /* verify= */ true);
}