]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
vfs: Change the condition when to fill the getwd cache
authorVolker Lendecke <vl@samba.org>
Mon, 11 Nov 2024 15:16:32 +0000 (16:16 +0100)
committerRalph Boehme <slow@samba.org>
Tue, 12 Nov 2024 13:44:32 +0000 (13:44 +0000)
The next patch will add another excluding condition, this change
keeps the if-condition that is changed here simple.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/smbd/vfs.c

index 9940dee0e82ff7193265fb79ff5bd556dff98769..ab1fa97993fee94b412239ac02f1c35cbb263047 100644 (file)
@@ -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);
 
                /*