#include "libcli/raw/libcliraw.h"
#include "libcli/auth/libcli_auth.h"
#include "libcli/smb_composite/smb_composite.h"
+#include "param/param.h"
/*
wrapper around smbcli_sock_connect()
/* wrapper around smb_raw_negotiate() */
NTSTATUS smbcli_negprot(struct smbcli_state *cli)
{
- return smb_raw_negotiate(cli->transport, lp_cli_maxprotocol());
+ return smb_raw_negotiate(cli->transport, lp_cli_maxprotocol(global_loadparm));
}
/* wrapper around smb_raw_sesssetup() */
setup.in.sesskey = cli->transport->negotiate.sesskey;
setup.in.capabilities = cli->transport->negotiate.capabilities;
setup.in.credentials = credentials;
- setup.in.workgroup = lp_workgroup();
+ setup.in.workgroup = lp_workgroup(global_loadparm);
status = smb_composite_sesssetup(cli->session, &setup);
/*
parse a //server/share type UNC name
*/
-BOOL smbcli_parse_unc(const char *unc_name, TALLOC_CTX *mem_ctx,
+bool smbcli_parse_unc(const char *unc_name, TALLOC_CTX *mem_ctx,
char **hostname, char **sharename)
{
char *p;
*hostname = talloc_strdup(mem_ctx, &unc_name[2]);
p = terminate_path_at_separator(*hostname);
- if (p && *p) {
+ if (p != NULL && *p) {
*sharename = talloc_strdup(mem_ctx, p);
terminate_path_at_separator(*sharename);
- } else {
- *sharename = talloc_strdup(mem_ctx,
- lp_parm_string(-1, "torture", "share"));
}
if (*hostname && *sharename) {