The branch, v3-5-test has been updated via 67a9d4b s3-libnet: fix bug #6364: Pull realm from supplied username on libnet join from 4f0077c s3-printing: remove duplicate cups response processing code
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=v3-5-test - Log ----------------------------------------------------------------- commit 67a9d4bb376d89c4411024164165ca1ed7a0b157 Author: Jim McDonough <j...@samba.org> Date: Thu May 26 20:29:24 2011 +0200 s3-libnet: fix bug #6364: Pull realm from supplied username on libnet join ----------------------------------------------------------------------- Summary of changes: source3/libnet/libnet_join.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) Changeset truncated at 500 lines: diff --git a/source3/libnet/libnet_join.c b/source3/libnet/libnet_join.c index 736a919..f14bffd 100644 --- a/source3/libnet/libnet_join.c +++ b/source3/libnet/libnet_join.c @@ -103,6 +103,7 @@ static ADS_STATUS libnet_connect_ads(const char *dns_domain_name, { ADS_STATUS status; ADS_STRUCT *my_ads = NULL; + char *cp; my_ads = ads_init(dns_domain_name, netbios_domain_name, @@ -114,6 +115,12 @@ static ADS_STATUS libnet_connect_ads(const char *dns_domain_name, if (user_name) { SAFE_FREE(my_ads->auth.user_name); my_ads->auth.user_name = SMB_STRDUP(user_name); + if ((cp = strchr_m(my_ads->auth.user_name, '@'))!=0) { + *cp++ = '\0'; + SAFE_FREE(my_ads->auth.realm); + my_ads->auth.realm = smb_xstrdup(cp); + strupper_m(my_ads->auth.realm); + } } if (password) { -- Samba Shared Repository