From: Uri Simchoni Date: Tue, 3 Nov 2015 08:42:00 +0000 (+0200) Subject: vfs_shadow_copy2: check crossmountpoints against snapdirseverywhere X-Git-Url: http://git.samba.org/?p=obnox%2Fsamba%2Fsamba-obnox.git;a=commitdiff_plain;h=73bba0b5a4e30397f7ee710cf4d6d44e704e1856 vfs_shadow_copy2: check crossmountpoints against snapdirseverywhere If crossmountpoints is enabled, verify that snapdirseverywhere is enabled too, since crossmountpoints has no meaning otherwise. This obviates the check of crossmountpoints against other config variables. Signed-off-by: Uri Simchoni --- diff --git a/source3/modules/vfs_shadow_copy2.c b/source3/modules/vfs_shadow_copy2.c index 7ea7d352b2a..27dbe519725 100644 --- a/source3/modules/vfs_shadow_copy2.c +++ b/source3/modules/vfs_shadow_copy2.c @@ -1927,6 +1927,11 @@ static int shadow_copy2_connect(struct vfs_handle_struct *handle, "shadow", "crossmountpoints", false); + if (config->crossmountpoints && !config->snapdirseverywhere) { + DBG_WARNING("Warning: 'crossmountpoints' depends on " + "'snapdirseverywhere'. Disabling crossmountpoints.\n"); + } + config->fixinodes = lp_parm_bool(SNUM(handle->conn), "shadow", "fixinodes", false); @@ -2011,12 +2016,6 @@ static int shadow_copy2_connect(struct vfs_handle_struct *handle, basedir = NULL; } - if (config->crossmountpoints && basedir != NULL) { - DEBUG(1, (__location__ " Warning: 'basedir' is incompatible " - "with 'crossmountpoints'. Disabling basedir.\n")); - basedir = NULL; - } - if (basedir == NULL) { basedir = config->mount_point; }