struct security_descriptor *psd = NULL;
bool is_disk_op;
int max_connections = 0;
+ SMB_STRUCT_STAT st;
TALLOC_CTX *ctx = p->mem_ctx;
DEBUG(5,("_srvsvc_NetShareAdd: %d\n", __LINE__));
return WERR_OBJECT_PATH_INVALID;
}
+ ret = sys_lstat(path, &st, false);
+ if (ret == -1 && (errno != EACCES)) {
+ /*
+ * If path has any other than permission
+ * problem, return WERR_BADFILE (as Windows
+ * does.
+ */
+ return WERR_BADFILE;
+ }
+
/* Ensure share name, pathname and comment don't contain '"' characters. */
string_replace(share_name_in, '"', ' ');
string_replace(share_name, '"', ' ');