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

Alex Crow acrow at integrafin.co.uk
Sat Oct 22 18:30:01 UTC 2016


Hi Ralph,

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:

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 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?

Cheers

Alex


On 21/10/16 18:06, Ralph Böhme wrote:
> diff --git a/source3/client/client.c b/source3/client/client.c
> index 831b9bc..28e98af 100644
> --- a/source3/client/client.c
> +++ b/source3/client/client.c
> @@ -2498,12 +2498,12 @@ static int cmd_open(void)
>  
>  	status = cli_ntcreate(targetcli, targetname, 0,
>  			FILE_READ_DATA|FILE_WRITE_DATA, 0,
> -			FILE_SHARE_READ|FILE_SHARE_WRITE, FILE_OPEN,
> +			0, FILE_OPEN,
>  			0x0, 0x0, &fnum, NULL);
>  	if (!NT_STATUS_IS_OK(status)) {
>  		status = cli_ntcreate(targetcli, targetname, 0,
>  				FILE_READ_DATA, 0,
> -				FILE_SHARE_READ|FILE_SHARE_WRITE, FILE_OPEN,
> +				0, FILE_OPEN,
>  				0x0, 0x0, &fnum, NULL);
>  		if (NT_STATUS_IS_OK(status)) {
>  			d_printf("open file %s: for read/write fnum %d\n", targetname, fnum);
> -- 2.7.4


--
This message is intended only for the addressee and may contain
confidential information. Unless you are that person, you may not
disclose its contents or use it in any way and are requested to delete
the message along with any attachments and notify us immediately.
This email is not intended to, nor should it be taken to, constitute advice.
The information provided is correct to our knowledge & belief and must not
be used as a substitute for obtaining tax, regulatory, investment, legal or
any other appropriate advice.

"Transact" is operated by Integrated Financial Arrangements Ltd.
29 Clement's Lane, London EC4N 7AE. Tel: (020) 7608 4900 Fax: (020) 7608 5300.
(Registered office: as above; Registered in England and Wales under
number: 3727592). Authorised and regulated by the Financial Conduct
Authority (entered on the Financial Services Register; no. 190856).



More information about the samba mailing list