The branch, v4-14-test has been updated via 4a6813f7bc9 s3: smbd: Add missing pop_sec_ctx() in error code path of close_directory() via 870991a12c5 ctdb-protocol: Allow rfc5952 "[2001:db8::1]:80" ipv6 notation from 70d81ab1481 s3: includes: Make the comments describing itime consistent. Always use "invented" time.
https://git.samba.org/?p=samba.git;a=shortlog;h=v4-14-test - Log ----------------------------------------------------------------- commit 4a6813f7bc93fcaf802f6733e24679adb7cfc52c 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-14-test): Jule Anger <jan...@samba.org> Autobuild-Date(v4-14-test): Mon Jan 17 09:57:52 UTC 2022 on sn-devel-184 commit 870991a12c5a826141cf3f821a7fc8cd654bdc93 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 81811f703b0..e5f47b8ed73 100644 --- a/source3/smbd/close.c +++ b/source3/smbd/close.c @@ -1321,6 +1321,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