+ snapsharepath = lp_parm_const_string(SNUM(handle->conn), "shadow",
+ "snapsharepath", NULL);
+ if (snapsharepath != NULL) {
+ if (snapsharepath[0] == '/') {
+ DBG_WARNING("Warning: 'snapsharepath' is "
+ "absolute ('%s'), but it has to be a "
+ "relative path. Disabling snapsharepath.\n",
+ snapsharepath);
+ snapsharepath = NULL;
+ }
+ if (config->snapdirseverywhere && snapsharepath != NULL) {
+ DBG_WARNING("Warning: 'snapsharepath' is incompatible "
+ "with 'snapdirseverywhere'. Disabling "
+ "snapsharepath.\n");
+ snapsharepath = NULL;
+ }
+ }
+
+ if (basedir != NULL && snapsharepath != NULL) {
+ DBG_WARNING("Warning: 'snapsharepath' is incompatible with "
+ "'basedir'. Disabling snapsharepath\n");
+ snapsharepath = NULL;
+ }
+
+ if (snapsharepath != NULL) {
+ config->rel_connectpath = talloc_strdup(config, snapsharepath);
+ if (config->rel_connectpath == NULL) {
+ DBG_ERR("talloc_strdup() failed\n");
+ errno = ENOMEM;
+ return -1;
+ }
+ }
+