The branch, v3-6-test has been updated
       via  d8f4a07 s3-docs: manpage for "net idmap delete"
       via  154a34f s3-docs: manpage for "smbcontrol xx idmap"
       via  0c6a823 s3:registry: fix invalid write in iconvert_talloc()
      from  46cae09 Fix the examples/VFS build. (cherry picked from commit 
79c6f0d440b30d2c36a50a8ea5735a5a1818b551)

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-6-test


- Log -----------------------------------------------------------------
commit d8f4a071062752bf630c1c846b794ddd7cb7b35f
Author: Gregor Beck <[email protected]>
Date:   Mon Mar 7 09:57:10 2011 +0100

    s3-docs: manpage for "net idmap delete"
    
    Autobuild-User: Michael Adam <[email protected]>
    Autobuild-Date: Mon Mar  7 14:26:42 CET 2011 on sn-devel-104

commit 154a34fcdd0e621eb7270c0ecb425a200820a7df
Author: Gregor Beck <[email protected]>
Date:   Mon Mar 7 09:56:48 2011 +0100

    s3-docs: manpage for "smbcontrol xx idmap"

commit 0c6a823f1920629e7366c1814df0e97424a346ec
Author: Michael Adam <[email protected]>
Date:   Fri Mar 4 23:53:44 2011 +0100

    s3:registry: fix invalid write in iconvert_talloc()
    
    For a non-preallocated dest-string and sourcestring of len < 2,
    (one or both of the) final two two zero-bytes would be written
    after the end of the allocated dest-string. The sourcelen did
    not include the source string terminator. For longer strings,
    this was not a problem because the dest-string would have been
    reallocated in the convert-loop. This is fixed now by allocating
    two extra bytes for the terminating 0-bytes that are needed anyways
    in the initial allocation.
    
    Pair-Programmed-With: Gregor Beck <[email protected]>

-----------------------------------------------------------------------

Summary of changes:
 docs-xml/manpages-3/net.8.xml         |   17 +++++++++++++++++
 docs-xml/manpages-3/smbcontrol.1.xml  |   26 ++++++++++++++++++++++++++
 source3/registry/reg_parse_internal.c |    7 +++++--
 3 files changed, 48 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/docs-xml/manpages-3/net.8.xml b/docs-xml/manpages-3/net.8.xml
index d648d5c..8e5ece0 100644
--- a/docs-xml/manpages-3/net.8.xml
+++ b/docs-xml/manpages-3/net.8.xml
@@ -1278,6 +1278,23 @@ as the password for the user DN used to bind to the ldap 
server.
 </refsect2>
 
 <refsect2>
+
+<title>IDMAP DELETE [-f] [--db=&lt;DB&gt;] &lt;ID&gt;</title>
+
+<para>
+Delete a mapping sid &lt;-&gt; gid or sid &lt;-&gt; uid from the IDMAP 
database.
+The mapping is given by &lt;ID&gt; which may either be a sid: S-x-..., a gid: 
"GID number" or a uid: "UID number".
+Use -f to delete an invalid partial mapping &lt;ID&gt; -&gt; xx
+</para>
+<para>
+  Use "smbcontrol all idmap ..." to notify running smbd instances.
+  See the <citerefentry><refentrytitle>smbcontrol</refentrytitle>
+  <manvolnum>1</manvolnum></citerefentry> manpage for details.
+</para>
+</refsect2>
+
+
+<refsect2>
 <title>USERSHARE</title>
 
 <para>Starting with version 3.0.23, a Samba server now supports the ability for
diff --git a/docs-xml/manpages-3/smbcontrol.1.xml 
b/docs-xml/manpages-3/smbcontrol.1.xml
index d3707c1..31c3537 100644
--- a/docs-xml/manpages-3/smbcontrol.1.xml
+++ b/docs-xml/manpages-3/smbcontrol.1.xml
@@ -272,6 +272,32 @@
        </para></listitem>
        </varlistentry>
 
+       <varlistentry>
+       <term>idmap</term>
+       <listitem><para>Notify about changes of id mapping. Can be sent
+       to <constant>smbd</constant> or (not implemented yet) 
<constant>winbindd</constant>.
+       </para></listitem>
+
+       <variablelist>
+         <varlistentry>
+           <term>flush [uid|gid]</term>
+           <listitem><para>Flush caches for sid &lt;-&gt; gid and/or sid 
&lt;-&gt; uid mapping.
+           </para></listitem>
+         </varlistentry>
+         <varlistentry>
+           <term>delete &lt;ID&gt;</term>
+           <listitem><para>Remove a mapping from cache. The mapping is given 
by &lt;ID&gt;
+           which may either be a sid: S-x-..., a gid: "GID number" or a uid: 
"UID number".
+           </para></listitem>
+         </varlistentry>
+         <varlistentry>
+           <term>kill &lt;ID&gt;</term>
+           <listitem><para>Remove a mapping from cache. Terminate 
<constant>smbd</constant> if
+           the id is currently in use.</para></listitem>
+         </varlistentry>
+       </variablelist>
+       </varlistentry>
+
 </variablelist>
 </refsect1>
 
diff --git a/source3/registry/reg_parse_internal.c 
b/source3/registry/reg_parse_internal.c
index 4734662..dedbe12 100644
--- a/source3/registry/reg_parse_internal.c
+++ b/source3/registry/reg_parse_internal.c
@@ -42,8 +42,11 @@ size_t iconvert_talloc(const void* ctx,
        dst = *pdst;
 
        if (dst == NULL) {
-               /* dstlen = 2*srclen + 2; */
-               dstlen = srclen;
+               /*
+                * Allocate an extra two bytes for the
+                * terminating zero.
+                */
+               dstlen = srclen + 2;
                dst = (char *)talloc_size(ctx, dstlen);
                if (dst == NULL) {
                        DEBUG(0,("iconver_talloc no mem\n"));


-- 
Samba Shared Repository

Reply via email to