mirror of
https://github.com/samba-team/samba.git
synced 2024-12-23 17:34:34 +03:00
s3:libsmb: Remove signing_state from cli_full_connection_creds()
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
parent
886f245ace
commit
ba04151a01
@ -37,8 +37,7 @@ static struct cli_state *connect_one(const struct user_auth_info *auth_info,
|
||||
NULL, port,
|
||||
share, "?????",
|
||||
get_cmdline_auth_info_creds(auth_info),
|
||||
flags,
|
||||
get_cmdline_auth_info_signing_state(auth_info));
|
||||
flags);
|
||||
if (!NT_STATUS_IS_OK(nt_status)) {
|
||||
DBG_ERR("cli_full_connection failed! (%s)\n",
|
||||
nt_errstr(nt_status));
|
||||
|
@ -360,7 +360,6 @@ static NTSTATUS winexe_svc_upload(
|
||||
"ADMIN$",
|
||||
"?????",
|
||||
credentials,
|
||||
0,
|
||||
0);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
DBG_WARNING("cli_full_connection_creds failed: %s\n",
|
||||
@ -1919,8 +1918,7 @@ int main(int argc, const char *argv[])
|
||||
"IPC$",
|
||||
"?????",
|
||||
options.credentials,
|
||||
CLI_FULL_CONNECTION_IPC,
|
||||
0);
|
||||
CLI_FULL_CONNECTION_IPC);
|
||||
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
DBG_WARNING("cli_full_connection_creds failed: %s\n",
|
||||
|
@ -1095,8 +1095,7 @@ static NTSTATUS libnet_join_connect_dc_ipc(const char *dc,
|
||||
NULL, 0,
|
||||
"IPC$", "IPC",
|
||||
creds,
|
||||
flags,
|
||||
SMB_SIGNING_IPC_DEFAULT);
|
||||
flags);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
TALLOC_FREE(frame);
|
||||
return status;
|
||||
@ -1716,8 +1715,7 @@ NTSTATUS libnet_join_ok(struct messaging_context *msg_ctx,
|
||||
NULL, 0,
|
||||
"IPC$", "IPC",
|
||||
cli_creds,
|
||||
flags,
|
||||
SMB_SIGNING_IPC_DEFAULT);
|
||||
flags);
|
||||
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
struct cli_credentials *anon_creds = NULL;
|
||||
@ -1734,8 +1732,7 @@ NTSTATUS libnet_join_ok(struct messaging_context *msg_ctx,
|
||||
NULL, 0,
|
||||
"IPC$", "IPC",
|
||||
anon_creds,
|
||||
flags,
|
||||
SMB_SIGNING_OFF);
|
||||
flags);
|
||||
}
|
||||
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
|
@ -3526,8 +3526,7 @@ NTSTATUS cli_full_connection_creds(struct cli_state **output_cli,
|
||||
const struct sockaddr_storage *dest_ss, int port,
|
||||
const char *service, const char *service_type,
|
||||
struct cli_credentials *creds,
|
||||
int flags,
|
||||
enum smb_signing_setting signing_state)
|
||||
int flags)
|
||||
{
|
||||
struct tevent_context *ev;
|
||||
struct tevent_req *req;
|
||||
@ -3684,8 +3683,7 @@ struct cli_state *get_ipc_connect(char *server,
|
||||
|
||||
nt_status = cli_full_connection_creds(&cli, NULL, server, server_ss, 0, "IPC$", "IPC",
|
||||
get_cmdline_auth_info_creds(user_info),
|
||||
flags,
|
||||
SMB_SIGNING_DEFAULT);
|
||||
flags);
|
||||
|
||||
if (NT_STATUS_IS_OK(nt_status)) {
|
||||
return cli;
|
||||
|
@ -785,7 +785,6 @@ SMBC_attr_server(TALLOC_CTX *ctx,
|
||||
pp_workgroup, pp_username, pp_password);
|
||||
if (!ipc_srv) {
|
||||
struct cli_credentials *creds = NULL;
|
||||
int signing_state = SMB_SIGNING_DEFAULT;
|
||||
|
||||
/* We didn't find a cached connection. Get the password */
|
||||
if (!*pp_password || (*pp_password)[0] == '\0') {
|
||||
@ -812,16 +811,11 @@ SMBC_attr_server(TALLOC_CTX *ctx,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if (context->internal->smb_encryption_level != SMBC_ENCRYPTLEVEL_NONE) {
|
||||
signing_state = SMB_SIGNING_REQUIRED;
|
||||
}
|
||||
|
||||
nt_status = cli_full_connection_creds(&ipc_cli,
|
||||
lp_netbios_name(), server,
|
||||
NULL, 0, "IPC$", "?????",
|
||||
creds,
|
||||
flags,
|
||||
signing_state);
|
||||
flags);
|
||||
if (! NT_STATUS_IS_OK(nt_status)) {
|
||||
TALLOC_FREE(creds);
|
||||
DEBUG(1,("cli_full_connection failed! (%s)\n",
|
||||
|
@ -109,8 +109,7 @@ NTSTATUS cli_full_connection_creds(struct cli_state **output_cli,
|
||||
const struct sockaddr_storage *dest_ss, int port,
|
||||
const char *service, const char *service_type,
|
||||
struct cli_credentials *creds,
|
||||
int flags,
|
||||
enum smb_signing_setting signing_state);
|
||||
int flags);
|
||||
NTSTATUS cli_raw_tcon(struct cli_state *cli,
|
||||
const char *service, const char *pass, const char *dev,
|
||||
uint16_t *max_xmit, uint16_t *tid);
|
||||
|
@ -2482,8 +2482,7 @@ static bool spoolss_connect_to_client(struct rpc_pipe_client **pp_pipe, struct c
|
||||
ret = cli_full_connection_creds( pp_cli, lp_netbios_name(), remote_machine,
|
||||
&rm_addr, 0, "IPC$", "IPC",
|
||||
anon_creds,
|
||||
CLI_FULL_CONNECTION_IPC,
|
||||
SMB_SIGNING_OFF);
|
||||
CLI_FULL_CONNECTION_IPC);
|
||||
TALLOC_FREE(anon_creds);
|
||||
if ( !NT_STATUS_IS_OK( ret ) ) {
|
||||
DEBUG(2,("spoolss_connect_to_client: connection to [%s] failed!\n",
|
||||
|
@ -3538,10 +3538,7 @@ static WERROR cmd_spoolss_printercmp(struct rpc_pipe_client *cli,
|
||||
"IPC$", "IPC",
|
||||
get_cmdline_auth_info_creds(
|
||||
popt_get_cmdline_auth_info()),
|
||||
CLI_FULL_CONNECTION_IPC,
|
||||
get_cmdline_auth_info_signing_state(
|
||||
popt_get_cmdline_auth_info()));
|
||||
|
||||
CLI_FULL_CONNECTION_IPC);
|
||||
if ( !NT_STATUS_IS_OK(nt_status) )
|
||||
return WERR_GEN_FAILURE;
|
||||
|
||||
|
@ -1206,8 +1206,7 @@ out_free:
|
||||
"IPC$", "IPC",
|
||||
get_cmdline_auth_info_creds(
|
||||
popt_get_cmdline_auth_info()),
|
||||
flags,
|
||||
SMB_SIGNING_IPC_DEFAULT);
|
||||
flags);
|
||||
|
||||
if (!NT_STATUS_IS_OK(nt_status)) {
|
||||
DEBUG(0,("Cannot connect to server. Error was %s\n", nt_errstr(nt_status)));
|
||||
|
@ -217,8 +217,15 @@ static struct cli_state *connect_one(char *share)
|
||||
|
||||
slprintf(myname,sizeof(myname), "lock-%lu-%u", (unsigned long)getpid(), count++);
|
||||
|
||||
nt_status = cli_full_connection_creds(&c, myname, server_n, NULL, 0, share, "?????",
|
||||
creds, 0, SMB_SIGNING_DEFAULT);
|
||||
nt_status = cli_full_connection_creds(&c,
|
||||
myname,
|
||||
server_n,
|
||||
NULL,
|
||||
0,
|
||||
share,
|
||||
"?????",
|
||||
creds,
|
||||
0);
|
||||
TALLOC_FREE(creds);
|
||||
if (!NT_STATUS_IS_OK(nt_status)) {
|
||||
DEBUG(0, ("cli_full_connection failed with error %s\n", nt_errstr(nt_status)));
|
||||
|
@ -345,8 +345,7 @@ static bool torture_open_connection_share(struct cli_state **c,
|
||||
sharename,
|
||||
"?????",
|
||||
torture_creds,
|
||||
flags,
|
||||
signing_state);
|
||||
flags);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
printf("failed to open share connection: //%s/%s port:%d - %s\n",
|
||||
hostname, sharename, port_to_use, nt_errstr(status));
|
||||
@ -1523,8 +1522,7 @@ static bool run_tcon_devtype_test(int dummy)
|
||||
NULL, /* service */
|
||||
NULL, /* service_type */
|
||||
torture_creds,
|
||||
flags,
|
||||
signing_state);
|
||||
flags);
|
||||
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
printf("could not open connection\n");
|
||||
|
@ -153,8 +153,7 @@ int main(int argc, char **argv)
|
||||
"IPC$",
|
||||
"IPC",
|
||||
creds,
|
||||
flags,
|
||||
SMB_SIGNING_IPC_DEFAULT);
|
||||
flags);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
DBG_ERR("Cannot connect to server: %s\n", nt_errstr(status));
|
||||
goto fail;
|
||||
|
@ -2520,8 +2520,7 @@ static int net_ads_printer_publish(struct net_context *c, int argc, const char *
|
||||
&server_ss, 0,
|
||||
"IPC$", "IPC",
|
||||
creds,
|
||||
CLI_FULL_CONNECTION_IPC,
|
||||
SMB_SIGNING_IPC_DEFAULT);
|
||||
CLI_FULL_CONNECTION_IPC);
|
||||
|
||||
if (NT_STATUS_IS_ERR(nt_status)) {
|
||||
d_fprintf(stderr, _("Unable to open a connection to %s to "
|
||||
|
@ -108,7 +108,6 @@ NTSTATUS connect_to_service(struct net_context *c,
|
||||
const char *service_type)
|
||||
{
|
||||
NTSTATUS nt_status;
|
||||
enum smb_signing_setting signing_setting = SMB_SIGNING_DEFAULT;
|
||||
struct cli_credentials *creds = NULL;
|
||||
int flags = 0;
|
||||
|
||||
@ -119,7 +118,6 @@ NTSTATUS connect_to_service(struct net_context *c,
|
||||
}
|
||||
|
||||
if (strequal(service_type, "IPC")) {
|
||||
signing_setting = SMB_SIGNING_IPC_DEFAULT;
|
||||
flags |= CLI_FULL_CONNECTION_IPC;
|
||||
}
|
||||
|
||||
@ -127,8 +125,7 @@ NTSTATUS connect_to_service(struct net_context *c,
|
||||
server_ss, c->opt_port,
|
||||
service_name, service_type,
|
||||
creds,
|
||||
flags,
|
||||
signing_setting);
|
||||
flags);
|
||||
if (!NT_STATUS_IS_OK(nt_status)) {
|
||||
d_fprintf(stderr, _("Could not connect to server %s\n"),
|
||||
server_name);
|
||||
@ -199,8 +196,7 @@ NTSTATUS connect_to_ipc_anonymous(struct net_context *c,
|
||||
server_name, server_ss, c->opt_port,
|
||||
"IPC$", "IPC",
|
||||
anon_creds,
|
||||
CLI_FULL_CONNECTION_IPC,
|
||||
SMB_SIGNING_OFF);
|
||||
CLI_FULL_CONNECTION_IPC);
|
||||
|
||||
if (NT_STATUS_IS_OK(nt_status)) {
|
||||
return nt_status;
|
||||
|
@ -99,8 +99,7 @@ static struct con_struct *create_cs(struct net_context *c,
|
||||
&loopback_ss, 0,
|
||||
"IPC$", "IPC",
|
||||
anon_creds,
|
||||
CLI_FULL_CONNECTION_IPC,
|
||||
SMB_SIGNING_OFF);
|
||||
CLI_FULL_CONNECTION_IPC);
|
||||
|
||||
if (!NT_STATUS_IS_OK(nt_status)) {
|
||||
DEBUG(2,("create_cs: Connect failed. Error was %s\n", nt_errstr(nt_status)));
|
||||
|
@ -778,8 +778,7 @@ static struct cli_state *connect_one(const struct user_auth_info *auth_info,
|
||||
NULL, 0,
|
||||
share, "?????",
|
||||
get_cmdline_auth_info_creds(auth_info),
|
||||
flags,
|
||||
get_cmdline_auth_info_signing_state(auth_info));
|
||||
flags);
|
||||
if (!NT_STATUS_IS_OK(nt_status)) {
|
||||
DEBUG(0,("cli_full_connection failed! (%s)\n", nt_errstr(nt_status)));
|
||||
return NULL;
|
||||
|
@ -527,9 +527,7 @@ static struct cli_state *connect_one(const char *share)
|
||||
share, "?????",
|
||||
get_cmdline_auth_info_creds(
|
||||
popt_get_cmdline_auth_info()),
|
||||
flags,
|
||||
get_cmdline_auth_info_signing_state(
|
||||
popt_get_cmdline_auth_info()));
|
||||
flags);
|
||||
if (!NT_STATUS_IS_OK(nt_status)) {
|
||||
DEBUG(0,("cli_full_connection failed! (%s)\n", nt_errstr(nt_status)));
|
||||
return NULL;
|
||||
|
Loading…
Reference in New Issue
Block a user