Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 73273 - Ximian-connector 2.0.2-r1 fails without mail user domain name
Summary: Ximian-connector 2.0.2-r1 fails without mail user domain name
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High major (vote)
Assignee: Gentoo Linux Gnome Desktop Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-03 16:04 UTC by Andrew Esh
Modified: 2005-06-20 18:53 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Corrected patch to allow usernames without domain name prepended (2.0.2-exchange_auth.patch,630 bytes, patch)
2004-12-03 16:10 UTC, Andrew Esh
Details | Diff
Corrected patchfile (2.0.2-exchange_auth.patch,646 bytes, patch)
2004-12-03 16:26 UTC, Andrew Esh
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Esh 2004-12-03 16:04:32 UTC
The Ximian-connector 2.0.2-r1 ebuild applies a patch using "epatch ${FILESDIR}/${PV}-exchange_auth.patch". This patch causes the connector to include the Windows domain name in the authentication session. Unfortunately, for those of use who don't specify a domain name in the user name for our mail account, it causes the connector to fail completely, with a password error. This is because the code which fills the uri structure sets the domain name to null if it's not found. The correct patch is attached.

Reproducible: Always
Steps to Reproduce:
1. Be running Evolution with a simple user name like "Tex".
2. Emerge version 2.0.2-r1 of the connector.
3. Try to connect with Evolution again.

Actual Results:  
Password error observed.

Expected Results:  
No prompt for the password for the account. Inbox displayed.

I will attach a corrected patch file to the bug report.
Comment 1 Andrew Esh 2004-12-03 16:10:33 UTC
Created attachment 45229 [details, diff]
Corrected patch to allow usernames without domain name prepended

This patch fixes the code to work as intended, whether the user name has a
domain name prepended or not. It was applied manually in the middle of an
ebuild. The ebuild was then completed, and mail account connectivity was tested
with the domain name present and absent. Username formats tested were
"domainname/username" and "username".

NB: The patch was NOT tested in an actual emerge, since I can't sign the
Manifest file.
Comment 2 Andrew Esh 2004-12-03 16:24:20 UTC
Comment on attachment 45229 [details, diff]
Corrected patch to allow usernames without domain name prepended

>--- storage/exchange-account.c.orig	2004-10-11 00:21:46.000000000 -0500
>+++ storage/exchange-account.c	2004-12-03 17:39:22.000000000 -0600
>@@ -1507,7 +1507,12 @@
> 	 */
> 	account->priv->password_key = g_strdup_printf ("exchange://%s", account->priv->uri_authority);
> 
>-	account->priv->username = g_strdup (uri->user);
>+	if (uri->domain) {
>+		account->priv->username = g_strconcat (uri->domain, "\\", uri->user, 0);
>+	}
>+	else {
>+		account->priv->username = g_strdup (uri->user);
>+	}
> 	account->exchange_server = g_strdup (uri->host);
> 	if (uri->authmech && !strcmp (uri->authmech, "Basic"))
> 		account->priv->auth_pref = E2K_AUTOCONFIG_USE_BASIC;
Comment 3 Andrew Esh 2004-12-03 16:26:09 UTC
Created attachment 45230 [details, diff]
Corrected patchfile

This patchfile was tested in an emerge, and it applies cleanly.
Comment 4 Don Seiler (RETIRED) gentoo-dev 2004-12-09 07:23:30 UTC
I'm seeing authentication failure to our Exchange 2003 with this patch as well.

However my sys admin tells me that it is trying to authenticate with my OS username (dseiler), which isn't my windows domain username (dts).  I don't have my OS username anywhere in the evolution/ximian-connector config.

Downgrading to regular 2.0.2 works if I want to keep my username as just "dts".  2.0.2-r1 works if I change my username to DOMAIN\dts.

FWIW I've been on Exchange 2003 this whole time and authenticating just fine before this patch came along.
Comment 5 Andrew Esh 2005-05-24 12:46:46 UTC
(In reply to comment #4)
> FWIW I've been on Exchange 2003 this whole time and authenticating just fine
before this patch came along.

Your site probably doesn't contain more than one domain, or you are in the
default domain for the Exchange server.

FWIW: Domain-extended names (when required) are working correctly when entered
as the user name in Evolutiuon 2.2.1.1, so this patch isn't needed any longer.

Comment 6 John N. Laliberte (RETIRED) gentoo-dev 2005-06-16 06:37:54 UTC
does this still happen with 2.2.3 ? ( just marked stable )
Comment 7 Andrew Esh 2005-06-16 06:51:55 UTC
(In reply to comment #6)
> does this still happen with 2.2.3 ? ( just marked stable )

I went all out and put ~x86 on everything related to Evolution. I now have the
following package versions. Everything runs as I expect, with just the user name
set in the configuration. The code does the proper pre-pending of the domain
name. (I am also able to use the "secure password" authentication type.)

mail-client/evolution-2.2.2
gnome-extra/evolution-data-server-1.2.3
mail-client/ximian-connector-2.2.3
gnome-extra/libgtkhtml-3.6.2
gnome-extra/gal-2.4.2

This set has given me the most stable and bug free Evolution I have had yet.
Once these package come out from under ~x86, this bug can be closed.



Comment 8 John N. Laliberte (RETIRED) gentoo-dev 2005-06-20 18:53:29 UTC
the original problem was fixed by making 2.2.3 stable ( imo ), so the original
issue is resolved.