diff options
author | Bo Yang <boyang@samba.org> | 2009-07-18 10:46:11 +0800 |
---|---|---|
committer | Bo Yang <boyang@samba.org> | 2009-07-18 10:47:45 +0800 |
commit | b180fe34a71a595d0dea8e72877149361b531e02 (patch) | |
tree | 8502cf9d811a72d9c4ac3f8b7aee8d26f3fab840 /source3/winbindd | |
parent | e7daa0d7049933e5a743f7e6db886f624490c53d (diff) | |
download | samba-b180fe34a71a595d0dea8e72877149361b531e02.tar.gz samba-b180fe34a71a595d0dea8e72877149361b531e02.tar.bz2 samba-b180fe34a71a595d0dea8e72877149361b531e02.zip |
s3: compile warning and upn handling
Signed-off-by: Bo Yang <boyang@samba.org>
Diffstat (limited to 'source3/winbindd')
-rw-r--r-- | source3/winbindd/winbindd_sid.c | 5 | ||||
-rw-r--r-- | source3/winbindd/winbindd_util.c | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/source3/winbindd/winbindd_sid.c b/source3/winbindd/winbindd_sid.c index c091cd7f53..f8cf7db920 100644 --- a/source3/winbindd/winbindd_sid.c +++ b/source3/winbindd/winbindd_sid.c @@ -93,6 +93,11 @@ void winbindd_lookupname(struct winbindd_cli_state *state) *p = 0; name_domain = state->request->data.name.name; name_user = p+1; + } else if ((p = strchr(state->request->data.name.name, '@')) != NULL) { + /* upn */ + name_domain = p + 1; + *p = 0; + name_user = state->request->data.name.name; } else { name_domain = state->request->data.name.dom_name; name_user = state->request->data.name.name; diff --git a/source3/winbindd/winbindd_util.c b/source3/winbindd/winbindd_util.c index 283eee09af..44ae814ae9 100644 --- a/source3/winbindd/winbindd_util.c +++ b/source3/winbindd/winbindd_util.c @@ -996,7 +996,8 @@ bool parse_domain_user(const char *domuser, fstring domain, fstring user) if ( assume_domain(lp_workgroup())) { fstrcpy(domain, lp_workgroup()); } else if ((p = strchr(domuser, '@')) != NULL) { - fstrcpy(domain, ""); + fstrcpy(domain, p + 1); + user[PTR_DIFF(p, domuser)] = 0; } else { return False; } |