[Samba] Patch for bug 14727 / samba > 4.13 in pkgsrc

Ralph Boehme slow at samba.org
Fri Jan 28 06:14:49 UTC 2022


On 1/27/22 21:30, Dr. Thomas Orgis via samba wrote:
> since access to Samba's bugzilla seems to be manually curated and I'm
> only a very casual contributor, I hope it's OK for me to discuss
> 
> 	https://bugzilla.samba.org/show_bug.cgi?id=14727
> 
> a bit here. In the process of updating samba4 in pkgsrc from 4.13, I'm
> intending to follow this suggestion:
> 
>   Ralph Böhme 2021-06-03 11:48:39 UTC
> 
>   (In reply to Jeremy Allison from comment #3)
>   What if we just filter out the O_CREAT in this case? We know we're
>   opening an existing file so we don't need to pass O_CREAT. Easy fix
>   for the BSDs and not really a big heritage to carry along.
> 
> Is this the correct change for this?
> 
> --- source3/smbd/open.c.orig	2022-01-27 18:20:00.791110968 +0000
> +++ source3/smbd/open.c
> @@ -1189,11 +1189,13 @@ static NTSTATUS reopen_from_procfd(struc
>   
>   	fsp->fsp_flags.is_pathref = false;
>   
> +	/* O_CREAT not useful for reopening, and it upsets BSD kernels,
> +	 * see https://bugzilla.samba.org/show_bug.cgi?id=14727 . */
>   	new_fd = SMB_VFS_OPENAT(fsp->conn,
>   				fsp->conn->cwd_fsp,
>   				&proc_fname,
>   				fsp,
> -				flags,
> +				flags & ~O_CREAT,
>   				mode);
>   	if (new_fd == -1) {
>   		status = map_nt_error_from_unix(errno);

Andrew, is this a problem on FreeBSD as well and if so, how do you deal 
with this?

-slow

-- 
Ralph Boehme, Samba Team                 https://samba.org/
SerNet Samba Team Lead      https://sernet.de/en/team-samba
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <http://lists.samba.org/pipermail/samba/attachments/20220128/faf8c3b4/OpenPGP_signature.sig>


More information about the samba mailing list