mirror of
https://github.com/samba-team/samba.git
synced 2025-01-31 01:48:16 +03:00
smbd: Fix claiming version
We now have to do an explicit DOWNGRADE when we want to change from G_LOCK_WRITE to G_LOCK_READ. Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Sun Jan 19 19:58:01 UTC 2020 on sn-devel-184
This commit is contained in:
parent
25bcf0e789
commit
4dd026d0d3
@ -1508,7 +1508,7 @@ static NTSTATUS smbd_claim_version(struct messaging_context *msg,
|
||||
return status;
|
||||
}
|
||||
|
||||
status = g_lock_lock(ctx, string_term_tdb_data(name), G_LOCK_READ,
|
||||
status = g_lock_lock(ctx, string_term_tdb_data(name), G_LOCK_DOWNGRADE,
|
||||
(struct timeval) { .tv_sec = 60 });
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
DBG_WARNING("g_lock_lock(G_LOCK_READ) failed: %s\n",
|
||||
|
Loading…
x
Reference in New Issue
Block a user