After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 585615 - Exchange MAPI account setup gets wrong userid in database
Exchange MAPI account setup gets wrong userid in database
Status: RESOLVED FIXED
Product: evolution-mapi
Classification: Applications
Component: Account Setup Plugin
0.26.x
Other All
: High critical
: ---
Assigned To: Johnny Jacob
evolution-mapi-maint
: 586807 624955 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2009-06-13 01:11 UTC by Fred Odendaal
Modified: 2010-07-22 03:50 UTC
See Also:
GNOME target: ---
GNOME version: 2.25/2.26


Attachments
Show a list of available users (8.46 KB, patch)
2009-06-24 13:20 UTC, Johnny Jacob
none Details | Review

Description Fred Odendaal 2009-06-13 01:11:40 UTC
Steps to reproduce:
1. Start evolution with no accounts - Evolution Setup Assistant starts.
2. Fill in the Identity page and click "Forward"
3. On the Receiving Email page Select "Exchange MAPI" as the server type and fill
in the Server, Username and Domain name information.
4. Hit "Authenticate".
5. Provide your password at the prompt and it crashes.

Stack trace:
Distribution: Fedora release 11 (Leonidas)
Gnome Release: 2.26.1 2009-04-29 (Red Hat, Inc)
BugBuddy Version: 2.26.0

System: Linux 2.6.29.4-167.fc11.i586 #1 SMP Wed May 27 17:14:37 EDT 2009 i686
X Vendor: The X.Org Foundation
X Vendor Release: 10601901
Selinux: No
Accessibility: Disabled
GTK+ Theme: Nodoka
Icon Theme: Fedora
GTK+ Modules: canberra-gtk-module, pk-gtk-module, gnomebreakpad

Memory status: size: 0 vsize: 0 resident: 0 share: 0 rss: 0 rss_rlim: 0
CPU usage: start_time: 0 rtime: 0 utime: 0 stime: 0 cutime:0 cstime: 0 timeout: 0 it_real_value: 0 frequency: 0



----------- .xsession-errors (27 sec old) ---------------------
** (evolution:15662): DEBUG: MAPI listener is constructed with 0 listed MAPI accounts 
** (evolution:15662): DEBUG: mailto URL command: evolution --component=mail %s
** (evolution:15662): DEBUG: mailto URL program: evolution
e-data-server-ui-Message: Unable to find password(s) in keyring (Keyring reports: No matching results)
e-data-server-ui-Message: Key file does not have group 'Passwords-ExchangeMAPI'
Create profile with fredo AD3 123.45.67.89
libexchangemapi-Message: exchange-mapi-connection.c:2874: exchange_mapi_create_profile: lock(connect_lock)
Logging into the server... succeeded 
libexchangemapi-Message: exchange-mapi-connection.c:146: exchange_mapi_connection_close: lock(connect_lock)
libexchangemapi-Message: exchange-mapi-connection.c:149: exchange_mapi_connection_close: unlock(connect_lock)
libexchangemapi-Message: exchange-mapi-connection.c:130: exchange_mapi_connection_new: lock(connect_lock)
exchange-mapi-connection.c:75: Entering mapi_profile_load 
Loading profile fredo@AD3     EcDoConnect              : ecLoginPerm (0x3F2)
    MapiLogonEx              : MAPI_E_LOGON_FAILED (0x80040111)
--------------------------------------------------


Other information:
When I use the openchange client program to create a profile (using mapiprofile) it finds 2 possible userids and prompts me to select one. The prompt is similar to the following:

Select a user id:
	[0] FREDOR DAVID
	[1] ODENDAAL Fred
	[2] cancel operation
Enter username id [0]: 1
Profile fredo@AD3 completed and added to database /users/fredo/.openchange/profiles.ldb

When I compare this profile to the one created by the setup assistant in ~/.evolution/mapi-profiles.ldb I see that the mailbox is incorrect and correlates to the first user in the above list. ie:

Correct Profile:
	username       == fredo
	password       == secret
	mailbox        == /o=GME/ou=NA-AG1/cn=Recipients/cn=fredo
	workstation    == localhost
	domain         == AD3
	server         == 123.45.67.89

Incorrect Profile:
	username       == fredo
	password       == secret
	mailbox        == /o=GME/ou=EU-AG1/cn=Recipients/cn=afredor
	workstation    == localhost
	domain         == AD3
	server         == 123.45.67.89

