From: Volker Lendecke Date: Mon, 11 Nov 2024 15:16:32 +0000 (+0100) Subject: vfs: Change the condition when to fill the getwd cache X-Git-Tag: tdb-1.4.13~535 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c31e7aecbab5e8e845dc3bc95560f8543abbaeff;p=thirdparty%2Fsamba.git vfs: Change the condition when to fill the getwd cache The next patch will add another excluding condition, this change keeps the if-condition that is changed here simple. Signed-off-by: Volker Lendecke Reviewed-by: Ralph Boehme --- diff --git a/source3/smbd/vfs.c b/source3/smbd/vfs.c index 9940dee0e82..ab1fa97993f 100644 --- a/source3/smbd/vfs.c +++ b/source3/smbd/vfs.c @@ -1086,7 +1086,7 @@ struct smb_filename *vfs_GetWd(TALLOC_CTX *ctx, connection_struct *conn) goto out; } - if (lp_getwd_cache() && VALID_STAT(smb_fname_dot->st)) { + if ((smb_fname_dot != NULL) && VALID_STAT(smb_fname_dot->st)) { key = vfs_file_id_from_sbuf(conn, &smb_fname_dot->st); /*