SunStudio compile
I am trying to compile python ldap with SunStudio, I get this error. Any idea? ... /opt/SUNWspro/bin/CC -I/opt/coolstack/include -DNDEBUG -fast -xipo -xtarget=generic -xcode=pic32 -DHAVE_LIBLDAP_R -DHAVE_TLS -DLDAPMODULE_VERSION=2.3.5 -IModules -I/opt/coolstack/include -I/opt/coolstack/include/sasl -I/opt/coolstack/include/python2.5 -c Modules/message.c -o build/temp.solaris-2.10-sun4u-2.5/Modules/message.o "Modules/message.c", line 39: Warning: String literal converted to char* in formal argument msg in call to LDAPerror(ldap*, char*). "Modules/message.c", line 134: Warning: String literal converted to char* in formal argument msg in call to LDAPerror(ldap*, char*). 2 Warning(s) detected. /opt/SUNWspro/bin/CC -I/opt/coolstack/include -DNDEBUG -fast -xipo -xtarget=generic -xcode=pic32 -DHAVE_LIBLDAP_R -DHAVE_TLS -DLDAPMODULE_VERSION=2.3.5 -IModules -I/opt/coolstack/include -I/opt/coolstack/include/sasl -I/opt/coolstack/include/python2.5 -c Modules/version.c -o build/temp.solaris-2.10-sun4u-2.5/Modules/version.o /opt/SUNWspro/bin/CC -I/opt/coolstack/include -DNDEBUG -fast -xipo -xtarget=generic -xcode=pic32 -DHAVE_LIBLDAP_R -DHAVE_TLS -DLDAPMODULE_VERSION=2.3.5 -IModules -I/opt/coolstack/include -I/opt/coolstack/include/sasl -I/opt/coolstack/include/python2.5 -c Modules/options.c -o build/temp.solaris-2.10-sun4u-2.5/Modules/options.o "Modules/options.c", line 108: Error: Formal argument 1 of type ldapcontrol** in call to LDAPControl_List_DEL(ldapcontrol**) is being passed void*. 1 Error(s) detected. error: command '/opt/SUNWspro/bin/CC' failed with exit status 1 - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ Python-LDAP-dev mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/python-ldap-dev
Re: SunStudio compile
Thanks, that worked! I am able to compile it now, but if I enable sasl, it also fails: "Modules/LDAPObject.c", line 568: Warning: String literal converted to char* in formal argument format in call to _PyObject_CallMethod_SizeT(_object*, char*, char*, ...). "Modules/LDAPObject.c", line 614: Error: Cannot use void* to initialize sasl_interact*. "Modules/LDAPObject.c", line 615: Error: Cannot use void* to initialize _object*. "Modules/LDAPObject.c", line 689: Warning (Anachronism): Formal argument proc of type extern "C" int(*)(ldap*,unsigned,void*,void*) in call to ldap_sasl_interactive_bind_s(ldap*, const char*, const char*, ldapcontrol**, ldapcontrol**, unsigned, extern "C" int(*)(ldap*,unsigned,void*,void*), void*) is being passed int(*)(ldap*,unsigned,void*,void*). Sounds like the same thing. Matej Vela wrote: > Anil <[EMAIL PROTECTED]> writes: > > >> I am trying to compile python ldap with SunStudio, I get this error. Any >> idea? >> > [...] > >> "Modules/options.c", line 108: Error: Formal argument 1 of type >> ldapcontrol** in call to LDAPControl_List_DEL(ldapcontrol**) is being >> passed void*. >> > > The type checking seems to be a bit overzealous. Try changing line 108 > of Modules/options.c from > > LDAPControl_List_DEL(ptr); > > to > > LDAPControl_List_DEL((LDAPControl**) ptr); > > Cheers, > > Matej > > - > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > ___ > Python-LDAP-dev mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/python-ldap-dev > - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ Python-LDAP-dev mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/python-ldap-dev
server sort
I am having a bit of a problem trying to setup the controlValue in
LDAPControl for doing server sorting. My LDAP server supports this
control, but I keep getting back Not supported error. Clearly this is a
problem on my end with how I am passing in controlValue.
I am not that familiar with BER encoding.
So, from what I've found, I tried doing something like this:
from pyasn1.type import univ, namedtype
from pyasn1.codec.ber import encoder
seq = univ.Sequence(
componentType=namedtype.NamedTypes(namedtype.NamedType('attributeType',
univ.OctetString("uid")))
)
control = [ldap.controls.LDAPControl('1.2.840.113556.1.4.473',True,seq)]
I then pass control to LDAPObject.search_ext().
That doesn't work, and I am sure I massacred my intepretation of using
the pyasn1 module. Unfortunately, the documentation for it is not clear
to me.
Any tips?
Thanks
--
___
Python-LDAP-dev mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/python-ldap-dev
connection pooling
I am looking to do connection pooling and am thinking of doing something like http://www.sqlalchemy.org/docs/05/reference/sqlalchemy/pooling.html Can you guys give some advice and/or better yet, has someone already done this? Thanks -- Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference ___ Python-LDAP-dev mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/python-ldap-dev
bad filter
I pass a filter string such as this to search(), but I keep getting BAD SEARCH FILTER error. "(|(last-login-time<=100101*)(!(last-login-time=*)))" The same thing works when using it with ldapsearch command. I also tried running it through ldap.filter.escape_filter_chars. Still no luck. Is this a known bug? I am using python_ldap-2.3.8. Thanks -- This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first ___ Python-LDAP-dev mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/python-ldap-dev
Re: bad filter
I've used this type of wild card search+compare before, all with Solaris's ldapsearch, never complained. Let me change this to not use a wild card like that. Thanks. 2010/7/1 Michael Ströder : > Anil wrote: >> I pass a filter string such as this to search(), but I keep getting >> BAD SEARCH FILTER error. >> "(|(last-login-time<=100101*)(!(last-login-time=*)))" > > Using <= with * in the assertion value looks bogus to me. > >> The same thing works when using it with ldapsearch command. > > Does not work for me when using OpenLDAP's ldapsearch: > > $ ldapsearch "(|(last-login-time<=100101*)(\!(last-login-time=*)))" > ldapsearch: ldap_search_ext: Bad search filter (-7) > > Note the extra back-shlash needed before ! since ! is a special char > for the shell. > >> I also >> tried running it through ldap.filter.escape_filter_chars. > > You should not pass complete filter strings to > ldap.filter.escape_filter_chars(). This function should only be used for the > assertion values you put into the filter string afterwards. > >> Is this a known bug? > > Nope. > > Ciao, Michael. > -- This SF.net email is sponsored by Sprint What will you do first with EVO, the first 4G phone? Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first ___ Python-LDAP-dev mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/python-ldap-dev
Re: modifying problem
Okay, I was just introduced to "multi-valued RDN", didn't know about that. So, here's a quick question. Is there a easy way/code to modify these kinds of RDN? Its a little bit of extra work to have to go figure out that a RDN is being changed and then go use modrdn. Thanks, Anil On 11/30/07, Anil Jangity <[EMAIL PROTECTED]> wrote: > I am not sure if this is a problem in my code, python ldap code, or > the (beta) LDAP server I am using: > > A piece of the entry is as follows: > > dn: cn=Ahmad [EMAIL PROTECTED], [EMAIL PROTECTED], ou > =People, o=entic.net > mail: [EMAIL PROTECTED] > cn: Ahmad Qazi > ... > > First of all, how was this entry added? Is having a RDN with the + and > the mail, allowed? I thought since the RDN is 'cn', it needs to match > exactly the 'cn' attribute, how can the mail be concatenated? > > Then, I see the following in the LDAP server logs: > > [30/Nov/2007:11:28:43 -0800] MODIFY conn=1943 op=1 msgID=2 result="Not > Allowed on RDN" message="Entry cn=Ahmad > [EMAIL PROTECTED],[EMAIL PROTECTED],ou=People,o=entic.net > cannot be modified because the change to attribute mail would have > removed a value used in the RDN" etime=1 > > How should I correctly handle data entered by the users in python-ldap? > > Thanks, > Anil > -- Solaris v.Dedicated Server http://entic.net/servers +1 408 689 0044 [EMAIL PROTECTED] - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 ___ Python-LDAP-dev mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/python-ldap-dev
modifying problem
I am not sure if this is a problem in my code, python ldap code, or the (beta) LDAP server I am using: A piece of the entry is as follows: dn: cn=Ahmad [EMAIL PROTECTED], [EMAIL PROTECTED], ou =People, o=entic.net mail: [EMAIL PROTECTED] cn: Ahmad Qazi ... First of all, how was this entry added? Is having a RDN with the + and the mail, allowed? I thought since the RDN is 'cn', it needs to match exactly the 'cn' attribute, how can the mail be concatenated? Then, I see the following in the LDAP server logs: [30/Nov/2007:11:28:43 -0800] MODIFY conn=1943 op=1 msgID=2 result="Not Allowed on RDN" message="Entry cn=Ahmad [EMAIL PROTECTED],[EMAIL PROTECTED],ou=People,o=entic.net cannot be modified because the change to attribute mail would have removed a value used in the RDN" etime=1 How should I correctly handle data entered by the users in python-ldap? Thanks, Anil - SF.Net email is sponsored by: The Future of Linux Business White Paper from Novell. From the desktop to the data center, Linux is going mainstream. Let it simplify your IT future. http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 ___ Python-LDAP-dev mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/python-ldap-dev
sasl bind
Hi! Is there some documentation somewhere that explains the usage of SASL bind requests? How exactly should sasl_interactive_bind_s() be used? Thanks, Anil - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace ___ Python-LDAP-dev mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/python-ldap-dev
