1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-24 13:57:43 +03:00

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 <uri@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>

Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Fri Jan 22 01:54:06 CET 2016 on sn-devel-144
This commit is contained in:
Uri Simchoni 2015-11-03 10:42:00 +02:00 committed by Michael Adam
parent 6cff009547
commit 6ed3985182

View File

@ -1928,6 +1928,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);
@ -2018,12 +2023,6 @@ static int shadow_copy2_connect(struct vfs_handle_struct *handle,
TALLOC_FREE(config->basedir);
}
if (config->crossmountpoints && config->basedir != NULL) {
DEBUG(1, (__location__ " Warning: 'basedir' is incompatible "
"with 'crossmountpoints'. Disabling basedir.\n"));
TALLOC_FREE(config->basedir);
}
if (config->basedir == NULL) {
config->basedir = config->mount_point;
}