diff options
author | Volker Lendecke <vl@samba.org> | 2009-06-30 14:26:32 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2009-07-29 06:28:50 -0400 |
commit | 94a139afe5d607b09753eec36127e5b682978c5a (patch) | |
tree | 9fc74a811a1e0b81fc31d0b1f6f7da598b3f34b9 | |
parent | d8543da9dad3286cd330b98374405edb9f976e77 (diff) | |
download | samba-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.
-rw-r--r-- | source3/modules/vfs_shadow_copy2.c | 3 |
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); } |