Note that I've changed usernames, the server and password because it would be silly to post them here. This is only meant as an example to illustrate what's going on.
Comment 1 Akhil Laddha 2009-06-15 04:55:35 UTC
Thanks for taking the time to report this bug.
Without a stack trace from the crash it's very hard to determine what caused it.
Can you get us a stack trace? Please see http://live.gnome.org/GettingTraces for more information on how to do so. Thanks in advance!
Comment 2 Fred Odendaal 2009-06-16 14:09:23 UTC
Note this bug looks very similar to #585639.

Here is the stack trace for my occurrence of the bug (with passwords,and ip addresses replaced):

Distribution: Fedora release 11 (Leonidas)
Gnome Release: 2.26.1 2009-04-29 (Red Hat, Inc)
BugBuddy Version: 2.26.0

System: Linux 2.6.29.4-167.fc11.i586 #1 SMP Wed May 27 17:14:37 EDT 2009 i686
X Vendor: The X.Org Foundation
X Vendor Release: 10601901
Selinux: No
Accessibility: Disabled
GTK+ Theme: Nodoka
Icon Theme: Fedora
GTK+ Modules: canberra-gtk-module, pk-gtk-module, gnomebreakpad

Memory status: size: 149626880 vsize: 149626880 resident: 31346688 share: 21389312 rss: 31346688 rss_rlim: 18446744073709551615
CPU usage: start_time: 1245160393 rtime: 230 utime: 203 stime: 27 cutime:0 cstime: 0 timeout: 0 it_real_value: 0 frequency: 100

Backtrace was generated from '/usr/bin/evolution'

[Thread debugging using libthread_db enabled]
[New Thread 0xb70ffb70 (LWP 3434)]
[New Thread 0xb7c04b70 (LWP 3433)]
0x00286422 in __kernel_vsyscall ()

Thread 1 (Thread 0xb7f8a770 (LWP 3429))

  • #0 __kernel_vsyscall
  • #1 waitpid
    from /lib/libpthread.so.0
  • #2 g_spawn_sync
    from /lib/libglib-2.0.so.0
  • #3 g_spawn_command_line_sync
    from /lib/libglib-2.0.so.0
  • #4 ??
    from /usr/lib/gtk-2.0/modules/libgnomebreakpad.so
  • #5 ??
    from /usr/lib/gtk-2.0/modules/libgnomebreakpad.so
  • #6 segv_redirect
    at main.c line 426
  • #7 <signal handler called>
  • #8 emsmdb_disconnect_dtor
    from /usr/lib/libmapi.so.0
  • #9 ??
    from /usr/lib/libdcerpc.so.0
  • #10 ??
    from /usr/lib/libdcerpc.so.0
  • #11 ??
    from /usr/lib/libdcerpc.so.0
  • #12 talloc_free
    from /usr/lib/libdcerpc.so.0
  • #13 MAPIUninitialize
    from /usr/lib/libmapi.so.0
  • #14 mapi_profile_load
    at exchange-mapi-connection.c line 113
  • #15 exchange_mapi_connection_new
    at exchange-mapi-connection.c line 132
  • #16 exchange_mapi_create_profile
    at exchange-mapi-connection.c line 2954
  • #17 validate_credentials
    at exchange-mapi-account-setup.c line 129
  • #18 g_cclosure_marshal_VOID__VOID
    from /lib/libgobject-2.0.so.0
  • #19 g_closure_invoke
    from /lib/libgobject-2.0.so.0
  • #20 ??
    from /lib/libgobject-2.0.so.0
  • #21 g_signal_emit_valist
    from /lib/libgobject-2.0.so.0
  • #22 g_signal_emit
    from /lib/libgobject-2.0.so.0
  • #23 gtk_button_clicked
    from /usr/lib/libgtk-x11-2.0.so.0
  • #24 ??
    from /usr/lib/libgtk-x11-2.0.so.0
  • #25 g_cclosure_marshal_VOID__VOID
    from /lib/libgobject-2.0.so.0
  • #26 ??
    from /lib/libgobject-2.0.so.0
  • #27 g_closure_invoke
    from /lib/libgobject-2.0.so.0
  • #28 ??
    from /lib/libgobject-2.0.so.0
  • #29 g_signal_emit_valist
    from /lib/libgobject-2.0.so.0
  • #30 g_signal_emit
    from /lib/libgobject-2.0.so.0
  • #31 gtk_button_released
    from /usr/lib/libgtk-x11-2.0.so.0
  • #32 ??
    from /usr/lib/libgtk-x11-2.0.so.0
  • #33 ??
    from /usr/lib/libgtk-x11-2.0.so.0
  • #34 ??
    from /lib/libgobject-2.0.so.0
  • #35 g_closure_invoke
    from /lib/libgobject-2.0.so.0
  • #36 ??
    from /lib/libgobject-2.0.so.0
  • #37 g_signal_emit_valist
    from /lib/libgobject-2.0.so.0
  • #38 g_signal_emit
    from /lib/libgobject-2.0.so.0
  • #39 ??
    from /usr/lib/libgtk-x11-2.0.so.0
  • #40 gtk_propagate_event
    from /usr/lib/libgtk-x11-2.0.so.0
  • #41 gtk_main_do_event
    from /usr/lib/libgtk-x11-2.0.so.0
  • #42 ??
    from /usr/lib/libgdk-x11-2.0.so.0
  • #43 g_main_context_dispatch
    from /lib/libglib-2.0.so.0
  • #44 ??
    from /lib/libglib-2.0.so.0
  • #45 g_main_loop_run
    from /lib/libglib-2.0.so.0
  • #46 gtk_main
    from /usr/lib/libgtk-x11-2.0.so.0
  • #47 startup_wizard
    at startup-wizard.c line 97
  • #48 epl_invoke
    at e-plugin.c line 1055
  • #49 e_plugin_invoke
    at e-plugin.c line 768
  • #50 emph_event_handle
    at e-event.c line 402
  • #51 e_event_emit
    at e-event.c line 288
  • #52 e_shell_attempt_upgrade
    at e-shell.c line 914
  • #53 e_shell_construct
    at e-shell.c line 696
  • #54 e_shell_new
    at e-shell.c line 744
  • #55 idle_cb
    at main.c line 336
  • #56 ??
    from /lib/libglib-2.0.so.0
  • #57 g_main_context_dispatch
    from /lib/libglib-2.0.so.0
  • #58 ??
    from /lib/libglib-2.0.so.0
  • #59 g_main_loop_run
    from /lib/libglib-2.0.so.0
  • #60 bonobo_main
    from /usr/lib/libbonobo-2.so.0
  • #61 main
    at main.c line 704


