summaryrefslogtreecommitdiffstats
path: root/source3/modules
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2012-10-15 18:13:33 +0200
committerVolker Lendecke <vl@samba.org>2014-06-27 06:49:10 +0200
commit68c7b339ccb02305a27b1192222537074efa0085 (patch)
tree4e05a0be6e71941074be2c913d3b7906006f5a32 /source3/modules
parent064dd03223deb86e5baaadfc2f9b72dde829d995 (diff)
downloadsamba-68c7b339ccb02305a27b1192222537074efa0085.tar.gz
samba-68c7b339ccb02305a27b1192222537074efa0085.tar.xz
samba-68c7b339ccb02305a27b1192222537074efa0085.zip
s3-shadow-copy2: Add extreme debug output to shadow_copy2_strip_snapshot
This is sooo hairy to debug when things go wrong :-( Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Christof Schmitt <cs@samba.org>
Diffstat (limited to 'source3/modules')
-rw-r--r--source3/modules/vfs_shadow_copy2.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source3/modules/vfs_shadow_copy2.c b/source3/modules/vfs_shadow_copy2.c
index 30eaaa4192..1b3c48416d 100644
--- a/source3/modules/vfs_shadow_copy2.c
+++ b/source3/modules/vfs_shadow_copy2.c
@@ -243,19 +243,24 @@ static bool shadow_copy2_strip_snapshot(TALLOC_CTX *mem_ctx,
p = strstr_m(name, "@GMT-");
if (p == NULL) {
+ DEBUG(11, ("@GMT not found\n"));
goto no_snapshot;
}
if ((p > name) && (p[-1] != '/')) {
/* the GMT-token does not start a path-component */
+ DEBUG(10, ("not at start, p=%p, name=%p, p[-1]=%d\n",
+ p, name, (int)p[-1]));
goto no_snapshot;
}
q = strptime(p, GMT_FORMAT, &tm);
if (q == NULL) {
+ DEBUG(10, ("strptime failed\n"));
goto no_snapshot;
}
tm.tm_isdst = -1;
timestamp = timegm(&tm);
if (timestamp == (time_t)-1) {
+ DEBUG(10, ("timestamp==-1\n"));
goto no_snapshot;
}
if ((p == name) && (q[0] == '\0')) {
@@ -279,6 +284,7 @@ static bool shadow_copy2_strip_snapshot(TALLOC_CTX *mem_ctx,
* TODO: Is this correct? Or would the GMT tag as the
* last component be a valid input?
*/
+ DEBUG(10, ("q[0] = %d\n", (int)q[0]));
goto no_snapshot;
}
q += 1;
@@ -301,6 +307,8 @@ static bool shadow_copy2_strip_snapshot(TALLOC_CTX *mem_ctx,
"insert string '%s'\n", name, insert));
have_insert = (strstr(name, insert+1) != NULL);
+ DEBUG(10, ("have_insert=%d, name=%s, insert+1=%s\n",
+ (int)have_insert, name, insert+1));
if (have_insert) {
DEBUG(10, (__location__ ": insert string '%s' found in "
"path '%s' found in snapdirseverywhere mode "