summaryrefslogtreecommitdiff
path: root/source3/modules
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2009-06-30 14:26:32 +0200
committerVolker Lendecke <vl@samba.org>2009-07-29 06:28:50 -0400
commit94a139afe5d607b09753eec36127e5b682978c5a (patch)
tree9fc74a811a1e0b81fc31d0b1f6f7da598b3f34b9 /source3/modules
parentd8543da9dad3286cd330b98374405edb9f976e77 (diff)
downloadsamba-94a139afe5d607b09753eec36127e5b682978c5a.tar.gz
samba-94a139afe5d607b09753eec36127e5b682978c5a.tar.bz2
samba-94a139afe5d607b09753eec36127e5b682978c5a.zip
shadow_copy2: The system getrealfilename() can't deal with a 0-length fname
This fixes viewing the content of snapshots in the share root directory. We have to treat the filename that *just* consists of "@GMT-YYYY.MM.DD-HH.MM.SS" like the share root, which is the current working directory.
Diffstat (limited to 'source3/modules')
-rw-r--r--source3/modules/vfs_shadow_copy2.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source3/modules/vfs_shadow_copy2.c b/source3/modules/vfs_shadow_copy2.c
index 5efae3b0ed..eac83fca74 100644
--- a/source3/modules/vfs_shadow_copy2.c
+++ b/source3/modules/vfs_shadow_copy2.c
@@ -476,6 +476,9 @@ static int shadow_copy2_mknod(vfs_handle_struct *handle,
static char *shadow_copy2_realpath(vfs_handle_struct *handle,
const char *fname, char *resolved_path)
{
+ if (shadow_copy2_match_name(fname) && (fname[GMT_NAME_LEN] == '\0')) {
+ return SMB_VFS_NEXT_REALPATH(handle, ".", resolved_path);
+ }
SHADOW2_NEXT(REALPATH, (handle, name, resolved_path), char *, NULL);
}