[SCM] Samba Shared Repository - branch v4-13-stable updated
Stefan Metzmacher
metze at samba.org
Tue May 11 09:47:52 UTC 2021
The branch, v4-13-stable has been updated
via 1d232e39a02 Merge branch 'v4-13-stable' into 'v4-13-test' again for the 4.13.9 release
via 13061573a33 Revert "VERSION: Bump version up to 4.13.10..." for now
via ca362d33d75 VERSION: Bump version up to 4.13.10...
via 37540e4f90e VERSION: Disable GIT_SNAPSHOT for the Samba 4.13.9 release.
via 6afc37ae5d9 WHATSNEW: Add release notes for Samba 4.13.9.
via aae24152b8d s3: smbd: SMB1 SMBsplwr doesn't send a reply packet on success.
via 8feeac11f7e docs: Expand the "log level" docs on audit logging
via 83c39f1e4ee docs: underline special words in the audit logging part of "log level" in man smb.conf
via ef386397d34 docs: Further discourage the use of the "event notification" options
via 78562c46bed docs: Add proper explination on why transactions need to be audited.
via 56e4cb8f3d0 docs: Add missing documentation on dsdb_group_audit and dsdb_group_audit_json
via bd6f38ed8b7 debug: Synchronise "log level" in smb.conf with the code
via 4484b030c0d VERSION: Bump version up to 4.13.9.
via 5e9cd05325e Merge tag 'samba-4.13.8' into v4-13-test
via 058aaad5f4a WHATSNEW: Add release notes for Samba 4.13.8.
via 32c511d439b CVE-2021-20254 passdb: Simplify sids_to_unixids()
via 2022e490d5e s3-iremotewinspool: set the per-request memory context
via 56156a8fd54 build: Only add -Wl,--as-needed when supported
via 7436dde6ef6 s3: smbd: fix deferred renames
via a85f7995740 s4: torture. Add smb2.lease.rename_wait test to reproduce regression in delay rename for lease break code.
via 3644afc38c7 rpc_server3: Fix a memleak for internal pipes
via 85b5657cbd6 spools: avoid leaking memory into the callers mem_ctx
via 890cc945e33 pidl: set the per-request memory context in the pidl generator
via 42e7b36454d smbd: free open_rec state in remove_deferred_open_message_smb2_internal()
via 27cd9103dc6 smbd: cancel pending poll open timer in poll_open_done()
via f8d67bc3d7d smbd: reset dangling watch_req pointer in poll_open_done
via 3f366878d33 idmap_nss: Do not return SID from unixids_to_sids on type mismatch
via af37d5abae9 idmap_rfc2307: Do not return SID from unixids_to_sids on type mismatch
via 3aa06edf38b winbind: Only use unixid2sid mapping when module reports ID_MAPPED
via f2be1673ede third_party: Update socket_wrapper to version 1.3.3
via 4da1c2301fa third_party: Update socket_wrapper to version 1.3.2
via 5677103fe7b VERSION: Bump version up to 4.13.8...
via 112d5f41718 Merge tag 'samba-4.13.7' into HEAD
via b30c0416390 VERSION: Bump version up to 4.13.6...
from 692d5287eaf VERSION: Disable GIT_SNAPSHOT for the 4.13.8 release.
https://git.samba.org/?p=samba.git;a=shortlog;h=v4-13-stable
- Log -----------------------------------------------------------------
-----------------------------------------------------------------------
Summary of changes:
VERSION | 2 +-
WHATSNEW.txt | 70 +-
buildtools/wafsamba/samba_third_party.py | 2 +-
docs-xml/smbdotconf/logging/loglevel.xml | 108 +-
.../smbdotconf/logon/autheventnotification.xml | 17 +-
docs-xml/smbdotconf/misc/dsdbeventnotification.xml | 14 +-
.../misc/dsdbgroupchangenotification.xml | 16 +-
.../misc/dsdbpasswordeventnotification.xml | 16 +-
pidl/lib/Parse/Pidl/Samba4/NDR/ServerCompat.pm | 2 +
source3/rpc_server/rpc_handles.c | 6 -
source3/rpc_server/rpc_ncacn_np.c | 2 +-
source3/rpc_server/spoolss/srv_iremotewinspool.c | 2 +
source3/rpc_server/spoolss/srv_spoolss_nt.c | 6 +-
source3/smbd/open.c | 3 +
source3/smbd/reply.c | 2 +
source3/smbd/smb2_create.c | 1 +
source3/smbd/smb2_setinfo.c | 1 +
source3/winbindd/idmap_nss.c | 6 +-
source3/winbindd/idmap_rfc2307.c | 4 +-
source3/winbindd/winbindd_dual_srv.c | 8 +-
source4/torture/smb2/lease.c | 145 ++
third_party/socket_wrapper/socket_wrapper.c | 1710 ++++++++++++++++----
third_party/socket_wrapper/socket_wrapper.h | 89 +
third_party/socket_wrapper/wscript | 8 +-
wscript | 3 +-
25 files changed, 1883 insertions(+), 360 deletions(-)
create mode 100644 third_party/socket_wrapper/socket_wrapper.h
Changeset truncated at 500 lines:
diff --git a/VERSION b/VERSION
index 030268366fc..c1be6703e7d 100644
--- a/VERSION
+++ b/VERSION
@@ -25,7 +25,7 @@
########################################################
SAMBA_VERSION_MAJOR=4
SAMBA_VERSION_MINOR=13
-SAMBA_VERSION_RELEASE=8
+SAMBA_VERSION_RELEASE=9
########################################################
# If a official release has a serious bug #
diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index 6fe057c5b40..da680c071d9 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -1,3 +1,70 @@
+ ==============================
+ Release Notes for Samba 4.13.9
+ May 11, 2021
+ ==============================
+
+
+This is the latest stable release of the Samba 4.13 release series.
+
+
+Changes since 4.13.8
+--------------------
+
+o Jeremy Allison <jra at samba.org>
+ * BUG 14696: s3: smbd: SMB1 SMBsplwr doesn't send a reply packet on success.
+
+o Andrew Bartlett <abartlet at samba.org>
+ * BUG 14689: Add documentation for dsdb_group_audit and dsdb_group_json_audit
+ to "log level", synchronise "log level" in smb.conf with the code.
+
+o Ralph Boehme <slow at samba.org>
+ * BUG 14672: Fix smbd panic when two clients open same file.
+ * BUG 14675: Fix memory leak in the RPC server.
+ * BUG 14679: s3: smbd: Fix deferred renames.
+
+o Samuel Cabrero <scabrero at samba.org>
+ * BUG 14675: s3-iremotewinspool: Set the per-request memory context.
+
+o Volker Lendecke <vl at samba.org>
+ * BUG 14675: rpc_server3: Fix a memleak for internal pipes.
+
+o Stefan Metzmacher <metze at samba.org>
+ * BUG 11899: third_party: Update socket_wrapper to version 1.3.2.
+ * BUG 14640: third_party: Update socket_wrapper to version 1.3.3.
+
+
+o Christof Schmitt <cs at samba.org>
+ * BUG 14663: idmap_rfc2307 and idmap_nss return wrong mapping for uid/gid
+ conflict.
+
+o Martin Schwenke <martin at meltin.net
+ * BUG 14288: Fix the build on OmniOS.
+
+
+#######################################
+Reporting bugs & Development Discussion
+#######################################
+
+Please discuss this release on the samba-technical mailing list or by
+joining the #samba-technical IRC channel on irc.freenode.net.
+
+If you do report problems then please try to send high quality
+feedback. If you don't provide vital information to help us track down
+the problem then you will probably be ignored. All bug reports should
+be filed under the Samba 4.1 and newer product in the project's Bugzilla
+database (https://bugzilla.samba.org/).
+
+
+======================================================================
+== Our Code, Our Bugs, Our Responsibility.
+== The Samba Team
+======================================================================
+
+
+Release notes for older releases follow:
+----------------------------------------
+
+
==============================
Release Notes for Samba 4.13.8
April 29, 2021
@@ -59,8 +126,7 @@ database (https://bugzilla.samba.org/).
======================================================================
-Release notes for older releases follow:
-----------------------------------------
+----------------------------------------------------------------------
==============================
diff --git a/buildtools/wafsamba/samba_third_party.py b/buildtools/wafsamba/samba_third_party.py
index bc2b21f2a55..1c027cb6870 100644
--- a/buildtools/wafsamba/samba_third_party.py
+++ b/buildtools/wafsamba/samba_third_party.py
@@ -24,7 +24,7 @@ Build.BuildContext.CHECK_CMOCKA = CHECK_CMOCKA
@conf
def CHECK_SOCKET_WRAPPER(conf):
- return conf.CHECK_BUNDLED_SYSTEM_PKG('socket_wrapper', minversion='1.2.5')
+ return conf.CHECK_BUNDLED_SYSTEM_PKG('socket_wrapper', minversion='1.3.3')
Build.BuildContext.CHECK_SOCKET_WRAPPER = CHECK_SOCKET_WRAPPER
@conf
diff --git a/docs-xml/smbdotconf/logging/loglevel.xml b/docs-xml/smbdotconf/logging/loglevel.xml
index 273765c6fbe..4c6bb5e7e73 100644
--- a/docs-xml/smbdotconf/logging/loglevel.xml
+++ b/docs-xml/smbdotconf/logging/loglevel.xml
@@ -24,8 +24,6 @@
<listitem><para><parameter moreinfo="none">printdrivers</parameter></para></listitem>
<listitem><para><parameter moreinfo="none">lanman</parameter></para></listitem>
<listitem><para><parameter moreinfo="none">smb</parameter></para></listitem>
- <listitem><para><parameter moreinfo="none">smb2</parameter></para></listitem>
- <listitem><para><parameter moreinfo="none">smb2_credits</parameter></para></listitem>
<listitem><para><parameter moreinfo="none">rpc_parse</parameter></para></listitem>
<listitem><para><parameter moreinfo="none">rpc_srv</parameter></para></listitem>
<listitem><para><parameter moreinfo="none">rpc_cli</parameter></para></listitem>
@@ -41,19 +39,24 @@
<listitem><para><parameter moreinfo="none">msdfs</parameter></para></listitem>
<listitem><para><parameter moreinfo="none">dmapi</parameter></para></listitem>
<listitem><para><parameter moreinfo="none">registry</parameter></para></listitem>
- <listitem><para><parameter moreinfo="none">scavenger</parameter></para></listitem>
- <listitem><para><parameter moreinfo="none">dns</parameter></para></listitem>
- <listitem><para><parameter moreinfo="none">ldb</parameter></para></listitem>
- <listitem><para><parameter moreinfo="none">tevent</parameter></para></listitem>
- <listitem><para><parameter moreinfo="none">auth_audit</parameter></para></listitem>
- <listitem><para><parameter moreinfo="none">auth_json_audit</parameter></para></listitem>
- <listitem><para><parameter moreinfo="none">kerberos</parameter></para></listitem>
- <listitem><para><parameter moreinfo="none">dsdb_audit</parameter></para></listitem>
- <listitem><para><parameter moreinfo="none">dsdb_json_audit</parameter></para></listitem>
- <listitem><para><parameter moreinfo="none">dsdb_password_audit</parameter></para></listitem>
- <listitem><para><parameter moreinfo="none">dsdb_password_json_audit</parameter></para></listitem>
- <listitem><para><parameter moreinfo="none">dsdb_transaction_audit</parameter></para></listitem>
- <listitem><para><parameter moreinfo="none">dsdb_transaction_json_audit</parameter></para></listitem>
+ <listitem><para><parameter moreinfo="none">scavenger</parameter></para></listitem>
+ <listitem><para><parameter moreinfo="none">dns</parameter></para></listitem>
+ <listitem><para><parameter moreinfo="none">ldb</parameter></para></listitem>
+ <listitem><para><parameter moreinfo="none">tevent</parameter></para></listitem>
+ <listitem><para><parameter moreinfo="none">auth_audit</parameter></para></listitem>
+ <listitem><para><parameter moreinfo="none">auth_json_audit</parameter></para></listitem>
+ <listitem><para><parameter moreinfo="none">kerberos</parameter></para></listitem>
+ <listitem><para><parameter moreinfo="none">drs_repl</parameter></para></listitem>
+ <listitem><para><parameter moreinfo="none">smb2</parameter></para></listitem>
+ <listitem><para><parameter moreinfo="none">smb2_credits</parameter></para></listitem>
+ <listitem><para><parameter moreinfo="none">dsdb_audit</parameter></para></listitem>
+ <listitem><para><parameter moreinfo="none">dsdb_json_audit</parameter></para></listitem>
+ <listitem><para><parameter moreinfo="none">dsdb_password_audit</parameter></para></listitem>
+ <listitem><para><parameter moreinfo="none">dsdb_password_json_audit</parameter></para></listitem>
+ <listitem><para><parameter moreinfo="none">dsdb_transaction_audit</parameter></para></listitem>
+ <listitem><para><parameter moreinfo="none">dsdb_transaction_json_audit</parameter></para></listitem>
+ <listitem><para><parameter moreinfo="none">dsdb_group_audit</parameter></para></listitem>
+ <listitem><para><parameter moreinfo="none">dsdb_group_json_audit</parameter></para></listitem>
</itemizedlist>
<para>To configure the logging for specific classes to go into a different
@@ -62,9 +65,9 @@
full_audit:1@/var/log/audit.log</parameter>.</para>
<para>Authentication and authorization audit information is logged
- under the auth_audit, and if Samba was not compiled with
+ under the <parameter>auth_audit</parameter>, and if Samba was not compiled with
--without-json, a JSON representation is logged under
- auth_json_audit.</para>
+ <parameter>auth_json_audit</parameter>.</para>
<para>Support is comprehensive for all authentication and authorisation
of user accounts in the Samba Active Directory Domain Controller,
@@ -72,7 +75,8 @@
the file server, NTLM authentication, SMB and RPC authorization is
covered.</para>
- <para>Log levels for auth_audit and auth_audit_json are:</para>
+ <para>Log levels for <parameter>auth_audit</parameter> and
+ <parameter>auth_audit_json</parameter> are:</para>
<itemizedlist>
<listitem><para>2: Authentication Failure</para></listitem>
<listitem><para>3: Authentication Success</para></listitem>
@@ -80,21 +84,69 @@
<listitem><para>5: Anonymous Authentication and Authorization Success</para></listitem>
</itemizedlist>
- <para>Changes to the sam.ldb database are logged
- under the dsdb_audit and a JSON representation is logged under
- dsdb_json_audit.</para>
+ <para>Changes to the AD DC <command moreinfo="none">sam.ldb</command>
+ database are logged under the <parameter>dsdb_audit</parameter>
+ and a JSON representation is logged under
+ <parameter>dsdb_json_audit</parameter>.</para>
+
+ <para>Group membership changes to the AD DC <command
+ moreinfo="none">sam.ldb</command> database are logged under the
+ <parameter>dsdb_group_audit</parameter> and a JSON representation
+ is logged under
+ <parameter>dsdb_group_json_audit</parameter>.</para>
+
+ <para>Log levels for <parameter>dsdb_audit</parameter>,
+ <parameter>dsdb_json_audit</parameter>,
+ <parameter>dsdb_group_audit</parameter>,
+ <parameter>dsdb_group_json_audit</parameter> and
+ <parameter>dsdb_json_audit</parameter> are:</para>
+ <itemizedlist>
+ <listitem><para>5: Database modifications</para></listitem>
+ <listitem><para>5: Replicated updates from another DC</para></listitem>
+ </itemizedlist>
- <para>Password changes and Password resets are logged under
- dsdb_password_audit and a JSON representation is logged under the
- dsdb_password_json_audit.</para>
+ <para>Password changes and Password resets in the AD DC are logged
+ under <parameter>dsdb_password_audit</parameter> and a JSON
+ representation is logged under the
+ <parameter>dsdb_password_json_audit</parameter>. Password changes
+ will also appears as authentication events via
+ <parameter>auth_audit</parameter> and
+ <parameter>auth_audit_json</parameter>.</para>
+
+ <para>Log levels for <parameter>dsdb_password_audit</parameter> and
+ <parameter>dsdb_password_json_audit</parameter> are:</para>
+ <itemizedlist>
+ <listitem><para>5: Successful password changes and resets</para></listitem>
+ </itemizedlist>
<para>Transaction rollbacks and prepare commit failures are logged under
- the dsdb_transaction_audit and a JSON representation is logged under the
- password_json_audit. Logging the transaction details allows the
- identification of password and sam.ldb operations that have been rolled
- back.</para>
+ the <parameter>dsdb_transaction_audit</parameter> and a JSON representation is logged under the
+ <parameter>dsdb_transaction_json_audit</parameter>. </para>
+
+ <para>Log levels for <parameter>dsdb_transaction_audit</parameter> and
+ <parameter>dsdb_transaction_json</parameter> are:</para>
+
+ <itemizedlist>
+ <listitem><para>5: Transaction failure (rollback)</para></listitem>
+ <listitem><para>10: Transaction success (commit)</para></listitem>
+ </itemizedlist>
+ <para>Transaction roll-backs are possible in Samba, and whilst
+ they rarely reflect anything more than the failure of an
+ individual operation (say due to the add of a conflicting record),
+ they are possible. Audit logs are already generated and sent to
+ the system logs before the transaction is complete. Logging the
+ transaction details allows the identification of password and
+ <command moreinfo="none">sam.ldb</command> operations that have
+ been rolled back, and so have not actually persisted.</para>
+ <warning><para> Changes to <command
+ moreinfo="none">sam.ldb</command> made locally by the <command
+ moreinfo="none">root</command> user with direct access to the
+ database are not logged to the system logs, but to the
+ administrator's own console. While less than ideal, any user able
+ to make such modifications could disable the audit logging in any
+ case. </para></warning>
</description>
<value type="default">0</value>
<value type="example">3 passdb:5 auth:10 winbind:2</value>
diff --git a/docs-xml/smbdotconf/logon/autheventnotification.xml b/docs-xml/smbdotconf/logon/autheventnotification.xml
index 1ae2dbfb61a..87ccf02a8f4 100644
--- a/docs-xml/smbdotconf/logon/autheventnotification.xml
+++ b/docs-xml/smbdotconf/logon/autheventnotification.xml
@@ -10,16 +10,19 @@
registering as the service
<filename moreinfo="none">auth_event</filename>.</para>
- <para>This should be considered a developer option (it assists
- in the Samba testsuite) rather than a facility for external
- auditing, as message delivery is not guaranteed (a feature
- that the testsuite works around). Additionally Samba must be
- compiled with the jansson support for this option to be
- effective.</para>
+ <para>This is <emphasis>not</emphasis> needed for the audit
+ logging described in <smbconfoption name="log level"/>.</para>
+
+ <para>Instead, this should instead be considered a developer
+ option (it assists in the Samba testsuite) rather than a
+ facility for external auditing, as message delivery is not
+ guaranteed (a feature that the testsuite works around).</para>
<para>The authentication events are also logged via the normal
logging methods when the <smbconfoption name="log level"/> is
- set appropriately.</para>
+ set appropriately, say to
+ <command moreinfo="none">auth_json_audit:3</command>.</para>
+
</description>
<value type="default">no</value>
diff --git a/docs-xml/smbdotconf/misc/dsdbeventnotification.xml b/docs-xml/smbdotconf/misc/dsdbeventnotification.xml
index 7df46e1d68c..279ac3d29ef 100644
--- a/docs-xml/smbdotconf/misc/dsdbeventnotification.xml
+++ b/docs-xml/smbdotconf/misc/dsdbeventnotification.xml
@@ -10,14 +10,18 @@
registering as the service
<filename moreinfo="none">dsdb_event</filename>.</para>
- <para>This should be considered a developer option (it assists
- in the Samba testsuite) rather than a facility for external
- auditing, as message delivery is not guaranteed (a feature
- that the testsuite works around).</para>
+ <para>This is <emphasis>not</emphasis> needed for the audit
+ logging described in <smbconfoption name="log level"/>.</para>
+
+ <para>Instead, this should instead be considered a developer
+ option (it assists in the Samba testsuite) rather than a
+ facility for external auditing, as message delivery is not
+ guaranteed (a feature that the testsuite works around).</para>
<para>The Samba database events are also logged via the normal
logging methods when the <smbconfoption name="log level"/> is
- set appropriately.</para>
+ set appropriately, say to
+ <command moreinfo="none">dsdb_json_audit:5</command>.</para>
</description>
diff --git a/docs-xml/smbdotconf/misc/dsdbgroupchangenotification.xml b/docs-xml/smbdotconf/misc/dsdbgroupchangenotification.xml
index 6354979538b..3972e72b60f 100644
--- a/docs-xml/smbdotconf/misc/dsdbgroupchangenotification.xml
+++ b/docs-xml/smbdotconf/misc/dsdbgroupchangenotification.xml
@@ -10,14 +10,18 @@
registering as the service
<filename moreinfo="none">dsdb_group_event</filename>.</para>
- <para>This should be considered a developer option (it assists
- in the Samba testsuite) rather than a facility for external
- auditing, as message delivery is not guaranteed (a feature
- that the testsuite works around).</para>
+ <para>This is <emphasis>not</emphasis> needed for the audit
+ logging described in <smbconfoption name="log level"/>.</para>
- <para>The group events are also logged via the normal
+ <para>Instead, this should instead be considered a developer
+ option (it assists in the Samba testsuite) rather than a
+ facility for external auditing, as message delivery is not
+ guaranteed (a feature that the testsuite works around).</para>
+
+ <para>The Samba database events are also logged via the normal
logging methods when the <smbconfoption name="log level"/> is
- set appropriately.</para>
+ set appropriately, say to
+ <command moreinfo="none">dsdb_group_json_audit:5</command>.</para>
</description>
diff --git a/docs-xml/smbdotconf/misc/dsdbpasswordeventnotification.xml b/docs-xml/smbdotconf/misc/dsdbpasswordeventnotification.xml
index 984321b98fc..cd2cc98ff42 100644
--- a/docs-xml/smbdotconf/misc/dsdbpasswordeventnotification.xml
+++ b/docs-xml/smbdotconf/misc/dsdbpasswordeventnotification.xml
@@ -10,14 +10,18 @@
events by registering as the service
<filename moreinfo="none">password_event</filename>.</para>
- <para>This should be considered a developer option (it assists
- in the Samba testsuite) rather than a facility for external
- auditing, as message delivery is not guaranteed (a feature
- that the testsuite works around).</para>
+ <para>This is <emphasis>not</emphasis> needed for the audit
+ logging described in <smbconfoption name="log level"/>.</para>
- <para>The password events are also logged via the normal
+ <para>Instead, this should instead be considered a developer
+ option (it assists in the Samba testsuite) rather than a
+ facility for external auditing, as message delivery is not
+ guaranteed (a feature that the testsuite works around).</para>
+
+ <para>The Samba database events are also logged via the normal
logging methods when the <smbconfoption name="log level"/> is
- set appropriately.</para>
+ set appropriately, say to
+ <command moreinfo="none">dsdb_password_json_audit:5</command>.</para>
</description>
diff --git a/pidl/lib/Parse/Pidl/Samba4/NDR/ServerCompat.pm b/pidl/lib/Parse/Pidl/Samba4/NDR/ServerCompat.pm
index 54feea0a9ef..d1368c3dbca 100644
--- a/pidl/lib/Parse/Pidl/Samba4/NDR/ServerCompat.pm
+++ b/pidl/lib/Parse/Pidl/Samba4/NDR/ServerCompat.pm
@@ -299,6 +299,7 @@ sub boilerplate_iface($)
$self->pidl("/* Update pipes struct opnum */");
$self->pidl("p->opnum = opnum;");
$self->pidl("p->dce_call = dce_call;");
+ $self->pidl("p->mem_ctx = mem_ctx;");
$self->pidl("/* Update pipes struct session info */");
$self->pidl("pipe_session_info = p->session_info;");
$self->pidl("p->session_info = dce_call->auth_state->session_info;");
@@ -344,6 +345,7 @@ sub boilerplate_iface($)
$self->pidl("");
$self->pidl("p->dce_call = NULL;");
+ $self->pidl("p->mem_ctx = NULL;");
$self->pidl("/* Restore session info */");
$self->pidl("p->session_info = pipe_session_info;");
$self->pidl("p->auth.auth_type = 0;");
diff --git a/source3/rpc_server/rpc_handles.c b/source3/rpc_server/rpc_handles.c
index d897e0caabe..bcf8f240f63 100644
--- a/source3/rpc_server/rpc_handles.c
+++ b/source3/rpc_server/rpc_handles.c
@@ -60,12 +60,6 @@ int make_base_pipes_struct(TALLOC_CTX *mem_ctx,
return ENOMEM;
}
- p->mem_ctx = talloc_named(p, 0, "pipe %s %p", pipe_name, p);
- if (!p->mem_ctx) {
- talloc_free(p);
- return ENOMEM;
- }
-
p->msg_ctx = msg_ctx;
p->transport = transport;
diff --git a/source3/rpc_server/rpc_ncacn_np.c b/source3/rpc_server/rpc_ncacn_np.c
index 625b28c9209..11f8a9b0602 100644
--- a/source3/rpc_server/rpc_ncacn_np.c
+++ b/source3/rpc_server/rpc_ncacn_np.c
@@ -541,7 +541,7 @@ static struct tevent_req *rpcint_bh_raw_call_send(TALLOC_CTX *mem_ctx,
return tevent_req_post(req, ev);
}
- state->call = talloc_zero(hs->conn, struct dcesrv_call_state);
+ state->call = talloc_zero(state, struct dcesrv_call_state);
if (tevent_req_nomem(state->call, req)) {
return tevent_req_post(req, ev);
}
diff --git a/source3/rpc_server/spoolss/srv_iremotewinspool.c b/source3/rpc_server/spoolss/srv_iremotewinspool.c
index 26b225818f8..d6a983c722a 100644
--- a/source3/rpc_server/spoolss/srv_iremotewinspool.c
+++ b/source3/rpc_server/spoolss/srv_iremotewinspool.c
@@ -100,6 +100,7 @@ static NTSTATUS iremotewinspool__op_dispatch_internal(struct dcesrv_call_state *
/* Update pipes struct opnum */
p->opnum = opnum;
p->dce_call = dce_call;
+ p->mem_ctx = mem_ctx;
/* Update pipes struct session info */
pipe_session_info = p->session_info;
p->session_info = dce_call->auth_state->session_info;
@@ -1238,6 +1239,7 @@ fail:
}
p->dce_call = NULL;
+ p->mem_ctx = NULL;
/* Restore session info */
p->session_info = pipe_session_info;
p->auth.auth_type = 0;
diff --git a/source3/rpc_server/spoolss/srv_spoolss_nt.c b/source3/rpc_server/spoolss/srv_spoolss_nt.c
index 10c1b1d54f2..7951543747d 100644
--- a/source3/rpc_server/spoolss/srv_spoolss_nt.c
+++ b/source3/rpc_server/spoolss/srv_spoolss_nt.c
@@ -5738,7 +5738,8 @@ static WERROR construct_printer_driver_info_level(TALLOC_CTX *mem_ctx,
}
if (pinfo2->drivername == NULL || pinfo2->drivername[0] == '\0') {
- return WERR_UNKNOWN_PRINTER_DRIVER;
+ result = WERR_UNKNOWN_PRINTER_DRIVER;
+ goto done;
}
DBG_INFO("Construct printer driver [%s] for [%s]\n",
@@ -7030,7 +7031,8 @@ static WERROR update_printer(struct pipes_struct *p,
raddr = tsocket_address_inet_addr_string(p->remote_address,
p->mem_ctx);
if (raddr == NULL) {
- return WERR_NOT_ENOUGH_MEMORY;
+ result = WERR_NOT_ENOUGH_MEMORY;
+ goto done;
}
/* add_printer_hook() will call reload_services() */
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index 79b72784249..0c2c381bde5 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -2994,6 +2994,9 @@ static void poll_open_done(struct tevent_req *subreq)
status = share_mode_watch_recv(subreq, NULL, NULL);
TALLOC_FREE(subreq);
+ open_rec->watch_req = NULL;
+ TALLOC_FREE(open_rec->te);
+
DBG_DEBUG("dbwrap_watched_watch_recv returned %s\n",
nt_errstr(status));
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c
index f911fc006a3..a0da2910350 100644
--- a/source3/smbd/reply.c
+++ b/source3/smbd/reply.c
@@ -7093,6 +7093,8 @@ void reply_printwrite(struct smb_request *req)
DEBUG(3, ("printwrite %s num=%d\n", fsp_fnum_dbg(fsp), numtowrite));
+ reply_outbuf(req, 0, 0);
+
END_PROFILE(SMBsplwr);
--
Samba Shared Repository
More information about the samba-cvs
mailing list