components/samba/samba/patches/vfs_shadow_copy2.c.patch
changeset 264 84a67a54e8fd
child 628 c3c0c8f3f696
equal deleted inserted replaced
263:1057446c9ee5 264:84a67a54e8fd
       
     1 X-Git-Url: http://gitweb.samba.org/?p=samba.git;a=blobdiff_plain;f=source3%2Fmodules%2Fvfs_shadow_copy2.c;h=2777907a57da081118e8d11f846f6a33f9095a1d;hp=0393f309692b139f74c2460d2bdc27f8352bf50a;hb=HEAD;hpb=cf74a4857c051b43b1f6a06b714a93a65e8a1f90
       
     2 
       
     3 diff --git a/source3/modules/vfs_shadow_copy2.c b/source3/modules/vfs_shadow_copy2.c
       
     4 index 0393f30..2777907 100644
       
     5 --- source3/modules/vfs_shadow_copy2.c
       
     6 +++ source3/modules/vfs_shadow_copy2.c
       
     7 @@ -250,8 +250,8 @@ static const char *shadow_copy2_normalise_path(TALLOC_CTX *mem_ctx, const char *
       
     8  } while (0)
       
     9  
       
    10  #define _SHADOW2_NEXT_SMB_FNAME(op, args, rtype, eret, extra) do { \
       
    11 -		const char *gmt_start; \
       
    12 -		if (shadow_copy2_match_name(smb_fname->base_name, &gmt_start)) {	\
       
    13 +	const char *gmt_start; \
       
    14 +	if (shadow_copy2_match_name(smb_fname->base_name, &gmt_start)) { \
       
    15  		char *name2; \
       
    16  		char *smb_base_name_tmp = NULL; \
       
    17  		rtype ret; \
       
    18 @@ -535,6 +535,10 @@ static int shadow_copy2_rename(vfs_handle_struct *handle,
       
    19  			       const struct smb_filename *smb_fname_src,
       
    20  			       const struct smb_filename *smb_fname_dst)
       
    21  {
       
    22 +	if (shadow_copy2_match_name(smb_fname_src->base_name, NULL)) {
       
    23 +		errno = EXDEV;
       
    24 +		return -1;
       
    25 +	}
       
    26  	SHADOW2_NEXT2_SMB_FNAME(RENAME,
       
    27  				(handle, smb_fname_src, smb_fname_dst));
       
    28  }