[Samba] CTDB and locking issues in 4.4.6 (Classic domain)

Ralph Böhme slow at samba.org
Sun Oct 23 09:00:08 UTC 2016


Alex,

On Sat, Oct 22, 2016 at 07:30:01PM +0100, Alex Crow wrote:
> I applied the patch to a new build of Sernet 4.4.6 SRPM. I could still
> open the file from both hosts, and in fact this time I could actually
> open it on the same host without any problems:

I don't see where you're opening the file twice from one smbclient
below. Am I missing something?

And then there's no need to use an xls file, simply create an empty
file in the root of the share with `touch file` and use that.

> 
> host 1:
> 
> smbclient -U ajc //172.31.0.120/ifa_v
> 
> ...
> 
> smb: \jmi\Corporate Accounting\ISL Ltd Accounts\2016\1609\> open "201609
> 213_ ISL Balance sheet variance analysis.xls"
> open file \jmi\Corporate Accounting\ISL Ltd Accounts\2016\1609\201609
> 213_ ISL Balance sheet variance analysis.xls: for read/write fnum 56287
> 
> host 2:
> 
> smbclient -U ajc //172.31.0.120/ifa_v
> 
> ...
> 
> smb: \jmi\Corporate Accounting\ISL Ltd Accounts\2016\1609\> open "201609
> 213_ ISL Balance sheet variance analysis.xls"
> open file \jmi\Corporate Accounting\ISL Ltd Accounts\2016\1609\201609
> 213_ ISL Balance sheet variance analysis.xls: for read/write fnum 17669
>
> But this:
> 
> # smbstatus -L
> Locked files:
> Pid          Uid        DenyMode   Access      R/W       
> Oplock           SharePath   Name   Time
> --------------------------------------------------------------------------------------------------
> 1:19650      1046       DENY_NONE  0x83        RDWR      
> NONE             /mfs/samba/drive_v   jmi/Corporate Accounting/ISL Ltd
> Accounts/2016/1609/201609 213_ ISL Balance sheet variance analysis.xls  
> Sat Oct 22 19:26:06 2016
> 0:13503      1046       DENY_NONE  0x83        RDWR      
> NONE             /mfs/samba/drive_v   jmi/Corporate Accounting/ISL Ltd
> Accounts/2016/1609/201609 213_ ISL Balance sheet variance analysis.xls  
> Sat Oct 22 18:58:06 2016

Is this from an open with the patched smbclient or from Excel?

> Is odd as the patch was applied fine during the RPM build process.
> 
> Is there something I need to do when building from sRPMs to make
> this stick?

You could double check in ~/rpmbuild/BUILD/ if the patch was really
applied. If it was, an smbclient open should result in DENY_ALL
denymode in smbstatus -L, eg:

$ ./bin/smbclient -Uslow%x -msmb3 //10.10.11.100/test
Domain=[SLOWSERVER] OS=[] Server=[]
smb: \> open test
open file \test: for read/write fnum 1

$ sudo ./bin/smbstatus -L
Locked files:
Pid          Uid        DenyMode   Access      R/W        Oplock           SharePath   Name   Time
--------------------------------------------------------------------------------------------------
12757        1000       DENY_ALL   0x3         RDWR       NONE             /shares/test   test   Sun Oct 23 10:39:25 2016

Cheerio!
-slow



More information about the samba mailing list