[PATCH] Start moving lp_posix_pathnames out of utility functions.

Jeremy Allison jra at samba.org
Wed Dec 23 06:54:53 UTC 2015


On Mon, Dec 14, 2015 at 10:43:13PM +0100, Ralph Boehme wrote:
> On Mon, Dec 14, 2015 at 08:24:20AM +0100, Ralph Boehme wrote:
> > On Sun, Dec 13, 2015 at 10:04:26AM -0800, Jeremy Allison wrote:
> > > > yes, for now. For SMB3 UNIX extension at least POSIX pathname
> > > > behaviour must be negotiable seperately (for OS X clients that may want
> > > > general POSIX behaviour *and* named streams, no no POSIX pathnames).
> > > 
> > > Can you re-create your extra pathnames flag patch on top
> > > of what is pushed so we prepare for the changes for OS X
> > > clients ?
> > 
> > will do.
> 
> attached.

LGTM - pushed !

> -- 
> SerNet GmbH, Bahnhofsallee 1b, 37081 Göttingen
> phone: +49-551-370000-0, fax: +49-551-370000-9
> AG Göttingen, HRB 2816, GF: Dr. Johannes Loxen
> http://www.sernet.de,mailto:kontakt@sernet.de

> From aa82eb28a470d6fa057377fd3f0a07b84fb039b4 Mon Sep 17 00:00:00 2001
> From: Ralph Boehme <slow at samba.org>
> Date: Sat, 12 Dec 2015 22:31:24 +0100
> Subject: [PATCH 1/2] smbd: file_struct: factor out POSIX pathname processing
>  out of POSIX open
> 
> Factor out another POSIX cabability from file_struct.posix_flags
> FSP_POSIX_FLAGS_OPEN.
> 
> Places that still use FSP_POSIX_FLAGS_OPEN when dealing with pathnames
> can be converted later, because for the time being we always set
> FSP_POSIX_FLAGS_ALL in file_struct.posix_flags.
> 
> Signed-off-by: Ralph Boehme <slow at samba.org>
> ---
>  source3/include/vfs.h | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/source3/include/vfs.h b/source3/include/vfs.h
> index 17bd8fa..71e1af9 100644
> --- a/source3/include/vfs.h
> +++ b/source3/include/vfs.h
> @@ -301,9 +301,11 @@ typedef struct files_struct {
>  
>  #define FSP_POSIX_FLAGS_OPEN		0x01
>  #define FSP_POSIX_FLAGS_RENAME		0x02
> +#define FSP_POSIX_FLAGS_PATHNAMES	0x04
>  
>  #define FSP_POSIX_FLAGS_ALL			\
>  	(FSP_POSIX_FLAGS_OPEN |			\
> +	 FSP_POSIX_FLAGS_PATHNAMES |		\
>  	 FSP_POSIX_FLAGS_RENAME)
>  
>  struct vuid_cache_entry {
> -- 
> 2.5.0
> 
> 
> From 20b96a91908ee85f704f5d1405b5fa7b077c5166 Mon Sep 17 00:00:00 2001
> From: Jeremy Allison <jra at samba.org>
> Date: Fri, 11 Dec 2015 14:49:44 -0800
> Subject: [PATCH 2/2] s3: smbd: open_file: use FSP_POSIX_FLAGS_PATHNAMES
> 
> Start using FSP_POSIX_FLAGS_PATHNAMES instead of the kitchen sink
> FSP_POSIX_FLAGS_OPEN.
> 
> Signed-off-by: Ralph Boehme <slow at samba.org>
> ---
>  source3/smbd/open.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/source3/smbd/open.c b/source3/smbd/open.c
> index 4053089..60b0f21 100644
> --- a/source3/smbd/open.c
> +++ b/source3/smbd/open.c
> @@ -809,7 +809,7 @@ static NTSTATUS open_file(files_struct *fsp,
>  			wild = smb_fname->base_name;
>  		}
>  		if ((local_flags & O_CREAT) && !file_existed &&
> -		    !(fsp->posix_flags & FSP_POSIX_FLAGS_OPEN) &&
> +		    !(fsp->posix_flags & FSP_POSIX_FLAGS_PATHNAMES) &&
>  		    ms_has_wild(wild))  {
>  			return NT_STATUS_OBJECT_NAME_INVALID;
>  		}
> -- 
> 2.5.0
> 




More information about the samba-technical mailing list