struct cli_state *targetcli = NULL;
char *targetpath = NULL;
TALLOC_CTX *ctx = talloc_tos();
+ struct cli_credentials *creds =
+ get_cmdline_auth_info_creds(popt_get_cmdline_auth_info());
NTSTATUS status;
- status = cli_resolve_path(ctx, "", popt_get_cmdline_auth_info(), cli,
+ status = cli_resolve_path(ctx,
+ "",
+ creds,
+ cli,
client_get_cur_dir(), &targetcli,
&targetpath);
if (!NT_STATUS_IS_OK(status)) {
uint32_t attributes;
int ret = 1;
TALLOC_CTX *ctx = talloc_stackframe();
+ struct cli_credentials *creds =
+ get_cmdline_auth_info_creds(popt_get_cmdline_auth_info());
NTSTATUS status;
newdir = talloc_strdup(ctx, new_dir);
new_cd = client_clean_name(ctx, new_cd);
client_set_cur_dir(new_cd);
- status = cli_resolve_path(ctx, "", popt_get_cmdline_auth_info(),
+ status = cli_resolve_path(ctx, "",
+ creds,
cli, new_cd, &targetcli, &targetpath);
if (!NT_STATUS_IS_OK(status)) {
d_printf("cd %s: %s\n", new_cd, nt_errstr(status));
TALLOC_CTX *ctx = talloc_tos();
struct cli_state *targetcli = NULL;
char *targetpath = NULL;
+ struct cli_credentials *creds =
+ get_cmdline_auth_info_creds(popt_get_cmdline_auth_info());
NTSTATUS ret_status = NT_STATUS_OK;
NTSTATUS status = NT_STATUS_OK;
/* check for dfs */
status = cli_resolve_path(ctx, "",
- popt_get_cmdline_auth_info(),
+ creds,
cli, head, &targetcli, &targetpath);
if (!NT_STATUS_IS_OK(status)) {
d_printf("do_list: [%s] %s\n", head,
struct cli_state *targetcli = NULL;
char *targetname = NULL;
char *lname = NULL;
+ struct cli_credentials *creds =
+ get_cmdline_auth_info_creds(popt_get_cmdline_auth_info());
NTSTATUS status;
lname = talloc_strdup(ctx, lname_in);
}
}
- status = cli_resolve_path(ctx, "", popt_get_cmdline_auth_info(),
+ status = cli_resolve_path(ctx, "",
+ creds,
cli, rname, &targetcli, &targetname);
if (!NT_STATUS_IS_OK(status)) {
d_printf("Failed to open %s: %s\n", rname, nt_errstr(status));
TALLOC_CTX *ctx = talloc_tos();
struct cli_state *targetcli;
char *targetname = NULL;
+ struct cli_credentials *creds =
+ get_cmdline_auth_info_creds(popt_get_cmdline_auth_info());
NTSTATUS status;
- status = cli_resolve_path(ctx, "", popt_get_cmdline_auth_info(),
+ status = cli_resolve_path(ctx, "",
+ creds,
cli, name, &targetcli, &targetname);
if (!NT_STATUS_IS_OK(status)) {
d_printf("mkdir %s: %s\n", name, nt_errstr(status));
TALLOC_CTX *ctx = talloc_tos();
char *mask = NULL;
char *buf = NULL;
+ struct cli_credentials *creds =
+ get_cmdline_auth_info_creds(popt_get_cmdline_auth_info());
NTSTATUS status;
mask = talloc_strdup(ctx, client_get_cur_dir());
}
status = cli_resolve_path(ctx, "",
- popt_get_cmdline_auth_info(), cli, mask,
+ creds,
+ cli, mask,
&targetcli, &targetname);
if (!NT_STATUS_IS_OK(status)) {
return 1;
struct cli_state *targetcli;
char *targetname = NULL;
struct push_state state;
+ struct cli_credentials *creds =
+ get_cmdline_auth_info_creds(popt_get_cmdline_auth_info());
NTSTATUS status;
- status = cli_resolve_path(ctx, "", popt_get_cmdline_auth_info(),
+ status = cli_resolve_path(ctx, "",
+ creds,
cli, rname, &targetcli, &targetname);
if (!NT_STATUS_IS_OK(status)) {
d_printf("Failed to open %s: %s\n", rname, nt_errstr(status));
uint32_t attribute;
struct cli_state *targetcli;
char *targetname = NULL;
+ struct cli_credentials *creds =
+ get_cmdline_auth_info_creds(popt_get_cmdline_auth_info());
NTSTATUS status;
if (!next_token_talloc(ctx, &cmd_ptr,&buf,NULL)) {
return 1;
}
- status = cli_resolve_path(ctx, "", popt_get_cmdline_auth_info(),
+ status = cli_resolve_path(ctx, "",
+ creds,
cli, mask, &targetcli, &targetname);
if (!NT_STATUS_IS_OK(status)) {
d_printf("cmd_wdel %s: %s\n", mask, nt_errstr(status));
char *targetname = NULL;
struct cli_state *targetcli;
uint16_t fnum = (uint16_t)-1;
+ struct cli_credentials *creds =
+ get_cmdline_auth_info_creds(popt_get_cmdline_auth_info());
NTSTATUS status;
if (!next_token_talloc(ctx, &cmd_ptr,&buf,NULL)) {
return 1;
}
- status = cli_resolve_path(ctx, "", popt_get_cmdline_auth_info(),
+ status = cli_resolve_path(ctx, "",
+ creds,
cli, mask, &targetcli, &targetname);
if (!NT_STATUS_IS_OK(status)) {
d_printf("open %s: %s\n", mask, nt_errstr(status));
struct cli_state *targetcli;
mode_t mode;
uint16_t fnum;
+ struct cli_credentials *creds =
+ get_cmdline_auth_info_creds(popt_get_cmdline_auth_info());
NTSTATUS status;
if (!next_token_talloc(ctx, &cmd_ptr,&buf,NULL)) {
}
mode = (mode_t)strtol(buf, (char **)NULL, 8);
- status = cli_resolve_path(ctx, "", popt_get_cmdline_auth_info(),
+ status = cli_resolve_path(ctx, "",
+ creds,
cli, mask, &targetcli, &targetname);
if (!NT_STATUS_IS_OK(status)) {
d_printf("posix_open %s: %s\n", mask, nt_errstr(status));
char *targetname = NULL;
struct cli_state *targetcli;
mode_t mode;
+ struct cli_credentials *creds =
+ get_cmdline_auth_info_creds(popt_get_cmdline_auth_info());
NTSTATUS status;
if (!next_token_talloc(ctx, &cmd_ptr,&buf,NULL)) {
}
mode = (mode_t)strtol(buf, (char **)NULL, 8);
- status = cli_resolve_path(ctx, "", popt_get_cmdline_auth_info(),
+ status = cli_resolve_path(ctx, "",
+ creds,
cli, mask, &targetcli, &targetname);
if (!NT_STATUS_IS_OK(status)) {
d_printf("posix_mkdir %s: %s\n", mask, nt_errstr(status));
char *buf = NULL;
char *targetname = NULL;
struct cli_state *targetcli;
+ struct cli_credentials *creds =
+ get_cmdline_auth_info_creds(popt_get_cmdline_auth_info());
NTSTATUS status;
if (!next_token_talloc(ctx, &cmd_ptr,&buf,NULL)) {
return 1;
}
- status = cli_resolve_path(ctx, "", popt_get_cmdline_auth_info(),
+ status = cli_resolve_path(ctx, "",
+ creds,
cli, mask, &targetcli, &targetname);
if (!NT_STATUS_IS_OK(status)) {
d_printf("posix_unlink %s: %s\n", mask, nt_errstr(status));
char *buf = NULL;
char *targetname = NULL;
struct cli_state *targetcli;
+ struct cli_credentials *creds =
+ get_cmdline_auth_info_creds(popt_get_cmdline_auth_info());
NTSTATUS status;
if (!next_token_talloc(ctx, &cmd_ptr,&buf,NULL)) {
return 1;
}
- status = cli_resolve_path(ctx, "", popt_get_cmdline_auth_info(),
+ status = cli_resolve_path(ctx, "",
+ creds,
cli, mask, &targetcli, &targetname);
if (!NT_STATUS_IS_OK(status)) {
d_printf("posix_rmdir %s: %s\n", mask, nt_errstr(status));
char *buf = NULL;
char *targetname = NULL;
struct cli_state *targetcli;
+ struct cli_credentials *creds =
+ get_cmdline_auth_info_creds(popt_get_cmdline_auth_info());
NTSTATUS status;
if (!next_token_talloc(ctx, &cmd_ptr,&buf,NULL)) {
return 1;
}
- status = cli_resolve_path(ctx, "", popt_get_cmdline_auth_info(),
+ status = cli_resolve_path(ctx, "",
+ creds,
cli, mask, &targetcli, &targetname);
if (!NT_STATUS_IS_OK(status)) {
d_printf("rmdir %s: %s\n", mask, nt_errstr(status));
char *buf2 = NULL;
char *targetname = NULL;
struct cli_state *targetcli;
+ struct cli_credentials *creds =
+ get_cmdline_auth_info_creds(popt_get_cmdline_auth_info());
NTSTATUS status;
if (!next_token_talloc(ctx, &cmd_ptr,&buf,NULL) ||
return 1;
}
- status = cli_resolve_path(ctx, "", popt_get_cmdline_auth_info(),
+ status = cli_resolve_path(ctx, "",
+ creds,
cli, oldname, &targetcli, &targetname);
if (!NT_STATUS_IS_OK(status)) {
d_printf("link %s: %s\n", oldname, nt_errstr(status));
char *targetname = NULL;
char *linkname = NULL;
struct cli_state *targetcli;
+ struct cli_credentials *creds =
+ get_cmdline_auth_info_creds(popt_get_cmdline_auth_info());
NTSTATUS status;
if (!next_token_talloc(ctx, &cmd_ptr,&buf,NULL)) {
return 1;
}
- status = cli_resolve_path(ctx, "", popt_get_cmdline_auth_info(),
+ status = cli_resolve_path(ctx, "",
+ creds,
cli, name, &targetcli, &targetname);
if (!NT_STATUS_IS_OK(status)) {
d_printf("readlink %s: %s\n", name, nt_errstr(status));
char *buf = NULL;
char *buf2 = NULL;
struct cli_state *newcli;
+ struct cli_credentials *creds =
+ get_cmdline_auth_info_creds(popt_get_cmdline_auth_info());
NTSTATUS status;
if (!next_token_talloc(ctx, &cmd_ptr,&buf,NULL) ||
}
/* New name must be present in share namespace. */
status = cli_resolve_path(ctx, "",
- popt_get_cmdline_auth_info(), cli, newname,
+ creds,
+ cli, newname,
&newcli, &newname);
if (!NT_STATUS_IS_OK(status)) {
d_printf("link %s: %s\n", newname,
char *targetname = NULL;
struct cli_state *targetcli;
mode_t mode;
+ struct cli_credentials *creds =
+ get_cmdline_auth_info_creds(popt_get_cmdline_auth_info());
NTSTATUS status;
if (!next_token_talloc(ctx, &cmd_ptr,&buf,NULL) ||
mode = (mode_t)strtol(buf, NULL, 8);
- status = cli_resolve_path(ctx, "", popt_get_cmdline_auth_info(),
+ status = cli_resolve_path(ctx, "",
+ creds,
cli, src, &targetcli, &targetname);
if (!NT_STATUS_IS_OK(status)) {
d_printf("chmod %s: %s\n", src, nt_errstr(status));
size_t num_dir_acls = 0;
size_t expected_buflen;
uint16_t i;
+ struct cli_credentials *creds =
+ get_cmdline_auth_info_creds(popt_get_cmdline_auth_info());
NTSTATUS status;
if (!next_token_talloc(ctx, &cmd_ptr,&name,NULL)) {
return 1;
}
- status = cli_resolve_path(ctx, "", popt_get_cmdline_auth_info(),
+ status = cli_resolve_path(ctx, "",
+ creds,
cli, src, &targetcli, &targetname);
if (!NT_STATUS_IS_OK(status)) {
d_printf("stat %s: %s\n", src, nt_errstr(status));
NTSTATUS status;
size_t i, num_eas;
struct ea_struct *eas;
+ struct cli_credentials *creds =
+ get_cmdline_auth_info_creds(popt_get_cmdline_auth_info());
if (!next_token_talloc(ctx, &cmd_ptr,&name,NULL)) {
d_printf("geteas filename\n");
return 1;
}
- status = cli_resolve_path(ctx, "", popt_get_cmdline_auth_info(),
+ status = cli_resolve_path(ctx, "",
+ creds,
cli, src, &targetcli, &targetname);
if (!NT_STATUS_IS_OK(status)) {
d_printf("stat %s: %s\n", src, nt_errstr(status));
char *eavalue = NULL;
char *targetname = NULL;
struct cli_state *targetcli;
+ struct cli_credentials *creds =
+ get_cmdline_auth_info_creds(popt_get_cmdline_auth_info());
NTSTATUS status;
if (!next_token_talloc(ctx, &cmd_ptr, &name, NULL)
return 1;
}
- status = cli_resolve_path(ctx, "", popt_get_cmdline_auth_info(),
+ status = cli_resolve_path(ctx, "",
+ creds,
cli, src, &targetcli, &targetname);
if (!NT_STATUS_IS_OK(status)) {
d_printf("stat %s: %s\n", src, nt_errstr(status));
SMB_STRUCT_STAT sbuf;
struct tm *lt;
time_t tmp_time;
+ struct cli_credentials *creds =
+ get_cmdline_auth_info_creds(popt_get_cmdline_auth_info());
NTSTATUS status;
if (!next_token_talloc(ctx, &cmd_ptr,&name,NULL)) {
return 1;
}
- status = cli_resolve_path(ctx, "", popt_get_cmdline_auth_info(),
+ status = cli_resolve_path(ctx, "",
+ creds,
cli, src, &targetcli, &targetname);
if (!NT_STATUS_IS_OK(status)) {
d_printf("stat %s: %s\n", src, nt_errstr(status));
char *buf, *buf2, *buf3;
struct cli_state *targetcli;
char *targetname = NULL;
+ struct cli_credentials *creds =
+ get_cmdline_auth_info_creds(popt_get_cmdline_auth_info());
NTSTATUS status;
if (!next_token_talloc(ctx, &cmd_ptr,&buf,NULL) ||
if (src == NULL) {
return 1;
}
- status = cli_resolve_path(ctx, "", popt_get_cmdline_auth_info(),
+ status = cli_resolve_path(ctx, "",
+ creds,
cli, src, &targetcli, &targetname);
if (!NT_STATUS_IS_OK(status)) {
d_printf("chown %s: %s\n", src, nt_errstr(status));
struct cli_state *targetcli;
char *targetsrc;
char *targetdest;
+ struct cli_credentials *creds =
+ get_cmdline_auth_info_creds(popt_get_cmdline_auth_info());
NTSTATUS status;
bool replace = false;
replace = true;
}
- status = cli_resolve_path(ctx, "", popt_get_cmdline_auth_info(),
+ status = cli_resolve_path(ctx, "",
+ creds,
cli, src, &targetcli, &targetsrc);
if (!NT_STATUS_IS_OK(status)) {
d_printf("rename %s: %s\n", src, nt_errstr(status));
return 1;
}
- status = cli_resolve_path(ctx, "", popt_get_cmdline_auth_info(),
+ status = cli_resolve_path(ctx, "",
+ creds,
cli, dest, &targetcli, &targetdest);
if (!NT_STATUS_IS_OK(status)) {
d_printf("rename %s: %s\n", dest, nt_errstr(status));
off_t written = 0;
struct scopy_timing st;
int rc = 0;
+ struct cli_credentials *creds =
+ get_cmdline_auth_info_creds(popt_get_cmdline_auth_info());
NTSTATUS status;
if (!next_token_talloc(ctx, &cmd_ptr,&buf,NULL) ||
return 1;
}
- status = cli_resolve_path(ctx, "", popt_get_cmdline_auth_info(),
+ status = cli_resolve_path(ctx, "",
+ creds,
cli, src, &targetcli, &targetsrc);
if (!NT_STATUS_IS_OK(status)) {
d_printf("scopy %s: %s\n", src, nt_errstr(status));
return 1;
}
- status = cli_resolve_path(ctx, "", popt_get_cmdline_auth_info(),
+ status = cli_resolve_path(ctx, "",
+ creds,
cli, dest, &targetcli, &targetdest);
if (!NT_STATUS_IS_OK(status)) {
d_printf("scopy %s: %s\n", dest, nt_errstr(status));
char *buf, *buf2;
struct cli_state *targetcli;
char *targetname;
+ struct cli_credentials *creds =
+ get_cmdline_auth_info_creds(popt_get_cmdline_auth_info());
NTSTATUS status;
if (!next_token_talloc(ctx, &cmd_ptr,&buf,NULL) ||
return 1;
}
- status = cli_resolve_path(ctx, "", popt_get_cmdline_auth_info(),
+ status = cli_resolve_path(ctx, "",
+ creds,
cli, src, &targetcli, &targetname);
if (!NT_STATUS_IS_OK(status)) {
d_printf("hardlink %s: %s\n", src, nt_errstr(status));
TALLOC_CTX *ctx = talloc_tos();
struct cli_state *targetcli;
char *targetpath;
+ struct cli_credentials *creds =
+ get_cmdline_auth_info_creds(popt_get_cmdline_auth_info());
NTSTATUS status;
- status = cli_resolve_path(ctx, "", popt_get_cmdline_auth_info(), cli,
+ status = cli_resolve_path(ctx, "",
+ creds,
+ cli,
client_get_cur_dir(), &targetcli,
&targetpath);
if (!NT_STATUS_IS_OK(status)) {
struct cli_state *targetcli = NULL;
int i;
struct completion_remote info = { NULL, NULL, 1, 0, NULL, 0 };
+ struct cli_credentials *creds =
+ get_cmdline_auth_info_creds(popt_get_cmdline_auth_info());
NTSTATUS status;
/* can't have non-static initialisation on Sun CC, so do it
goto cleanup;
}
- status = cli_resolve_path(ctx, "", popt_get_cmdline_auth_info(),
+ status = cli_resolve_path(ctx, "",
+ creds,
cli, dirmask, &targetcli, &targetpath);
if (!NT_STATUS_IS_OK(status)) {
goto cleanup;
*/
char *targetpath;
struct cli_state *targetcli;
+ struct cli_credentials *creds = NULL;
NTSTATUS status;
/* We connect to the server and list the directory */
return NULL;
}
+ creds = get_cmdline_auth_info_creds(
+ context->internal->auth_info);
+
status = cli_resolve_path(
- frame, "", context->internal->auth_info,
+ frame, "",
+ creds,
srv->cli, path, &targetcli, &targetpath);
if (!NT_STATUS_IS_OK(status)) {
d_printf("Could not resolve %s\n", path);
char *targetpath = NULL;
uint16_t port = 0;
struct cli_state *targetcli = NULL;
+ struct cli_credentials *creds = NULL;
TALLOC_CTX *frame = talloc_stackframe();
NTSTATUS status;
}
+ creds = get_cmdline_auth_info_creds(context->internal->auth_info);
+
/*d_printf(">>>mkdir: resolving %s\n", path);*/
- status = cli_resolve_path(frame, "", context->internal->auth_info,
+ status = cli_resolve_path(frame, "",
+ creds,
srv->cli, path, &targetcli, &targetpath);
if (!NT_STATUS_IS_OK(status)) {
d_printf("Could not resolve %s\n", path);
char *targetpath = NULL;
uint16_t port = 0;
struct cli_state *targetcli = NULL;
+ struct cli_credentials *creds = NULL;
TALLOC_CTX *frame = talloc_stackframe();
NTSTATUS status;
}
+ creds = get_cmdline_auth_info_creds(context->internal->auth_info),
+
/*d_printf(">>>rmdir: resolving %s\n", path);*/
- status = cli_resolve_path(frame, "", context->internal->auth_info,
+ status = cli_resolve_path(frame, "",
+ creds,
srv->cli, path, &targetcli, &targetpath);
if (!NT_STATUS_IS_OK(status)) {
d_printf("Could not resolve %s\n", path);
char *path = NULL;
uint32_t attr;
uint16_t port = 0;
+ struct cli_credentials *creds = NULL;
TALLOC_CTX *frame = talloc_stackframe();
NTSTATUS status;
return -1; /* errno set by SMBC_server */
}
+ creds = get_cmdline_auth_info_creds(context->internal->auth_info);
+
/*d_printf(">>>unlink: resolving %s\n", path);*/
- status = cli_resolve_path(frame, "", context->internal->auth_info,
+ status = cli_resolve_path(frame, "",
+ creds,
srv->cli, path, &targetcli, &targetpath);
if (!NT_STATUS_IS_OK(status)) {
d_printf("Could not resolve %s\n", path);
uint16_t port = 0;
struct cli_state *targetcli = NULL;
SMBCSRV *srv = NULL;
+ struct cli_credentials *creds = NULL;
TALLOC_CTX *frame = talloc_stackframe();
NTSTATUS status;
}
+ creds = get_cmdline_auth_info_creds(context->internal->auth_info);
+
/*d_printf(">>>unlink: resolving %s\n", path);*/
- status = cli_resolve_path(frame, "", context->internal->auth_info,
+ status = cli_resolve_path(frame, "",
+ creds,
srv->cli, path, &targetcli, &targetpath);
if (!NT_STATUS_IS_OK(status)) {
d_printf("Could not resolve %s\n", path);
SMBCSRV *srv = NULL;
uint16_t port1 = 0;
uint16_t port2 = 0;
+ struct cli_credentials *ocreds = NULL;
+ struct cli_credentials *ncreds = NULL;
TALLOC_CTX *frame = talloc_stackframe();
NTSTATUS status;
password1);
/*d_printf(">>>rename: resolving %s\n", path1);*/
- status = cli_resolve_path(frame, "", ocontext->internal->auth_info,
+ ocreds = get_cmdline_auth_info_creds(ocontext->internal->auth_info);
+
+ status = cli_resolve_path(frame, "",
+ ocreds,
srv->cli, path1, &targetcli1, &targetpath1);
if (!NT_STATUS_IS_OK(status)) {
d_printf("Could not resolve %s\n", path1);
/*d_printf(">>>rename: resolved path as %s\n", targetpath1);*/
/*d_printf(">>>rename: resolving %s\n", path2);*/
- status = cli_resolve_path(frame, "", ncontext->internal->auth_info,
+ ncreds = get_cmdline_auth_info_creds(ncontext->internal->auth_info);
+
+ status = cli_resolve_path(frame, "",
+ ncreds,
srv->cli, path2, &targetcli2, &targetpath2);
if (!NT_STATUS_IS_OK(status)) {
d_printf("Could not resolve %s\n", path2);