[Samba] Win7 clients problem after upgrading samba file server to 4.12 on Arch

Jeremy Allison jra at samba.org
Sun May 10 02:37:22 UTC 2020


On Sat, May 09, 2020 at 03:35:03PM +0200, Ralph Boehme via samba wrote:
> Am 5/9/20 um 3:32 PM schrieb Ralph Boehme via samba:
> > I have a WIP fix for master, can you give it a whirl?
> 
> here it is.

Really sorry I missed this in review. This was my
fault :-(.

I'm really happy you've got a reproducer and
test case, that way we can make sure we don't regress.

Sorry for the bug once again. It's really good
pavlos was able to reproduce and track it down.
Thanks so much for your help !

Jeremy.

> -- 
> Ralph Boehme, Samba Team                https://samba.org/
> Samba Developer, SerNet GmbH   https://sernet.de/en/samba/
> GPG-Fingerprint   FAE2C6088A24252051C559E4AA1E9B7126399E46

> From 79cd7f7c028d1627fe86e740562ec9cab0a817e1 Mon Sep 17 00:00:00 2001
> From: Ralph Boehme <slow at samba.org>
> Date: Sat, 9 May 2020 15:13:54 +0200
> Subject: [PATCH] WIP smbd: fix for BUG xxx
> 
> ---
>  source3/smbd/open.c | 24 +++++++++++++++++-------
>  1 file changed, 17 insertions(+), 7 deletions(-)
> 
> diff --git a/source3/smbd/open.c b/source3/smbd/open.c
> index b6a326531aa..2fbe9a5aaaf 100644
> --- a/source3/smbd/open.c
> +++ b/source3/smbd/open.c
> @@ -1786,14 +1786,30 @@ static bool open_mode_check_fn(
>  	struct open_mode_check_state *state = private_data;
>  	bool disconnected, stale;
>  	uint32_t access_mask, share_access, lease_type;
> +	const uint32_t conflicting_access =
> +		FILE_WRITE_DATA|
> +		FILE_APPEND_DATA|
> +		FILE_READ_DATA|
> +		FILE_EXECUTE|
> +		DELETE_ACCESS;
>  
>  	disconnected = server_id_is_disconnected(&e->pid);
>  	if (disconnected) {
>  		return false;
>  	}
>  
> +	/*
> +	 * Ensure sharemodes of opens with non-conflicting access don't get
> +	 * propagated into sharemode-flags.
> +	 */
> +	if (e->access_mask & conflicting_access) {
> +		share_access = e->share_access;
> +	} else {
> +		share_access = FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE;
> +	}
> +
>  	access_mask = state->access_mask | e->access_mask;
> -	share_access = state->share_access & e->share_access;
> +	share_access = state->share_access & share_access;
>  	lease_type = state->lease_type | get_lease_type(e, state->fid);
>  
>  	if ((access_mask == state->access_mask) &&
> @@ -1824,12 +1840,6 @@ static NTSTATUS open_mode_check(connection_struct *conn,
>  	uint16_t new_flags;
>  	bool ok, conflict, have_share_entries;
>  
> -	if (is_oplock_stat_open(access_mask)) {
> -		/* Stat open that doesn't trigger oplock breaks or share mode
> -		 * checks... ! JRA. */
> -		return NT_STATUS_OK;
> -	}
> -
>  	/*
>  	 * Check if the share modes will give us access.
>  	 */
> -- 
> 2.26.2
> 





> -- 
> To unsubscribe from this list go to the following URL and read the
> instructions:  https://lists.samba.org/mailman/options/samba




More information about the samba mailing list