Re: [devel] [PATCH 6 of 7] NTF: Add ntftest test cases for notification, with long dn objects [#873] v2

2014-08-01 Thread Anders Widell
On 07/31/2014 02:19 PM, praveen malviya wrote: On 31-Jul-14 5:31 PM, Anders Widell wrote: On 07/31/2014 01:40 PM, praveen malviya wrote: On 31-Jul-14 3:47 PM, Anders Widell wrote: I am leaning towards your suggested solution for SA_NTF_VALUE_LDAP_NAME now. :-) It will be the easiest one

Re: [devel] [PATCH 6 of 7] NTF: Add ntftest test cases for notification, with long dn objects [#873] v2

2014-08-01 Thread minhchau
On 8/1/2014 5:19 PM, Anders Widell wrote: On 07/31/2014 02:19 PM, praveen malviya wrote: On 31-Jul-14 5:31 PM, Anders Widell wrote: On 07/31/2014 01:40 PM, praveen malviya wrote: On 31-Jul-14 3:47 PM, Anders Widell wrote: I am leaning towards your suggested solution for

Re: [devel] [PATCH 6 of 7] NTF: Add ntftest test cases for notification, with long dn objects [#873] v2

2014-08-01 Thread praveen malviya
On 01-Aug-14 1:59 PM, minhchau wrote: On 8/1/2014 5:19 PM, Anders Widell wrote: On 07/31/2014 02:19 PM, praveen malviya wrote: On 31-Jul-14 5:31 PM, Anders Widell wrote: On 07/31/2014 01:40 PM, praveen malviya wrote: On 31-Jul-14 3:47 PM, Anders Widell wrote: I am leaning towards your

Re: [devel] [PATCH 6 of 7] NTF: Add ntftest test cases for notification, with long dn objects [#873] v2

2014-08-01 Thread Anders Widell
On 08/01/2014 10:29 AM, minhchau wrote: On 8/1/2014 5:19 PM, Anders Widell wrote: On 07/31/2014 02:19 PM, praveen malviya wrote: On 31-Jul-14 5:31 PM, Anders Widell wrote: On 07/31/2014 01:40 PM, praveen malviya wrote: On 31-Jul-14 3:47 PM, Anders Widell wrote: I am leaning towards your

Re: [devel] [PATCH 6 of 7] NTF: Add ntftest test cases for notification, with long dn objects [#873] v2

2014-07-31 Thread Anders Widell
saAisNameLend() adds a terminating NUL character, so I think you would still need strlen(saAisNameBorrow(name)) + 2 + 1 even with Praveen's patch, otherwise saAisNameLend() will write one byte past the end of the allocated buffer when the string is shorter than 256 bytes. Another concern is,

Re: [devel] [PATCH 6 of 7] NTF: Add ntftest test cases for notification, with long dn objects [#873] v2

2014-07-31 Thread praveen malviya
On 31-Jul-14 1:39 PM, Anders Widell wrote: saAisNameLend() adds a terminating NUL character, so I think you would still need strlen(saAisNameBorrow(name)) + 2 + 1 even with Praveen's patch, otherwise saAisNameLend() will write one byte past the end of the allocated buffer when the string

Re: [devel] [PATCH 6 of 7] NTF: Add ntftest test cases for notification, with long dn objects [#873] v2

2014-07-31 Thread Anders Widell
On 07/31/2014 11:10 AM, praveen malviya wrote: On 31-Jul-14 1:39 PM, Anders Widell wrote: saAisNameLend() adds a terminating NUL character, so I think you would still need strlen(saAisNameBorrow(name)) + 2 + 1 even with Praveen's patch, otherwise saAisNameLend() will write one byte past

Re: [devel] [PATCH 6 of 7] NTF: Add ntftest test cases for notification, with long dn objects [#873] v2

2014-07-31 Thread praveen malviya
On 31-Jul-14 2:50 PM, Anders Widell wrote: On 07/31/2014 11:10 AM, praveen malviya wrote: On 31-Jul-14 1:39 PM, Anders Widell wrote: saAisNameLend() adds a terminating NUL character, so I think you would still need strlen(saAisNameBorrow(name)) + 2 + 1 even with Praveen's patch,

Re: [devel] [PATCH 6 of 7] NTF: Add ntftest test cases for notification, with long dn objects [#873] v2

2014-07-31 Thread praveen malviya
On 31-Jul-14 3:47 PM, Anders Widell wrote: I am leaning towards your suggested solution for SA_NTF_VALUE_LDAP_NAME now. :-) It will be the easiest one to implement in NTF, but it may be a bit non-obvious to the user. We have to clearly document that for SA_NTF_VALUE_LDAP_NAME, the user

Re: [devel] [PATCH 6 of 7] NTF: Add ntftest test cases for notification, with long dn objects [#873] v2

2014-07-31 Thread Anders Widell
You have a point, backwards compatibility is tricky when fixing bugs. So the current situation is then that sometimes SA_NTF_VALUE_LDAP_NAME comes with two bytes of length information in the beginning, and sometimes it doesn't. How will the user know how to interpret the value? I don't see a

Re: [devel] [PATCH 6 of 7] NTF: Add ntftest test cases for notification, with long dn objects [#873] v2

2014-07-28 Thread praveen malviya
Hi Minh, I have tried a small patch to use saAisNameLend() for extended name in saNtfPtrValAllocate() for the discussed case. It is handled in Send() API. Patch is generated on top of V3 patchs and also includes relevant test changes in extFillHeaderAddInfo() in

Re: [devel] [PATCH 6 of 7] NTF: Add ntftest test cases for notification, with long dn objects [#873] v2 (Minh Hon Chau)

2014-07-17 Thread praveen malviya
Hi Minh, I saw the test and the way long DN is being used in the API. I tried to modified that in one way for short DN(below is the patch/diff on top this patch). But I have certain doubts: In case ldap_name is less the 256, it can be set directly using saAisNameLend(),below diff, and

Re: [devel] [PATCH 6 of 7] NTF: Add ntftest test cases for notification, with long dn objects [#873] v2 (Minh Hon Chau)

2014-07-17 Thread Anders Bjornerstedt
So to summarize, the only reason the lend/borrow variants exist is to allow optimization of code so that it avoids copying long DNs. Tweo examples of safe cases: 1) You are making a blocking down-call = it is safe to lend to the down-call because the instance that is lended will not be

[devel] [PATCH 6 of 7] NTF: Add ntftest test cases for notification with long dn objects [#873] v2

2014-07-15 Thread Minh Hon Chau
tests/ntfsv/Makefile.am |3 +- tests/ntfsv/tet_longDnObject_notification.c | 957 tests/unit_test_fw/inc/util.h |5 +- tests/unit_test_fw/src/Makefile.am |1 + tests/unit_test_fw/src/util.c | 14