Bug 15130 - Failed to download file that is write locked: NT_STATUS_FILE_LOCK_CONFLICT
Summary: Failed to download file that is write locked: NT_STATUS_FILE_LOCK_CONFLICT
Status: NEW
Alias: None
Product: Samba 4.1 and newer
Classification: Unclassified
Component: libsmbclient (show other bugs)
Version: 4.13.17
Hardware: All All
: P5 normal (vote)
Target Milestone: ---
Assignee: Samba QA Contact
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-07-26 09:39 UTC by wangrong
Modified: 2022-07-26 09:39 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description wangrong 2022-07-26 09:39:38 UTC
Problem recurrence:
    On the server side, a process opens a file in a shared directory and adds a POSIX write lock. For example, use WPS to open 123.xls.
    On the client side, an error (NT_STATUS_FILE_LOCK_CONFLICT) will be reported when using smbclient or libsmbclient to download an opened file.

But opened files can be downloaded normally through CIFS. 

The preliminary test found that the file download can be completed after completing the following modifications:
    Change the initial value of the flags variable in the functions SMBC_server_internal and do_connect to CLI_FULL_CONNECTION_OPLOCKS.

What I want to ask is:
    Is there any risk to this modification.
    Is there a configuration to control oplock behavior on the client side.

Looking forward to your reply, thanks!