[SCM] Samba Shared Repository - branch v4-12-test updated
Karolin Seeger
kseeger at samba.org
Tue Feb 18 09:28:02 UTC 2020
The branch, v4-12-test has been updated
via 46ff9e1bca8 auth: Fix CID 1458418 Null pointer dereferences (REVERSE_INULL)
via 1e61aa6d46f auth: Fix CID 1458420 Null pointer dereferences (REVERSE_INULL)
via 3e222ac6b93 ctdb-tcp: Make error handling for outbound connection consistent
from b1fba6c7a06 winbindd: handling missing idmap in getgrgid()
https://git.samba.org/?p=samba.git;a=shortlog;h=v4-12-test
- Log -----------------------------------------------------------------
commit 46ff9e1bca8645deb3b9b5d9630358b0cee8f607
Author: Volker Lendecke <vl at samba.org>
Date: Wed Feb 12 15:40:32 2020 +0100
auth: Fix CID 1458418 Null pointer dereferences (REVERSE_INULL)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14247
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Stefan Metzmacher <metze at samba.org>
(cherry picked from commit ef0350221e194a3dd3350eab02b38baeb32d8fd3)
Autobuild-User(v4-12-test): Karolin Seeger <kseeger at samba.org>
Autobuild-Date(v4-12-test): Tue Feb 18 09:27:36 UTC 2020 on sn-devel-184
commit 1e61aa6d46f1bc37e5ec8f1f8499e5078c316bc4
Author: Volker Lendecke <vl at samba.org>
Date: Wed Feb 12 15:39:54 2020 +0100
auth: Fix CID 1458420 Null pointer dereferences (REVERSE_INULL)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14247
Signed-off-by: Volker Lendecke <vl at samba.org>
Reviewed-by: Stefan Metzmacher <metze at samba.org>
(cherry picked from commit 503fc8f2ba662ecbec0788bd1710440464dc5cfd)
commit 3e222ac6b9329dfbf34f124fae0b0f64d2cd76ac
Author: Martin Schwenke <martin at meltin.net>
Date: Tue Jan 28 16:49:14 2020 +1100
ctdb-tcp: Make error handling for outbound connection consistent
If we can't bind the local end of an outgoing connection then
something has gone wrong. Retrying is better than failing into a
zombie state. The interface might come back up and/or the address my
be reconfigured.
While here, do the same thing for the other (potentially transient)
failures.
The unknown address family failure is special but just handle it via a
retry. Technically it can't happen because the node address parsing
can only return values with address family AF_INET or AF_INET6.
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14274
RN: Retry inter-node TCP connections on more transient failures
Reported-by: 耿纪超 <gengjichao at jd.com>
Signed-off-by: Martin Schwenke <martin at meltin.net>
Reviewed-by: Amitay Isaacs <amitay at gmail.com>
(cherry picked from commit a40fc709cc972dadb40efbf1394b10fae3cfcc07)
-----------------------------------------------------------------------
Summary of changes:
ctdb/tcp/tcp_connect.c | 36 +++++++++++++++++-------------------
source3/auth/auth_sam.c | 6 ++++--
2 files changed, 21 insertions(+), 21 deletions(-)
Changeset truncated at 500 lines:
diff --git a/ctdb/tcp/tcp_connect.c b/ctdb/tcp/tcp_connect.c
index f54086fcd3c..559442f14bf 100644
--- a/ctdb/tcp/tcp_connect.c
+++ b/ctdb/tcp/tcp_connect.c
@@ -181,16 +181,14 @@ void ctdb_tcp_node_connect(struct tevent_context *ev, struct tevent_timer *te,
tnode->out_fd = socket(sock_out.sa.sa_family, SOCK_STREAM, IPPROTO_TCP);
if (tnode->out_fd == -1) {
DBG_ERR("Failed to create socket\n");
- return;
+ goto failed;
}
ret = set_blocking(tnode->out_fd, false);
if (ret != 0) {
DBG_ERR("Failed to set socket non-blocking (%s)\n",
strerror(errno));
- close(tnode->out_fd);
- tnode->out_fd = -1;
- return;
+ goto failed;
}
set_close_on_exec(tnode->out_fd);
@@ -222,32 +220,22 @@ void ctdb_tcp_node_connect(struct tevent_context *ev, struct tevent_timer *te,
sockout_size = sizeof(sock_out.ip6);
break;
default:
- DEBUG(DEBUG_ERR, (__location__ " unknown family %u\n",
- sock_in.sa.sa_family));
- close(tnode->out_fd);
- tnode->out_fd = -1;
- return;
+ DBG_ERR("Unknown address family %u\n", sock_in.sa.sa_family);
+ /* Can't happen to due to address parsing restrictions */
+ goto failed;
}
ret = bind(tnode->out_fd, (struct sockaddr *)&sock_in, sockin_size);
if (ret == -1) {
DBG_ERR("Failed to bind socket (%s)\n", strerror(errno));
- close(tnode->out_fd);
- tnode->out_fd = -1;
- return;
+ goto failed;
}
ret = connect(tnode->out_fd,
(struct sockaddr *)&sock_out,
sockout_size);
if (ret != 0 && errno != EINPROGRESS) {
- ctdb_tcp_stop_connection(node);
- tnode->connect_te = tevent_add_timer(ctdb->ev,
- tnode,
- timeval_current_ofs(1, 0),
- ctdb_tcp_node_connect,
- node);
- return;
+ goto failed;
}
/* non-blocking connect - wait for write event */
@@ -266,6 +254,16 @@ void ctdb_tcp_node_connect(struct tevent_context *ev, struct tevent_timer *te,
timeval_current_ofs(1, 0),
ctdb_tcp_node_connect,
node);
+
+ return;
+
+failed:
+ ctdb_tcp_stop_connection(node);
+ tnode->connect_te = tevent_add_timer(ctdb->ev,
+ tnode,
+ timeval_current_ofs(1, 0),
+ ctdb_tcp_node_connect,
+ node);
}
/*
diff --git a/source3/auth/auth_sam.c b/source3/auth/auth_sam.c
index c6357c696ea..3c12f959faf 100644
--- a/source3/auth/auth_sam.c
+++ b/source3/auth/auth_sam.c
@@ -80,12 +80,13 @@ static NTSTATUS auth_samstrict_auth(const struct auth_context *auth_context,
const struct auth_usersupplied_info *user_info,
struct auth_serversupplied_info **server_info)
{
- const char *effective_domain = user_info->mapped.domain_name;
+ const char *effective_domain = NULL;
bool is_local_name, is_my_domain;
if (!user_info || !auth_context) {
return NT_STATUS_LOGON_FAILURE;
}
+ effective_domain = user_info->mapped.domain_name;
if (user_info->mapped.account_name == NULL ||
user_info->mapped.account_name[0] == '\0')
@@ -187,12 +188,13 @@ static NTSTATUS auth_sam_netlogon3_auth(const struct auth_context *auth_context,
const struct auth_usersupplied_info *user_info,
struct auth_serversupplied_info **server_info)
{
- const char *effective_domain = user_info->mapped.domain_name;
+ const char *effective_domain = NULL;
bool is_my_domain;
if (!user_info || !auth_context) {
return NT_STATUS_LOGON_FAILURE;
}
+ effective_domain = user_info->mapped.domain_name;
if (user_info->mapped.account_name == NULL ||
user_info->mapped.account_name[0] == '\0')
--
Samba Shared Repository
More information about the samba-cvs
mailing list