----------- .xsession-errors (31 sec old) ---------------------
Try: yum --enablerepo='*-debuginfo' install /usr/lib/debug/.build-id/f0/960a1274004132cee9b5dfcaa7abaa5deca4a8.debug
Missing separate debuginfo for /usr/lib/sasl2/libplain.so
Try: yum --enablerepo='*-debuginfo' install /usr/lib/debug/.build-id/16/d7fc6483fdca795056878bb17eceae5aa1cee9.debug
Missing separate debuginfo for /usr/lib/sasl2/liblogin.so
Try: yum --enablerepo='*-debuginfo' install /usr/lib/debug/.build-id/de/fa88b8db2c89555865ba252461cb3f1a651b94.debug
Missing separate debuginfo for /usr/lib/sasl2/libdigestmd5.so
Try: yum --enablerepo='*-debuginfo' install /usr/lib/debug/.build-id/72/d824a62932674b9a96cd8e5905410301e0512a.debug
Missing separate debuginfo for /usr/lib/sasl2/libsasldb.so
Try: yum --enablerepo='*-debuginfo' install /usr/lib/debug/.build-id/18/126aff8381fc6eedcd319a4e5c8be402845d6c.debug
Missing separate debuginfo for /usr/lib/sasl2/libcrammd5.so
Try: yum --enablerepo='*-debuginfo' install /usr/lib/debug/.build-id/69/85c5f5b14fba906fc6aa273d67eb6078b9bb95.debug
Missing separate debuginfo for /usr/lib/sasl2/libanonymous.so
Try: yum --enablerepo='*-debuginfo' install /usr/lib/debug/.build-id/84/2afbefde48736a5e9d59e2aa8a65e50d5d2de1.debug
Missing separate debuginfo for /usr/lib/gconv/IBM850.so
Try: yum --enablerepo='*-debuginfo' install /usr/lib/debug/.build-id/9a/37891a5abf4a83bbfb433263fdc28da2b6b8d3.debug
--------------------------------------------------
 
