1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

smbd: Fix returning symlink stat info in the NO_OPATH case

Our callers don't look at symlink_err's struct stat anymore, they look
at the fname's one since we return them properly even for symlinks. So
don't bother filling in symlink_err->st, nobody reads it anyways.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
This commit is contained in:
Volker Lendecke 2024-02-04 18:50:47 +01:00 committed by Andreas Schneider
parent a2a77842a1
commit 331a49ca39

View File

@ -1258,7 +1258,7 @@ next:
ret = SMB_VFS_FSTATAT(conn,
dirfsp,
&rel_fname,
&symlink_err->st,
&full_fname.st,
AT_SYMLINK_NOFOLLOW);
if (ret == -1) {
status = map_nt_error_from_unix(errno);
@ -1270,7 +1270,7 @@ next:
goto fail;
}
if (!S_ISLNK(symlink_err->st.st_ex_mode)) {
if (!S_ISLNK(full_fname.st.st_ex_mode)) {
/*
* Hit a race: readlink_talloc() worked before
* the fstatat(), but rel_fname changed to