[prev in list] [next in list] [prev in thread] [next in thread] 

List:       samba
Subject:    Re: [Samba] Patch for bug 14727 / samba > 4.13 in pkgsrc
From:       Ralph Boehme via samba <samba () lists ! samba ! org>
Date:       2022-01-28 6:14:49
Message-ID: 2f196566-352e-e44a-f550-2121c057241f () samba ! org
[Download RAW message or body]

This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
[Attachment #2 (multipart/mixed)]

[Attachment #4 (text/plain)]

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

["OpenPGP_signature.asc" (application/pgp-signature)]

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

--===============7008590974204343105==--


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic