[SCM] Samba Shared Repository - branch v3-6-test updated
Michael Adam
obnox at samba.org
Mon Mar 7 07:26:46 MST 2011
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 <gbeck at sernet.de>
Date: Mon Mar 7 09:57:10 2011 +0100
s3-docs: manpage for "net idmap delete"
Autobuild-User: Michael Adam <obnox at samba.org>
Autobuild-Date: Mon Mar 7 14:26:42 CET 2011 on sn-devel-104
commit 154a34fcdd0e621eb7270c0ecb425a200820a7df
Author: Gregor Beck <gbeck at sernet.de>
Date: Mon Mar 7 09:56:48 2011 +0100
s3-docs: manpage for "smbcontrol xx idmap"
commit 0c6a823f1920629e7366c1814df0e97424a346ec
Author: Michael Adam <obnox at samba.org>
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 <gbeck at sernet.de>
-----------------------------------------------------------------------
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=<DB>] <ID></title>
+
+<para>
+Delete a mapping sid <-> gid or sid <-> uid from the IDMAP database.
+The mapping is given by <ID> 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 <ID> -> 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 <-> gid and/or sid <-> uid mapping.
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>delete <ID></term>
+ <listitem><para>Remove a mapping from cache. The mapping is given by <ID>
+ which may either be a sid: S-x-..., a gid: "GID number" or a uid: "UID number".
+ </para></listitem>
+ </varlistentry>
+ <varlistentry>
+ <term>kill <ID></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
More information about the samba-cvs
mailing list