Comment 3 Johnny Jacob 2009-06-22 06:57:46 UTC
Confirming : 'Wrong user-id in database' which results in a ecLoginPerm (0x3F2).
Comment 4 Akhil Laddha 2009-06-24 04:13:17 UTC
*** Bug 586807 has been marked as a duplicate of this bug. ***
Comment 5 scott 2009-06-24 04:43:27 UTC
I was a creator of duplicate bug: 586807 and what I noticed was that the profile creation seems to do a 'starts-with' to find the matching user details. In my example, my samAccountName in A.D. is shamilton1, but the enumeration returned also included accounts for shamilton10, shamilton11, shamilton12, it was unfortunate that my account was the third listed and evolution-mapi only took the first item in the list. It also seemed to use the entire forest, not the just the domain I had specified. Those other accounts existed on a different domain within the same forest. 
Comment 6 Johnny Jacob 2009-06-24 04:54:39 UTC
(In reply to comment #5)
> I was a creator of duplicate bug: 586807 and what I noticed was that the
> profile creation seems to do a 'starts-with' to find the matching user details.
> In my example, my samAccountName in A.D. is shamilton1, but the enumeration
> returned also included accounts for shamilton10, shamilton11, shamilton12, it
> was unfortunate that my account was the third listed and evolution-mapi only
> took the first item in the list. It also seemed to use the entire forest, not
> the just the domain I had specified. Those other accounts existed on a
> different domain within the same forest. 
> 

Yup, It seems to do a search like that and we've been taking the first entry by default. I have a patch ready which will popup a dialog asking you to choose the username. I'll post it in few hours.
Comment 7 Johnny Jacob 2009-06-24 13:20:24 UTC
Created attachment 137312 [details] [review]
Show a list of available users

The crash is not fixed yet.
Comment 8 Johnny Jacob 2009-07-13 10:49:29 UTC
Patch needs another column displaying the 'username' . 

Marking other patch as obsolete.
Comment 9 Johnny Jacob 2009-08-05 16:20:08 UTC
Committed the patch. But the crash still exists. 
Comment 10 Akhil Laddha 2009-11-10 11:28:58 UTC
Johnny, ping, any updates with respect to comment#8
Comment 11 Milan Crha 2009-12-08 15:24:02 UTC
I notices Johnny talking about some issues with linking of krb5_... functions or something, within a very similar context like this crash. So if the initial issue with wrong username is fixed, then the crash should be treated in the different bug report, shouldn't it? (and is most likely fixed by some compiler flag or what was that).

Johnny?
Comment 12 Johnny Jacob 2009-12-09 04:23:58 UTC
(In reply to comment #11)
> I notices Johnny talking about some issues with linking of krb5_... functions
> or something, within a very similar context like this crash. So if the initial
> issue with wrong username is fixed, then the crash should be treated in the
> different bug report, shouldn't it? (

This is a different crash caused by uneven calls of initialize and uninitialize.
Comment 13 Milan Crha 2010-06-02 12:36:47 UTC
Fred/Scott, could you retest with evolution-mapi 0.30.0 or later and report back, please? I mean with respect of multiple users, not with respect of the crash, which is part of another bug report. Thanks in advance.
Comment 14 scott 2010-06-03 07:42:52 UTC
Tried OpenSuSE 11.2 factory build of Evolution 2.30.1 and MAPI 2.30.1.1 and the pop-up dialog does allow me to select the correct user and then authenticate correctly.

Many thanks
S.
Comment 15 Milan Crha 2010-06-03 08:36:57 UTC
Thanks for testing this, I'm closing the bug as fixed.
Comment 16 Milan Crha 2010-07-09 06:45:23 UTC
This doesn't seem to work on actual master, but it works fine on 2.28. Probably something broke meanwhile. I'm reopening this bug report.
Comment 17 Milan Crha 2010-07-09 07:23:22 UTC
Hmm, it was changed within:
> commit 3cc84768dee62686fb8f4848bc4f0e2006a62c27
> Author: Johnny Jacob
> Date:   Thu Dec 10 11:47:50 2009 +0530
>
> Account Setup : If we can find the username in the list of possible
> matches, return the index.
>    
> Avoids a dialog being poped up when user has typed in the right information.

and is part of 0.29.5+. Because Scott claims it works fine for him with 0.30, then I'm closing this again. I'm sorry for a noise.
Comment 18 Akhil Laddha 2010-07-22 03:50:26 UTC
*** Bug 624955 has been marked as a duplicate of this bug. ***