From: Volker Lendecke Date: Tue, 3 Dec 2019 20:26:24 +0000 (+0100) Subject: smbd: Give a better error message for non-existing share modes X-Git-Tag: ldb-2.1.0~375 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f2a91426b791d1fc1b1655dfd4b8af5d50142d08;p=thirdparty%2Fsamba.git smbd: Give a better error message for non-existing share modes Signed-off-by: Volker Lendecke Reviewed-by: Ralph Boehme Autobuild-User(master): Ralph Böhme Autobuild-Date(master): Mon Dec 9 17:33:42 UTC 2019 on sn-devel-184 --- diff --git a/source3/locking/share_mode_lock.c b/source3/locking/share_mode_lock.c index 72290126a0d..dacb5efab85 100644 --- a/source3/locking/share_mode_lock.c +++ b/source3/locking/share_mode_lock.c @@ -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 {