In the case of snapdirseverywhere but NOT crossmountpoints.
This spares stat calls.
And is the only correct thing to do if the mount point was
specified in the configuration.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit
6ccbc1347d3240fc3c874a1957b654456fb6234c)
min_offset = 0;
if (!config->crossmountpoints) {
- char *mount_point;
-
- mount_point = shadow_copy2_find_mount_point(talloc_tos(),
- handle);
- if (mount_point == NULL) {
- goto fail;
- }
- min_offset = strlen(mount_point);
- TALLOC_FREE(mount_point);
+ min_offset = strlen(config->mount_point);
}
memcpy(converted, path, pathlen+1);