]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
smbd: Give a better error message for non-existing share modes
authorVolker Lendecke <vl@samba.org>
Tue, 3 Dec 2019 20:26:24 +0000 (21:26 +0100)
committerRalph Boehme <slow@samba.org>
Mon, 9 Dec 2019 17:33:42 +0000 (17:33 +0000)
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Mon Dec  9 17:33:42 UTC 2019 on sn-devel-184

source3/locking/share_mode_lock.c

index 72290126a0dbe2fc31e768df6e1e9de2cd722f87..dacb5efab8519788ad95dcaea43793236003dc32 100644 (file)
@@ -558,6 +558,9 @@ static NTSTATUS get_static_share_mode_data(
                d = fresh_share_mode_lock(
                        lock_db, servicepath, smb_fname, old_write_time);
                if (d == NULL) {
+                       if (smb_fname == NULL) {
+                               return NT_STATUS_NOT_FOUND;
+                       }
                        return NT_STATUS_NO_MEMORY;
                }
        } else {