[SCM] Samba Shared Repository - branch v3-2-stable updated - release-3-2-3-79-g419990c

Karolin Seeger kseeger at samba.org
Thu Sep 11 14:29:03 GMT 2008


The branch, v3-2-stable has been updated
       via  419990cc70df6d4f0ae61e15b19eef79be0e7fde (commit)
       via  48e7b5da2526587f3ad5501bf2f7b7874876db51 (commit)
      from  05fa57f29ea5b9a28ad73b44077d3ab526bb079e (commit)

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


- Log -----------------------------------------------------------------
commit 419990cc70df6d4f0ae61e15b19eef79be0e7fde
Author: Karolin Seeger <kseeger at samba.org>
Date:   Thu Sep 11 16:09:32 2008 +0200

    WHATSNEW: Update changes since 3.2.3.
    
    Karolin
    (cherry picked from commit af05317606f12f2c02b09bd1286cefd10bc37476)

commit 48e7b5da2526587f3ad5501bf2f7b7874876db51
Author: Simo Sorce <idra at samba.org>
Date:   Thu Sep 11 09:51:39 2008 -0400

    Fix for bug 5571
    Make sure that usernames are parsed using the correct separator.
    Otherwise group memeberships in winbind may be result broken.
    (cherry picked from commit a2c313182135fc4f7596a595c5143b7bb71a0bdf)

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

Summary of changes:
 WHATSNEW.txt                     |    4 ++++
 source/winbindd/winbindd_group.c |    5 +++--
 source/winbindd/winbindd_util.c  |   25 +++++++++++++++++++++++++
 3 files changed, 32 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/WHATSNEW.txt b/WHATSNEW.txt
index 12959de..24a4f1c 100644
--- a/WHATSNEW.txt
+++ b/WHATSNEW.txt
@@ -83,6 +83,10 @@ o   David Leonard <David.Leonard at quest.com>
     * BUG 4516: No IPv6 on Solaris 2.6.
 
 
+o   Simo Sorce <idra at samba.org>
+    * BUG 5571: Fix group memeberships in Winbind.
+
+
 o   Andrew Tridgell <tridge at samba.org>
     * Avoid a race condition in glibc between AIO and setresuid().
     * Add missing become root for AIO operations.
diff --git a/source/winbindd/winbindd_group.c b/source/winbindd/winbindd_group.c
index 20b90e3..f81caa2 100644
--- a/source/winbindd/winbindd_group.c
+++ b/source/winbindd/winbindd_group.c
@@ -596,8 +596,9 @@ static bool fill_grent_mem(struct winbindd_domain *domain,
 			(*num_gr_mem)++;
 			DEBUG(10, ("buf_len + %d = %d\n", len + 1, buf_len));
 		} else {
-			DEBUG(10, ("appending %s at ndx %d\n", names[i], buf_ndx));
-			safe_strcpy(&buf[buf_ndx], names[i], len);
+			DEBUG(10, ("appending %s at ndx %d\n",
+				   names[i], buf_ndx));
+			parse_add_domuser(&buf[buf_ndx], names[i], &len);
 			buf_ndx += len;
 			buf[buf_ndx] = ',';
 			buf_ndx++;
diff --git a/source/winbindd/winbindd_util.c b/source/winbindd/winbindd_util.c
index 9b626d1..cfe9136 100644
--- a/source/winbindd/winbindd_util.c
+++ b/source/winbindd/winbindd_util.c
@@ -1104,6 +1104,31 @@ bool parse_domain_user_talloc(TALLOC_CTX *mem_ctx, const char *domuser,
 	return ((*domain != NULL) && (*user != NULL));
 }
 
+/* add a domain user name to a buffer */
+void parse_add_domuser(void *buf, char *domuser, int *len)
+{
+	fstring domain;
+	char *p, *user;
+
+	user = domuser;
+	p = strchr(domuser, *lp_winbind_separator());
+
+	if (p) {
+
+		fstrcpy(domain, domuser);
+		domain[PTR_DIFF(p, domuser)] = 0;
+		p++;
+
+		if (assume_domain(domain)) {
+
+			user = p;
+			*len -= (PTR_DIFF(p, domuser));
+		}
+	}
+
+	safe_strcpy(buf, user, *len);
+}
+
 /* Ensure an incoming username from NSS is fully qualified. Replace the
    incoming fstring with DOMAIN <separator> user. Returns the same
    values as parse_domain_user() but also replaces the incoming username.


-- 
Samba Shared Repository


More information about the samba-cvs mailing list