Milan Crha | 9 Apr 12:52 2010
Picon

[openchange]RegisterNotification needs a session/context parameter

	Hi,
I would like to use notification on multiple connections (sessions) to
multiple servers, but the RegisterNotification function has only a
parameter ulEventMask, but not the session to which I want run it, so it
chooses some semi-random session from the session pool and registers it
there. It actually only tries to register it, because it crashes to me
when I try with two servers:

Thread 17 (Thread 0xb12f9b70 (LWP 13787)):
#0  0x0064c424 in __kernel_vsyscall ()
#1  0x02d84a81 in raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
#2  0x02d8634a in abort () at abort.c:92
#3  0x01805871 in tevent_abort (ev=0x889eba8, reason=0xb5b2f320 "tevent_loop_once() nesting at
librpc/rpc/dcerpc.c:1144") at tevent.c:340
#4  0x01805aba in tevent_abort_nesting (ev=0x889eba8, location=0x180d420
"librpc/rpc/dcerpc.c:1144") at tevent.c:454
#5  0x01805b14 in _tevent_loop_once (ev=0x889eba8, location=0x180d420 "librpc/rpc/dcerpc.c:1144")
at tevent.c:469
#6  0x01263030 in dcerpc_request_recv (req=0xb5b2f458, mem_ctx=0x8816990, stub_data=0xb12f9034) at librpc/rpc/dcerpc.c:1144
#7  0x01263df2 in dcerpc_ndr_request_recv (req=0xb5b2f458) at librpc/rpc/dcerpc.c:1459
#8  0x01264181 in dcerpc_ndr_request (p=0x889efa8, object=0x0, table=0x552d100, opnum=4,
mem_ctx=0x8816990, r=0xb12f9150) at librpc/rpc/dcerpc.c:1544
#9  0x054dd9b4 in dcerpc_EcRRegisterPushNotification (p=<value optimized out>, mem_ctx=<value
optimized out>, r=<value optimized out>)
    at gen_ndr/ndr_exchange_c.c:1861
#10 0x05455d23 in emsmdb_register_notification (notifkey=<value optimized out>,
ulEventMask=<value optimized out>) at libmapi/emsmdb.c:486
#11 0x0544b637 in RegisterNotification (ulEventMask=<value optimized out>) at libmapi/IMSProvider.c:399

Thread 9 (Thread 0xb26fbb70 (LWP 13772)):
(Continue reading)

Julien Kerihuel | 9 Apr 12:54 2010

Re: [openchange]RegisterNotification needs a session/context parameter

Hi Milan,

Thanks for the report. I'll check with Ali why trac still forbid from
registering.

Regarding the problem, I'll have a look at this and get back to you
quickly.

Hopefully today if no critical assignment come up in my TODO list.

Cheers,
Julien.

On Fri, 2010-04-09 at 12:52 +0200, Milan Crha wrote:
> 	Hi,
> I would like to use notification on multiple connections (sessions) to
> multiple servers, but the RegisterNotification function has only a
> parameter ulEventMask, but not the session to which I want run it, so it
> chooses some semi-random session from the session pool and registers it
> there. It actually only tries to register it, because it crashes to me
> when I try with two servers:
> 
> Thread 17 (Thread 0xb12f9b70 (LWP 13787)):
> #0  0x0064c424 in __kernel_vsyscall ()
> #1  0x02d84a81 in raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64
> #2  0x02d8634a in abort () at abort.c:92
> #3  0x01805871 in tevent_abort (ev=0x889eba8, reason=0xb5b2f320 "tevent_loop_once() nesting at
librpc/rpc/dcerpc.c:1144") at tevent.c:340
> #4  0x01805aba in tevent_abort_nesting (ev=0x889eba8, location=0x180d420
"librpc/rpc/dcerpc.c:1144") at tevent.c:454
(Continue reading)

Milan Crha | 9 Apr 13:57 2010
Picon

Re: [openchange]RegisterNotification needs a session/context parameter

On Fri, 2010-04-09 at 12:54 +0200, Julien Kerihuel wrote:
> Regarding the problem, I'll have a look at this and get back to you
> quickly.
> 
> Hopefully today if no critical assignment come up in my TODO list.

	Hi,
it seems to me, but I do not know the code so close, that also other
functions are using the first session in the global context, so if you
can, please check around the code.

And when talking about contexts, I didn't find a way how to close (and
disconnect) from a server properly. Actually, for disconnect it seems to
work fine with Logoff on a store, but still, it's not clear how to close
and free a session object itself.

Am I just missing something, overlooked some function, or there is none?
The Logoff seems to remove the session from a list, but what if I do not
have a store?

Also, this seems to me as a typo: 
libmapi/cdo_mapi.c:132:		el = talloc_zero((TALLOC_CTX *)global_mapi_ctx->session, struct mapi_session);
because global_mapi_ctx->session isn't a mem_ctx, is it?

	Thanks and bye,
	Milan
Beat Flepp | 9 Apr 19:44 2010

[openchange]Outlook 2007/MAPIProxy NT_STATUS_IO_TIMEOUT Problem

Hi,

I'm running into a problem when trying to connect Outlook 2007 through 
MAPIProxy to an Exchange 2007 server.

The MAPIProxy log shows an entry:

auth_check_password_recv: winbind authentication for user [mmlnj\flepp] FAILED 
with error NT_STATUS_IO_TIMEOUT
dcesrv_auth_auth3: failed to authenticate: NT_STATUS_IO_TIMEOUT

My setup is:

