1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-23 17:34:34 +03:00

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.
This commit is contained in:
Volker Lendecke 2009-06-30 14:26:32 +02:00
parent d8543da9da
commit 94a139afe5

View File

@ -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);
}