[SCM] Samba Shared Repository - branch v3-3-test updated -
release-3-2-0pre2-4503-g7204116
Michael Adam
obnox at samba.org
Fri Nov 21 23:07:43 GMT 2008
The branch, v3-3-test has been updated
via 7204116c9edcd98ea20cbc5f29e5f25737f78a41 (commit)
via 3c286b1e7a1dbf68f57eca9d60e1c1bd49a4091c (commit)
via 39e04a65056d3c82ede8c283918e4dc505875b63 (commit)
via a2667f18957233bee80dd5214e20f3f031f0a354 (commit)
via 54890450e23da8642e3b4c8224e04a7af5d98d15 (commit)
via 83cb69c6ad02e607f0ca90848f72ae2f1c3a67c7 (commit)
via cb5b2410d4ae16aa9afa022c3b60cfb8d46d25e9 (commit)
from 019dcf49572404b1cb3c12aca4e7eaa052aeeedd (commit)
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-3-test
- Log -----------------------------------------------------------------
commit 7204116c9edcd98ea20cbc5f29e5f25737f78a41
Author: Michael Adam <obnox at samba.org>
Date: Sun Sep 21 02:07:43 2008 +0200
winbindd_group: don't list the domain twice when expanding internal aliases
Before this, "getent group builtin\\administrators" expanded
domain group members in the form DOMAIN\domain\user.
Michael
commit 3c286b1e7a1dbf68f57eca9d60e1c1bd49a4091c
Author: Michael Adam <obnox at samba.org>
Date: Sun Sep 21 02:06:44 2008 +0200
winbindd_group: sanely handle NULL domain in add_member().
Michael
commit 39e04a65056d3c82ede8c283918e4dc505875b63
Author: Michael Adam <obnox at samba.org>
Date: Mon Sep 22 10:39:37 2008 +0200
winbindd_ads: honour "winbind use default domain" in lookup_groupmem().
This fixes the output of "getent group" when "winbind use default domain = yes"
with security = ads.
Michael
commit a2667f18957233bee80dd5214e20f3f031f0a354
Author: Michael Adam <obnox at samba.org>
Date: Sun Sep 21 01:20:32 2008 +0200
winbindd_rpc: add domain prefix to username in lookup_groupmem().
This makes the output of "getent group" of a domain group show the
domain prefix with "security = domain".
Michael
commit 54890450e23da8642e3b4c8224e04a7af5d98d15
Author: Michael Adam <obnox at samba.org>
Date: Mon Sep 22 10:37:11 2008 +0200
winbindd_util: add fill_domain_username_talloc().
A talloc version of fill_domain_username().
Michael
commit 83cb69c6ad02e607f0ca90848f72ae2f1c3a67c7
Author: Michael Adam <obnox at samba.org>
Date: Mon Sep 22 10:36:32 2008 +0200
winbindd_util: add prototype for fill_domain_username_talloc().
A talloc version of fill_domain_username().
Michael
commit cb5b2410d4ae16aa9afa022c3b60cfb8d46d25e9
Author: Michael Adam <obnox at samba.org>
Date: Mon Sep 22 14:51:51 2008 +0200
winbindd: fix a comment typo
Michael
-----------------------------------------------------------------------
Summary of changes:
source/winbindd/winbindd_ads.c | 20 +++++++++++---------
source/winbindd/winbindd_async.c | 2 +-
source/winbindd/winbindd_group.c | 8 ++++++--
source/winbindd/winbindd_proto.h | 4 ++++
source/winbindd/winbindd_rpc.c | 5 ++++-
source/winbindd/winbindd_util.c | 27 +++++++++++++++++++++++++++
6 files changed, 53 insertions(+), 13 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source/winbindd/winbindd_ads.c b/source/winbindd/winbindd_ads.c
index 5f59ef3..18cc1cb 100644
--- a/source/winbindd/winbindd_ads.c
+++ b/source/winbindd/winbindd_ads.c
@@ -1044,10 +1044,11 @@ static NTSTATUS lookup_groupmem(struct winbindd_domain *domain,
DEBUG(10,("ads: lookup_groupmem: got sid %s from "
"cache\n", sid_string_dbg(&sid)));
sid_copy(&(*sid_mem)[*num_names], &sid);
- (*names)[*num_names] = talloc_asprintf(*names, "%s%c%s",
- domain_name,
- *lp_winbind_separator(),
- name );
+ (*names)[*num_names] = fill_domain_username_talloc(
+ *names,
+ domain_name,
+ name,
+ true);
(*name_types)[*num_names] = name_type;
(*num_names)++;
@@ -1092,11 +1093,12 @@ static NTSTATUS lookup_groupmem(struct winbindd_domain *domain,
{
sid_copy(&(*sid_mem)[*num_names],
&sid_mem_nocache[i]);
- (*names)[*num_names] = talloc_asprintf( *names,
- "%s%c%s",
- domains_nocache[i],
- *lp_winbind_separator(),
- names_nocache[i] );
+ (*names)[*num_names] =
+ fill_domain_username_talloc(
+ *names,
+ domains_nocache[i],
+ names_nocache[i],
+ true);
(*name_types)[*num_names] = name_types_nocache[i];
(*num_names)++;
}
diff --git a/source/winbindd/winbindd_async.c b/source/winbindd/winbindd_async.c
index 1481aed..7500bcb 100644
--- a/source/winbindd/winbindd_async.c
+++ b/source/winbindd/winbindd_async.c
@@ -366,7 +366,7 @@ static void lookupname_recv(TALLOC_CTX *mem_ctx, bool success,
/********************************************************************
The lookup name call first contacts a DC in its own domain
- and fallbacks to contact a DC in the forest in our domain doesn't
+ and fallbacks to contact a DC if the forest in our domain doesn't
know the name.
********************************************************************/
diff --git a/source/winbindd/winbindd_group.c b/source/winbindd/winbindd_group.c
index 25461d6..3422fdb 100644
--- a/source/winbindd/winbindd_group.c
+++ b/source/winbindd/winbindd_group.c
@@ -35,7 +35,11 @@ static void add_member(const char *domain, const char *user,
{
fstring name;
- fill_domain_username(name, domain, user, True);
+ if (domain != NULL) {
+ fill_domain_username(name, domain, user, True);
+ } else {
+ fstrcpy(name, user);
+ }
safe_strcat(name, ",", sizeof(name)-1);
string_append(pp_members, name);
*p_num_members += 1;
@@ -136,7 +140,7 @@ static void add_expanded_sid(const DOM_SID *sid,
continue;
}
- add_member(domain->name, names[i], pp_members, p_num_members);
+ add_member(NULL, names[i], pp_members, p_num_members);
}
done:
diff --git a/source/winbindd/winbindd_proto.h b/source/winbindd/winbindd_proto.h
index b0a08fd..66ab001 100644
--- a/source/winbindd/winbindd_proto.h
+++ b/source/winbindd/winbindd_proto.h
@@ -575,6 +575,10 @@ bool parse_domain_user_talloc(TALLOC_CTX *mem_ctx, const char *domuser,
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);
+char *fill_domain_username_talloc(TALLOC_CTX *ctx,
+ const char *domain,
+ const char *user,
+ bool can_assume);
const char *get_winbind_pipe_dir(void) ;
char *get_winbind_priv_pipe_dir(void) ;
int open_winbindd_socket(void);
diff --git a/source/winbindd/winbindd_rpc.c b/source/winbindd/winbindd_rpc.c
index df80ad8..9fbea8e 100644
--- a/source/winbindd/winbindd_rpc.c
+++ b/source/winbindd/winbindd_rpc.c
@@ -854,7 +854,10 @@ static NTSTATUS lookup_groupmem(struct winbindd_domain *domain,
}
for (r=0; r<tmp_names.count; r++) {
- (*names)[i+r] = CONST_DISCARD(char *, tmp_names.names[r].string);
+ (*names)[i+r] = fill_domain_username_talloc(mem_ctx,
+ domain->name,
+ tmp_names.names[r].string,
+ true);
(*name_types)[i+r] = tmp_types.ids[r];
}
diff --git a/source/winbindd/winbindd_util.c b/source/winbindd/winbindd_util.c
index d022a97..fdfc8ed 100644
--- a/source/winbindd/winbindd_util.c
+++ b/source/winbindd/winbindd_util.c
@@ -1229,6 +1229,33 @@ void fill_domain_username(fstring name, const char *domain, const char *user, bo
}
}
+/**
+ * talloc version of fill_domain_username()
+ * return NULL on talloc failure.
+ */
+char *fill_domain_username_talloc(TALLOC_CTX *mem_ctx,
+ const char *domain,
+ const char *user,
+ bool can_assume)
+{
+ char *tmp_user, *name;
+
+ tmp_user = talloc_strdup(mem_ctx, user);
+ strlower_m(tmp_user);
+
+ if (can_assume && assume_domain(domain)) {
+ name = tmp_user;
+ } else {
+ name = talloc_asprintf(mem_ctx, "%s%c%s",
+ domain,
+ *lp_winbind_separator(),
+ tmp_user);
+ TALLOC_FREE(tmp_user);
+ }
+
+ return name;
+}
+
/*
* Winbindd socket accessor functions
*/
--
Samba Shared Repository
More information about the samba-cvs
mailing list