The branch, v4-15-test has been updated via 5a2227d704c s3: smbd: Add missing pop_sec_ctx() in error code path of close_directory() via 6c28c948a49 ctdb-protocol: Allow rfc5952 "[2001:db8::1]:80" ipv6 notation from 671dee2bd7d s3:smbd: Fix dereferencing null pointer "fsp"
https://git.samba.org/?p=samba.git;a=shortlog;h=v4-15-test - Log ----------------------------------------------------------------- commit 5a2227d704c9385bc51489e570e744ab750d9aa9 Author: Jeremy Allison <j...@samba.org> Date: Wed Jan 12 10:42:48 2022 -0800 s3: smbd: Add missing pop_sec_ctx() in error code path of close_directory() If delete_all_streams() fails. Found by Andrew Walker <awal...@ixsystems.com> BUG: https://bugzilla.samba.org/show_bug.cgi?id=14944 Signed-off-by: Jeremy Allison <j...@samba.org> Reviewed-by: Christof Schmitt <c...@samba.org> Autobuild-User(master): Jeremy Allison <j...@samba.org> Autobuild-Date(master): Fri Jan 14 03:34:47 UTC 2022 on sn-devel-184 (cherry picked from commit 5f9dbf3decd17129f360cbe14383cc79e20fb70b) Autobuild-User(v4-15-test): Jule Anger <jan...@samba.org> Autobuild-Date(v4-15-test): Mon Jan 17 10:21:10 UTC 2022 on sn-devel-184 commit 6c28c948a493eed8efd0591fd3d52d6779b74f13 Author: Volker Lendecke <v...@samba.org> Date: Thu Dec 23 11:52:38 2021 +0100 ctdb-protocol: Allow rfc5952 "[2001:db8::1]:80" ipv6 notation Bug: https://bugzilla.samba.org/show_bug.cgi?id=14934 Signed-off-by: Volker Lendecke <v...@samba.org> Reviewed-by: Martin Schwenke <mar...@meltin.net> (cherry picked from commit 224e99804efef960ef4ce2ff2f4f6dced1e74146) ----------------------------------------------------------------------- Summary of changes: ctdb/protocol/protocol_util.c | 13 +++++++++++++ source3/smbd/close.c | 2 ++ 2 files changed, 15 insertions(+) Changeset truncated at 500 lines: diff --git a/ctdb/protocol/protocol_util.c b/ctdb/protocol/protocol_util.c index 2d0a6f33038..3eea95a274e 100644 --- a/ctdb/protocol/protocol_util.c +++ b/ctdb/protocol/protocol_util.c @@ -240,6 +240,19 @@ static int ip_from_string(const char *str, ctdb_sock_addr *addr) uint8_t ipv4_mapped_prefix[12] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xff, 0xff }; + size_t len = strlen(str); + char s[64]; + + len = strlcpy(s, str, sizeof(s)); + if (len >= sizeof(s)) { + return EINVAL; + } + + if ((len >= 2) && (s[0] == '[') && (s[len-1] == ']')) { + s[len-1] = '\0'; + str = s+1; + p = strrchr(str, ':'); + } ret = ipv6_from_string(str, &addr->ip6); if (ret != 0) { diff --git a/source3/smbd/close.c b/source3/smbd/close.c index 0e5f1958fa1..c917cb5828d 100644 --- a/source3/smbd/close.c +++ b/source3/smbd/close.c @@ -1432,6 +1432,8 @@ static NTSTATUS close_directory(struct smb_request *req, files_struct *fsp, DEBUG(5, ("delete_all_streams failed: %s\n", nt_errstr(status))); file_free(req, fsp); + /* unbecome user. */ + pop_sec_ctx(); return status; } } -- Samba Shared Repository