[SCM] Samba Shared Repository - branch master updated
Jeremy Allison
jra at samba.org
Fri Oct 9 20:37:02 UTC 2020
The branch, master has been updated
via 925cc9aafbe s3:lib: Move interface prototypes to own header file
via d4d8218b961 s3:include: Move loadparm prototypes to own header file
via 50b59b4c28b s3:libsmb: Remove max_protocol from clidfs do_connect()
via 2159582610e s3:libcmb: Remove max_protocol from cli_cm_connect()
via 4aac9daf095 s3:libsmb: Remove max_protocol from cli_cm_open()
via d07f28645f3 s3:client: Remove global max_protocol
via 5245ab3c4da s3:libsmb: Pass cli_credentials to cli_resolve_path(), using helper variables.
via df1623abd72 s3:libsmb: Pass cli_credentials to cli_cm_open()
via c8349111243 s3:libsmb: Pass cli_credentials to cli_cm_connect()
via 276563de06f s3:libsmb: Pass cli_credentials to clidfs do_connect()
via 4ddec1ca257 s3:libsmb: Remove force_encrypt from cli_check_msdfs_proxy()
via 615a9a68166 s3:libsmb: Remove force_encrypt from clidfs do_connect()
via d27e237cf37 s3:libsmb: Remove force_encrypt from cli_cm_connect()
via a9fbc8dae87 s3:libsmb: Remove force_encrypt from cli_cm_open()
via 1189b20cb7e s3:client: Remove global smb_encrypt
via e7577ab6cbc s3:tests: Add smbclient tests for 'client smb encrypt'
via 1b67943f938 selftest: Move enc_desired to provision to have it in 'fileserver' too
via c75e8ff47b4 selftest: Rename 'smb encrypt' to 'server smb encrypt'
from 8fbda54e4d0 nt_printing_ads: support more attributes for AD published printers
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 925cc9aafbe17cb2cbd89f468fac70f96ae89475
Author: Andreas Schneider <asn at samba.org>
Date: Tue Aug 11 10:41:07 2020 +0200
s3:lib: Move interface prototypes to own header file
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
Autobuild-User(master): Jeremy Allison <jra at samba.org>
Autobuild-Date(master): Fri Oct 9 20:36:13 UTC 2020 on sn-devel-184
commit d4d8218b9618dd289f54b41f13d7015f1b3994fd
Author: Andreas Schneider <asn at samba.org>
Date: Mon Aug 10 15:47:35 2020 +0200
s3:include: Move loadparm prototypes to own header file
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 50b59b4c28bc816094a4ca97f64450860e2495b2
Author: Andreas Schneider <asn at samba.org>
Date: Thu Aug 27 16:46:29 2020 +0200
s3:libsmb: Remove max_protocol from clidfs do_connect()
The if check for max_protocol == 0 is part of lp_client_max_protocol().
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 2159582610ecc932047b85a77ec321b3d3ac806f
Author: Andreas Schneider <asn at samba.org>
Date: Thu Aug 27 16:45:12 2020 +0200
s3:libcmb: Remove max_protocol from cli_cm_connect()
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 4aac9daf095e7c2de6a27697a13385ee87a4b634
Author: Andreas Schneider <asn at samba.org>
Date: Thu Aug 27 16:43:46 2020 +0200
s3:libsmb: Remove max_protocol from cli_cm_open()
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit d07f28645f37c1f976017d5b89864791a18d1943
Author: Andreas Schneider <asn at samba.org>
Date: Thu Aug 27 16:40:49 2020 +0200
s3:client: Remove global max_protocol
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 5245ab3c4dacc88d5cbe3bb1e3e339e4fb77a4db
Author: Andreas Schneider <asn at samba.org>
Date: Tue Aug 18 17:42:25 2020 +0200
s3:libsmb: Pass cli_credentials to cli_resolve_path(), using helper variables.
Signed-off-by: Andreas Schneider <asn at samba.org>
Signed-off-by: Jeremy Allison <jra at samba.org>
commit df1623abd7267916696e2e60c146ef8fa6c9dfc9
Author: Andreas Schneider <asn at samba.org>
Date: Tue Aug 18 17:26:54 2020 +0200
s3:libsmb: Pass cli_credentials to cli_cm_open()
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit c8349111243fec81a2b95484e56a6d6bebaba80e
Author: Andreas Schneider <asn at samba.org>
Date: Tue Aug 18 17:18:16 2020 +0200
s3:libsmb: Pass cli_credentials to cli_cm_connect()
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 276563de06f2071ec2ed9a8b73f92215ab621bba
Author: Andreas Schneider <asn at samba.org>
Date: Tue Aug 18 17:15:09 2020 +0200
s3:libsmb: Pass cli_credentials to clidfs do_connect()
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 4ddec1ca257fff418847c5d1e83a3fb7cb5ade1a
Author: Andreas Schneider <asn at samba.org>
Date: Thu Aug 27 15:52:11 2020 +0200
s3:libsmb: Remove force_encrypt from cli_check_msdfs_proxy()
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 615a9a68166bdeb0ab7dbacf395c6125ec70f288
Author: Andreas Schneider <asn at samba.org>
Date: Thu Aug 27 15:28:28 2020 +0200
s3:libsmb: Remove force_encrypt from clidfs do_connect()
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit d27e237cf37fb254646d94827935d9c302c379ff
Author: Andreas Schneider <asn at samba.org>
Date: Thu Aug 27 15:26:39 2020 +0200
s3:libsmb: Remove force_encrypt from cli_cm_connect()
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit a9fbc8dae878ddfa54153e91cc1128c307816b76
Author: Andreas Schneider <asn at samba.org>
Date: Thu Aug 27 15:24:27 2020 +0200
s3:libsmb: Remove force_encrypt from cli_cm_open()
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 1189b20cb7ea09cfed5c246cf977442a51ef72cb
Author: Andreas Schneider <asn at samba.org>
Date: Thu Aug 27 15:19:27 2020 +0200
s3:client: Remove global smb_encrypt
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit e7577ab6cbc83b496ac091c3e425c7c7fea29cdb
Author: Andreas Schneider <asn at samba.org>
Date: Tue Sep 8 10:15:20 2020 +0200
s3:tests: Add smbclient tests for 'client smb encrypt'
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit 1b67943f938ae774360dc3db73db940f9982243b
Author: Andreas Schneider <asn at samba.org>
Date: Tue Sep 8 12:30:08 2020 +0200
selftest: Move enc_desired to provision to have it in 'fileserver' too
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
commit c75e8ff47b4d79b37240f9461ddae10a4f03c892
Author: Andreas Schneider <asn at samba.org>
Date: Tue Sep 8 10:15:22 2020 +0200
selftest: Rename 'smb encrypt' to 'server smb encrypt'
This makes it more clear what we want. 'smb encrypt' is a synonym for
'server smb encrypt'.
Signed-off-by: Andreas Schneider <asn at samba.org>
Reviewed-by: Jeremy Allison <jra at samba.org>
-----------------------------------------------------------------------
Summary of changes:
selftest/target/Samba3.pm | 20 ++-
source3/client/client.c | 195 +++++++++++++++------
source3/include/includes.h | 3 +
source3/include/proto.h | 189 +-------------------
source3/lib/interface.h | 46 +++++
source3/lib/netapi/cm.c | 6 +-
source3/libsmb/clidfs.c | 99 ++++++-----
source3/libsmb/libsmb_dir.c | 43 ++++-
source3/libsmb/libsmb_file.c | 13 +-
source3/libsmb/libsmb_server.c | 4 -
source3/libsmb/libsmb_stat.c | 6 +-
source3/libsmb/libsmb_xattr.c | 13 +-
source3/libsmb/proto.h | 21 +--
source3/param/loadparm.h | 200 ++++++++++++++++++++++
source3/script/tests/test_smbclient_encryption.sh | 72 ++++++++
source3/selftest/tests.py | 6 +
source3/utils/smbcacls.c | 15 +-
17 files changed, 613 insertions(+), 338 deletions(-)
create mode 100644 source3/lib/interface.h
create mode 100644 source3/param/loadparm.h
create mode 100755 source3/script/tests/test_smbclient_encryption.sh
Changeset truncated at 500 lines:
diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm
index f4fe6c473b3..72d7642fcb7 100755
--- a/selftest/target/Samba3.pm
+++ b/selftest/target/Samba3.pm
@@ -1180,7 +1180,7 @@ sub setup_simpleserver
ntlm auth = yes
vfs objects = xattr_tdb streams_depot
change notify = no
- smb encrypt = off
+ server smb encrypt = off
[vfs_aio_pthread]
path = $prefix_abs/share
@@ -1244,11 +1244,6 @@ sub setup_simpleserver
hide files = /hidefile/
hide dot files = yes
-[enc_desired]
- path = $prefix_abs/share
- vfs objects =
- smb encrypt = desired
-
[hidenewfiles]
path = $prefix_abs/share
hide new files timeout = 5
@@ -2353,7 +2348,7 @@ sub provision($$)
[tmpenc]
path = $shrdir
comment = encrypt smb username is [%U]
- smb encrypt = required
+ server smb encrypt = required
vfs objects = dirsort
[tmpguest]
path = $shrdir
@@ -2835,7 +2830,18 @@ sub provision($$)
[delete_readonly]
path = $prefix_abs/share
delete readonly = yes
+
+[enc_desired]
+ path = $prefix_abs/share
+ vfs objects =
+ server smb encrypt = desired
+
+[enc_off]
+ path = $prefix_abs/share
+ vfs objects =
+ server smb encrypt = off
";
+
close(CONF);
my $net = Samba::bindir_path($self, "net");
diff --git a/source3/client/client.c b/source3/client/client.c
index d6d5585f305..392b23f06ea 100644
--- a/source3/client/client.c
+++ b/source3/client/client.c
@@ -60,7 +60,6 @@ static int io_bufsize = 0; /* we use the default size */
static int io_timeout = (CLIENT_TIMEOUT/1000); /* Per operation timeout (in seconds). */
static int name_type = 0x20;
-static int max_protocol = -1;
static int process_tok(char *tok);
static int cmd_help(void);
@@ -95,9 +94,6 @@ static unsigned int put_total_time_ms = 0;
/* totals globals */
static double dir_total;
-/* encrypted state. */
-static bool smb_encrypt;
-
/* root cli_state connection */
struct cli_state *cli;
@@ -300,9 +296,14 @@ static int do_dskattr(void)
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)) {
@@ -392,6 +393,8 @@ static int do_cd(const char *new_dir)
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);
@@ -434,7 +437,8 @@ static int do_cd(const char *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));
@@ -811,6 +815,8 @@ NTSTATUS do_list(const char *mask,
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;
@@ -834,7 +840,7 @@ NTSTATUS do_list(const char *mask,
/* 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,
@@ -1044,6 +1050,8 @@ static int do_get(const char *rname, const char *lname_in, bool reget)
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);
@@ -1058,7 +1066,8 @@ static int do_get(const char *rname, const char *lname_in, bool reget)
}
}
- 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));
@@ -1415,9 +1424,12 @@ static bool do_mkdir(const char *name)
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));
@@ -1476,6 +1488,8 @@ static int cmd_mkdir(void)
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());
@@ -1512,7 +1526,8 @@ static int cmd_mkdir(void)
}
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;
@@ -1826,9 +1841,12 @@ static int do_put(const char *rname, const char *lname, bool reput)
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));
@@ -2603,6 +2621,8 @@ static int cmd_wdel(void)
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)) {
@@ -2628,7 +2648,8 @@ static int cmd_wdel(void)
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));
@@ -2654,6 +2675,8 @@ static int cmd_open(void)
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)) {
@@ -2673,7 +2696,8 @@ static int cmd_open(void)
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));
@@ -2757,7 +2781,7 @@ static int cmd_posix_encrypt(void)
d_printf("posix_encrypt failed with error %s\n", nt_errstr(status));
} else {
d_printf("encryption on\n");
- smb_encrypt = true;
+ set_cmdline_auth_info_smb_encrypt(popt_get_cmdline_auth_info());
}
return 0;
@@ -2775,6 +2799,8 @@ static int cmd_posix_open(void)
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)) {
@@ -2799,7 +2825,8 @@ static int cmd_posix_open(void)
}
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));
@@ -2834,6 +2861,8 @@ static int cmd_posix_mkdir(void)
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)) {
@@ -2858,7 +2887,8 @@ static int cmd_posix_mkdir(void)
}
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));
@@ -2882,6 +2912,8 @@ static int cmd_posix_unlink(void)
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)) {
@@ -2900,7 +2932,8 @@ static int cmd_posix_unlink(void)
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));
@@ -2925,6 +2958,8 @@ static int cmd_posix_rmdir(void)
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)) {
@@ -2943,7 +2978,8 @@ static int cmd_posix_rmdir(void)
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));
@@ -3232,6 +3268,8 @@ static int cmd_rmdir(void)
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)) {
@@ -3250,7 +3288,8 @@ static int cmd_rmdir(void)
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));
@@ -3279,6 +3318,8 @@ static int cmd_link(void)
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) ||
@@ -3309,7 +3350,8 @@ static int cmd_link(void)
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));
@@ -3342,6 +3384,8 @@ static int cmd_readlink(void)
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)) {
@@ -3360,7 +3404,8 @@ static int cmd_readlink(void)
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));
@@ -3399,6 +3444,8 @@ static int cmd_symlink(void)
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) ||
@@ -3421,7 +3468,8 @@ static int cmd_symlink(void)
}
/* 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,
@@ -3457,6 +3505,8 @@ static int cmd_chmod(void)
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) ||
@@ -3478,7 +3528,8 @@ static int cmd_chmod(void)
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));
@@ -3622,6 +3673,8 @@ static int cmd_getfacl(void)
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)) {
@@ -3640,7 +3693,8 @@ static int cmd_getfacl(void)
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));
@@ -3805,6 +3859,8 @@ static int cmd_geteas(void)
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");
@@ -3822,7 +3878,8 @@ static int cmd_geteas(void)
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));
@@ -3861,6 +3918,8 @@ static int cmd_setea(void)
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)
@@ -3883,7 +3942,8 @@ static int cmd_setea(void)
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));
@@ -3915,6 +3975,8 @@ static int cmd_stat(void)
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)) {
@@ -3933,7 +3995,8 @@ static int cmd_stat(void)
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));
@@ -4022,6 +4085,8 @@ static int cmd_chown(void)
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) ||
@@ -4045,7 +4110,8 @@ static int cmd_chown(void)
if (src == NULL) {
return 1;
--
Samba Shared Repository
More information about the samba-cvs
mailing list