diff options
author | Andreas Schneider <asn@samba.org> | 2020-06-10 12:31:02 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2020-08-19 16:22:42 +0000 |
commit | 1acc6408be11bf1a161750bb510170dae3448849 (patch) | |
tree | d2aeef7cf6d57d3ca619ff638c732c5af4ab6761 /source3 | |
parent | 5bff7a061f695d7a9a90414d4393833345a193bf (diff) | |
download | samba-1acc6408be11bf1a161750bb510170dae3448849.tar.gz |
s3:net: Use cli_credentials_set_smb_encryption()
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source3')
-rw-r--r-- | source3/utils/net_util.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/source3/utils/net_util.c b/source3/utils/net_util.c index b139fb2d0da..5829d891075 100644 --- a/source3/utils/net_util.c +++ b/source3/utils/net_util.c @@ -148,16 +148,6 @@ NTSTATUS connect_to_service(struct net_context *c, return nt_status; } - if (c->smb_encrypt) { - nt_status = cli_cm_force_encryption_creds(*cli_ctx, - creds, - service_name); - if (!NT_STATUS_IS_OK(nt_status)) { - cli_shutdown(*cli_ctx); - *cli_ctx = NULL; - } - } - return nt_status; } @@ -577,6 +567,12 @@ struct cli_credentials *net_context_creds(struct net_context *c, CRED_SPECIFIED); } + if (c->smb_encrypt) { + cli_credentials_set_smb_encryption(creds, + SMB_ENCRYPTION_REQUIRED, + CRED_SPECIFIED); + } + return creds; } |