summaryrefslogtreecommitdiff
path: root/source3/winbindd/winbindd_group.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2008-01-04 19:06:37 -0800
committerJeremy Allison <jra@samba.org>2008-01-04 19:06:37 -0800
commit01afb07321a5af0fdd46fb30bda9419b553c1d5c (patch)
treed685c6a6dfd5674e9394f850ccad999330c7e97c /source3/winbindd/winbindd_group.c
parent06f80cf8becc84672aad9d8703e1a2fbc80af20c (diff)
parent3d40b197b0312967c8d22af73f18414a9fe053bb (diff)
downloadsamba-01afb07321a5af0fdd46fb30bda9419b553c1d5c.tar.gz
samba-01afb07321a5af0fdd46fb30bda9419b553c1d5c.tar.bz2
samba-01afb07321a5af0fdd46fb30bda9419b553c1d5c.zip
Merge branch 'v3-2-test' of ssh://jra@git.samba.org/data/git/samba into v3-2-test
(This used to be commit 3a45f62310faf63cd6864d2cb10f941492eda818)
Diffstat (limited to 'source3/winbindd/winbindd_group.c')
-rw-r--r--source3/winbindd/winbindd_group.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/source3/winbindd/winbindd_group.c b/source3/winbindd/winbindd_group.c
index fbd2fee692..62e8d1c40b 100644
--- a/source3/winbindd/winbindd_group.c
+++ b/source3/winbindd/winbindd_group.c
@@ -1494,9 +1494,18 @@ void winbindd_getgroups(struct winbindd_cli_state *state)
s->username = talloc_strdup( state->mem_ctx, state->request.data.username );
}
- /* Get info for the domain */
+ /* Get info for the domain (either by short domain name or
+ DNS name in the case of a UPN) */
s->domain = find_domain_from_name_noinit(s->domname);
+ if (!s->domain) {
+ char *p = strchr(s->username, '@');
+
+ if (p) {
+ s->domain = find_domain_from_name_noinit(p+1);
+ }
+
+ }
if (s->domain == NULL) {
DEBUG(7, ("could not find domain entry for domain %s\n",