[SCM] Samba Shared Repository - branch v3-3-stable updated - release-3-3-0pre1-305-g2191e1a

Karolin Seeger kseeger at samba.org
Tue Sep 16 07:32:09 GMT 2008


The branch, v3-3-stable has been updated
       via  2191e1ab8f2edb0230ca822ee0604627556a5199 (commit)
       via  40b134a83cf14da549c167989922d00ca8125313 (commit)
      from  f8ce9a8c35dec9f939a3074ced6ea9d090253445 (commit)

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


- Log -----------------------------------------------------------------
commit 2191e1ab8f2edb0230ca822ee0604627556a5199
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 346f08dba401aed08b83cbcf57cc9dd92421cc13)

commit 40b134a83cf14da549c167989922d00ca8125313
Author: Karolin Seeger <kseeger at samba.org>
Date:   Mon Sep 15 16:33:16 2008 +0200

    man cifs.upcall: Fix typo, wrap lines.
    
    Karolin
    (cherry picked from commit c4f361a17f51e4897ac2faafc65ebc8349e19001)
    (cherry picked from commit da7a60a82bfecbf5b1a10bdbccf4682fd92b65bb)
    (cherry picked from commit 97452672b64e06e50372089765909a1112788df7)

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

Summary of changes:
 docs-xml/manpages-3/cifs.upcall.8.xml |    6 +++++-
 source/winbindd/winbindd_group.c      |    2 +-
 source/winbindd/winbindd_proto.h      |    1 +
 source/winbindd/winbindd_util.c       |   25 +++++++++++++++++++++++++
 4 files changed, 32 insertions(+), 2 deletions(-)


Changeset truncated at 500 lines:

diff --git a/docs-xml/manpages-3/cifs.upcall.8.xml b/docs-xml/manpages-3/cifs.upcall.8.xml
index 3c1bb24..5faf0f7 100644
--- a/docs-xml/manpages-3/cifs.upcall.8.xml
+++ b/docs-xml/manpages-3/cifs.upcall.8.xml
@@ -62,7 +62,11 @@ to be run that way.</para>
 
 <refsect1>
 	<title>CONFIGURATION FOR KEYCTL</title>
-	<para>cifs.upcall is designed to be called from the kernel via the request-key callout program. This requres that request-key be told where and how to call this program. The current cifs.upcall program handles two different key types:</para>
+	<para>cifs.upcall is designed to be called from the kernel via the
+	request-key callout program. This requires that request-key be told
+	where and how to call this program. The current cifs.upcall program
+	handles two different key types:
+	</para>
 
 	<variablelist>
 		<varlistentry>
diff --git a/source/winbindd/winbindd_group.c b/source/winbindd/winbindd_group.c
index 21ee895..4d5026d 100644
--- a/source/winbindd/winbindd_group.c
+++ b/source/winbindd/winbindd_group.c
@@ -607,7 +607,7 @@ static bool fill_grent_mem(struct winbindd_domain *domain,
 		} else {
 			DEBUG(10, ("appending %s at ndx %d\n",
 				   names[i], buf_ndx));
-			safe_strcpy(&buf[buf_ndx], names[i], len);
+			parse_add_domuser(&buf[buf_ndx], names[i], &len);
 			buf_ndx += len;
 			buf[buf_ndx] = ',';
 			buf_ndx++;
diff --git a/source/winbindd/winbindd_proto.h b/source/winbindd/winbindd_proto.h
index c5b7b07..e0fc073 100644
--- a/source/winbindd/winbindd_proto.h
+++ b/source/winbindd/winbindd_proto.h
@@ -566,6 +566,7 @@ void free_getent_state(struct getent_state *state);
 bool parse_domain_user(const char *domuser, fstring domain, fstring user);
 bool parse_domain_user_talloc(TALLOC_CTX *mem_ctx, const char *domuser,
 			      char **domain, char **user);
+void parse_add_domuser(void *buf, char *domuser, int *len);
 bool canonicalize_username(fstring username_inout, fstring domain, fstring user);
 void fill_domain_username(fstring name, const char *domain, const char *user, bool can_assume);
 const char *get_winbind_pipe_dir(void) ;
diff --git a/source/winbindd/winbindd_util.c b/source/winbindd/winbindd_util.c
index 83c5053..132c96f 100644
--- a/source/winbindd/winbindd_util.c
+++ b/source/winbindd/winbindd_util.c
@@ -1138,6 +1138,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