d_fprintf(stderr, "net usershare delete: share name %s contains "
"invalid characters (any of %s)\n",
sharename, INVALID_SHARENAME_CHARS);
- SAFE_FREE(sharename);
+ TALLOC_FREE(sharename);
return -1;
}
lp_usershare_path(),
sharename);
if (!us_path) {
- SAFE_FREE(sharename);
+ TALLOC_FREE(sharename);
return -1;
}
d_fprintf(stderr, "net usershare delete: unable to remove usershare %s. "
"Error was %s\n",
us_path, strerror(errno));
- SAFE_FREE(sharename);
+ TALLOC_FREE(sharename);
return -1;
}
- SAFE_FREE(sharename);
+ TALLOC_FREE(sharename);
return 0;
}
d_fprintf(stderr, "net usershare add: maximum number of allowed usershares (%d) reached\n",
lp_usershare_max_shares() );
TALLOC_FREE(ctx);
- SAFE_FREE(sharename);
return -1;
}
"invalid characters (any of %s)\n",
sharename, INVALID_SHARENAME_CHARS);
TALLOC_FREE(ctx);
- SAFE_FREE(sharename);
return -1;
}
d_fprintf(stderr, "net usershare add: share name %s is already a valid system user name\n",
sharename );
TALLOC_FREE(ctx);
- SAFE_FREE(sharename);
return -1;
}
full_path = get_basepath(ctx);
if (!full_path) {
TALLOC_FREE(ctx);
- SAFE_FREE(sharename);
return -1;
}
full_path_tmp = talloc_asprintf(ctx,
full_path);
if (!full_path_tmp) {
TALLOC_FREE(ctx);
- SAFE_FREE(sharename);
return -1;
}
sharename);
if (!full_path) {
TALLOC_FREE(ctx);
- SAFE_FREE(sharename);
return -1;
}
d_fprintf(stderr,"net usershare add: path %s is not an absolute path.\n",
us_path);
TALLOC_FREE(ctx);
- SAFE_FREE(sharename);
return -1;
}
"this is a directory. Error was %s\n",
us_path, strerror(errno) );
TALLOC_FREE(ctx);
- SAFE_FREE(sharename);
return -1;
}
d_fprintf(stderr, "net usershare add: path %s is not a directory.\n",
us_path );
TALLOC_FREE(ctx);
- SAFE_FREE(sharename);
return -1;
}
"\tto the [global] section of the smb.conf to allow this.\n",
us_path );
TALLOC_FREE(ctx);
- SAFE_FREE(sharename);
return -1;
}
d_fprintf(stderr, "net usershare add: malformed acl %s (missing ':').\n",
pacl );
TALLOC_FREE(ctx);
- SAFE_FREE(sharename);
return -1;
}
"(access control must be 'r', 'f', or 'd')\n",
pacl );
TALLOC_FREE(ctx);
- SAFE_FREE(sharename);
return -1;
}
d_fprintf(stderr, "net usershare add: malformed terminating character for acl %s\n",
pacl );
TALLOC_FREE(ctx);
- SAFE_FREE(sharename);
return -1;
}
if ((name = talloc_strndup(ctx, pacl, pcolon - pacl)) == NULL) {
d_fprintf(stderr, "talloc_strndup failed\n");
TALLOC_FREE(ctx);
- SAFE_FREE(sharename);
return -1;
}
if (!string_to_sid(&sid, name)) {
d_fprintf(stderr, "\n");
}
TALLOC_FREE(ctx);
- SAFE_FREE(sharename);
return -1;
}
}
"but the \"usershare allow guests\" parameter is not enabled "
"by this server.\n");
TALLOC_FREE(ctx);
- SAFE_FREE(sharename);
return -1;
}
d_fprintf(stderr, "net usershare add: cannot create tmp file %s\n",
full_path_tmp );
TALLOC_FREE(ctx);
- SAFE_FREE(sharename);
return -1;
}
d_fprintf(stderr, "net usershare add: cannot lstat tmp file %s\n",
full_path_tmp );
TALLOC_FREE(ctx);
- SAFE_FREE(sharename);
return -1;
}
d_fprintf(stderr, "net usershare add: cannot fstat tmp file %s\n",
full_path_tmp );
TALLOC_FREE(ctx);
- SAFE_FREE(sharename);
return -1;
}
d_fprintf(stderr, "net usershare add: tmp file %s is not a regular file ?\n",
full_path_tmp );
TALLOC_FREE(ctx);
- SAFE_FREE(sharename);
return -1;
}
d_fprintf(stderr, "net usershare add: failed to fchmod tmp file %s to 0644n",
full_path_tmp );
TALLOC_FREE(ctx);
- SAFE_FREE(sharename);
return -1;
}
(unsigned int)to_write, full_path_tmp, strerror(errno));
unlink(full_path_tmp);
TALLOC_FREE(ctx);
- SAFE_FREE(sharename);
return -1;
}
sharename, strerror(errno));
TALLOC_FREE(ctx);
close(tmpfd);
- SAFE_FREE(sharename);
return -1;
}
net_usershare_info(c, 1, my_argv);
}
- SAFE_FREE(sharename);
TALLOC_FREE(ctx);
return 0;
}