Outlook (192.168.102.58) <--> MAPIProxy (192.168.102.57) <--> Exchange 
(192.168.102.53)

Below are detailed informations about this setup.

Direct connection from Outlook to Exchange with the same user/password works 
fine.

I also have attached the following files:

smb.conf
start-samba.txt (Samba startup log)
outlook-check-name.txt (Samba log when connecting with Outlook which shows the 
above error)
mapiproxy.pcap (Wireshark packet dump)

>From the WireShark log (mapiproxy.pcap) I can see that the SMB_NETLOGON request 
(Continue reading)

Milan Crha | 19 Apr 18:02 2010
Picon

[openchange]cast_mapi_SPropValue doesn't handle all types

	Hi,
while I'm trying to implement a distribution list reading/writing in
evolution-mapi I realized that cast_mapi_SPropValue doesn't handle all
property types. The PidLidDistributionListMembers is of type
PT_MV_BINARY, and casting it loses fetched information.

Please update cast functions to support all known types. Thanks in
advance.
	Bye,
	Milan
Brad Hards | 19 Apr 22:56 2010
Picon

Re: [openchange]cast_mapi_SPropValue doesn't handle all types

On Tuesday 20 April 2010 02:02:21 am Milan Crha wrote:
> 	Hi,
> while I'm trying to implement a distribution list reading/writing in
> evolution-mapi I realized that cast_mapi_SPropValue doesn't handle all
> property types. The PidLidDistributionListMembers is of type
> PT_MV_BINARY, and casting it loses fetched information.
Indeed. I have a couple of changes for cast_SPropValue() including 
PT_MV_BINARY, but not cast_mapi_SPropValue().

> Please update cast functions to support all known types. Thanks in
> advance.
I've only been adding them when I can test (because of the difficulty in making 
sure I got it right). I'll try this PidLidDistributionListMembers

Brad
Milan Crha | 20 Apr 10:22 2010
Picon

Re: [openchange]cast_mapi_SPropValue doesn't handle all types

On Tue, 2010-04-20 at 06:56 +1000, Brad Hards wrote:
> > Please update cast functions to support all known types. Thanks in
> > advance.
> I've only been adding them when I can test (because of the difficulty in making 
> sure I got it right). I'll try this PidLidDistributionListMembers

	Hi,
I used this code for my case (I moved it to evolution-mapi itself then):

+	case PT_MV_BINARY:
+		{
+			uint32_t	i;
+			uint32_t	size = 0;
+
+			mapi_sprop->value.MVbin.cValues = sprop->value.MVbin.cValues;
+			size += 4;
+
+			mapi_sprop->value.MVbin.bin = talloc_array(global_mapi_ctx->mem_ctx, struct Binary_r, mapi_sprop->value.MVbin.cValues);
+			for (i = 0; i < mapi_sprop->value.MVbin.cValues; i++) {
+				mapi_sprop->value.MVbin.bin[i].cb = sprop->value.MVbin.lpbin[i].cb;
+				mapi_sprop->value.MVbin.bin[i].lpb = sprop->value.MVbin.lpbin[i].lpb;
+				size += sprop->value.MVbin.lpbin[i].cb + sizeof (uint16_t);
+			}
+			return size;
+		}

but there are still few types missing.
	Bye,
	Milan
(Continue reading)

Milan Crha | 20 Apr 17:49 2010
Picon

Re: [openchange]cast_mapi_SPropValue doesn't handle all types

On Tue, 2010-04-20 at 10:22 +0200, Milan Crha wrote:
> I used this code for my case (I moved it to evolution-mapi itself then):

	Hi.
Ah, bad, the SetProps is also using cast_mapi_SPropValue, thus my
workaround on GetProps isn't enough, and I'm loosing information on
write of PT_MV_BINARY properties. With the earlier code added to
OpenChange all seems to work fine.

(Just a little update on recent findings.)
	Bye,
	Milan
Milan Crha | 21 Apr 20:28 2010
Picon

[openchange]set_SPropValue doesn't handle PT_DOUBLE

	Hi,
while doing other cleanup I found a note in the evolution-mapi code:
/* FIXME: bug in LibMAPI - does not handle PT_DOUBLE in set_SPropValue()
*/
//		set_SPropValue_proptag(&props[i++],
proptag_array->aulPropTag[PidLidPercentComplete], (gconstpointer ) &d);
		props[i].ulPropTag = proptag_array->aulPropTag[PidLidPercentComplete];
		props[i].dwAlignPad = 0x0;
		memcpy (&(props[i].value.dbl), &d, sizeof(double));

Please add a fix for that (and others?).
	Thanks in advance,
	Milan
Brad Hards | 28 Apr 13:11 2010
Picon

Re: [openchange]cast_mapi_SPropValue doesn't handle all types

On Tuesday 20 April 2010 06:22:02 pm Milan Crha wrote:
> 	Hi,
> I used this code for my case (I moved it to evolution-mapi itself then):
I'm about to merge this, but I have one question.

> +	case PT_MV_BINARY:
> +		{
> +			uint32_t	i;
> +			uint32_t	size = 0;
> +
> +			mapi_sprop->value.MVbin.cValues = sprop->value.MVbin.cValues;
> +			size += 4;
> +
> +			mapi_sprop->value.MVbin.bin = talloc_array(global_mapi_ctx-
>mem_ctx, struct Binary_r, mapi_sprop->value.MVbin.cValues); 
Why struct Binary_r here? This is producing a compiler warning for me. I'm 
planning to use struct SBinary_short, which is probably functionally 
equivalent.

Brad

Gmane