The branch, master has been updated
       via  f4e60b4... small optimizations for shadowcopy2 module
       via  b77f241... fix snapshot content display with hide unreadable
       via  cc2aa85... s3: Fix shadow copies after the change for in-path @GMT-
       via  68c6e07... s3: Fix in-path shadowcopy2 module
      from  72cd5bc... make scannedonly notify the scanner if no .scanned: file 
was found during rename

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit f4e60b42d37b5136dfd124de8bb5c1c9cd084957
Author: Christian Ambach <[email protected]>
Date:   Wed Apr 21 15:10:39 2010 +0200

    small optimizations for shadowcopy2 module
    
    - remove a compiler warning
    - replace strlen usage
    
    Signed-off-by: Christian Ambach <[email protected]>

commit b77f241b28bcf29a88e28a49623a5e99a356bb34
Author: Christian Ambach <[email protected]>
Date:   Wed Apr 14 10:05:56 2010 +0200

    fix snapshot content display with hide unreadable
    
    With the hide unreadable option set, snapshots are be displayed
    as empty with shadow_copy2 and a NFSv4 ACL module.
    
    To prevent multiple conversions of the paths when the acl call
    does a VFS_STAT (as the nfs4acl code does), a check was added
    to convert_shadow2_name() so it will not touch paths any more
    that look like they have already been converted.
    
    Signed-off-by: Christian Ambach <[email protected]>

commit cc2aa855a3cc690716233bde57ae74711813db0f
Author: Volker Lendecke <[email protected]>
Date:   Thu Nov 12 12:30:58 2009 +0100

    s3: Fix shadow copies after the change for in-path @GMT-
    
    Signed-off-by: Christian Ambach <[email protected]>

commit 68c6e07591ed35c2c6aca2e1979ee08ae469c13c
Author: Volker Lendecke <[email protected]>
Date:   Mon Nov 9 11:06:30 2009 +0100

    s3: Fix in-path shadowcopy2 module
    
    Signed-off-by: Christian Ambach <[email protected]>

-----------------------------------------------------------------------

Summary of changes:
 source3/modules/vfs_shadow_copy2.c |   17 ++++++++++++-----
 1 files changed, 12 insertions(+), 5 deletions(-)


Changeset truncated at 500 lines:

diff --git a/source3/modules/vfs_shadow_copy2.c 
b/source3/modules/vfs_shadow_copy2.c
index a426547..502f815 100644
--- a/source3/modules/vfs_shadow_copy2.c
+++ b/source3/modules/vfs_shadow_copy2.c
@@ -411,7 +411,7 @@ static char *convert_shadow2_name(vfs_handle_struct 
*handle, const char *fname,
        TALLOC_CTX *tmp_ctx = talloc_new(handle->data);
        const char *snapdir, *relpath, *baseoffset, *basedir;
        size_t baselen;
-       char *ret;
+       char *ret, *prefix;
 
        struct tm timestamp;
        time_t timestamp_t;
@@ -435,6 +435,13 @@ static char *convert_shadow2_name(vfs_handle_struct 
*handle, const char *fname,
                return NULL;
        }
 
+       prefix = talloc_asprintf(tmp_ctx, "%s/@GMT-", snapdir);
+       if (strncmp(fname, prefix, (talloc_get_size(prefix)-1)) == 0) {
+               /* this looks like as we have already normalized it, leave it 
untouched*/
+               talloc_free(tmp_ctx);
+               return talloc_strdup(handle->data, fname);
+       }
+
        if (strncmp(fname, "@GMT-", 5) != 0) {
                fname = shadow_copy2_normalise_path(tmp_ctx, fname, gmt_path);
                if (fname == NULL) {
@@ -652,7 +659,7 @@ static char *shadow_copy2_realpath(vfs_handle_struct 
*handle,
 
        if (shadow_copy2_match_name(fname, &gmt)
            && (gmt[GMT_NAME_LEN] == '\0')) {
-               char *copy, *result;
+               char *copy;
 
                copy = talloc_strdup(talloc_tos(), fname);
                if (copy == NULL) {
@@ -661,11 +668,11 @@ static char *shadow_copy2_realpath(vfs_handle_struct 
*handle,
                }
 
                copy[gmt - fname] = '.';
+               copy[gmt - fname + 1] = '\0';
 
                DEBUG(10, ("calling NEXT_REALPATH with %s\n", copy));
-               result = SMB_VFS_NEXT_REALPATH(handle, copy, resolved_path);
-               TALLOC_FREE(copy);
-               return result;
+               SHADOW2_NEXT(REALPATH, (handle, name, resolved_path), char *,
+                            NULL);
        }
         SHADOW2_NEXT(REALPATH, (handle, name, resolved_path), char *, NULL);
 }


-- 
Samba Shared Repository

Reply via email to