The branch, v3-6-test has been updated
via 04f2fb7... small optimizations for shadowcopy2 module
via 77965ce... fix snapshot content display with hide unreadable
via ed824ac... s3: Fix shadow copies after the change for in-path @GMT-
via 7f19709... s3: Fix in-path shadowcopy2 module
from 09f3c92... s3-spoolss: fix type-punned pointer build warning.
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test
- Log -----------------------------------------------------------------
commit 04f2fb782f79f4acfb8ea515df49845aee83d123
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 77965ce85e46f7356960c4b7b84fbf5d3dfebeba
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 ed824ac680b5fee67c551b7603b5ca5c41dcce41
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 7f19709431db85b0a0fe145dc3ccc8d90873e802
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