You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(200) |
Jun
(129) |
Jul
(184) |
Aug
(204) |
Sep
(106) |
Oct
(79) |
Nov
(72) |
Dec
(54) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(83) |
Feb
(123) |
Mar
(84) |
Apr
(184) |
May
(106) |
Jun
(111) |
Jul
(104) |
Aug
(91) |
Sep
(59) |
Oct
(99) |
Nov
(100) |
Dec
(37) |
2002 |
Jan
(148) |
Feb
(88) |
Mar
(85) |
Apr
(151) |
May
(80) |
Jun
(110) |
Jul
(85) |
Aug
(43) |
Sep
(64) |
Oct
(89) |
Nov
(59) |
Dec
(42) |
2003 |
Jan
(129) |
Feb
(104) |
Mar
(162) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: David A. P. <dpi...@un...> - 2001-06-07 17:17:05
|
At 04:50 PM 6/7/01 +0100, Graham Barr wrote: >Can you send the output from adding $ldap->debug(15) > >Thanks, >Graham. Net::LDAP=HASH(0xc3064) sending: 30 81 C5 02 01 02 63 5D 04 18 6F 75 3D 50 65 6F 0.....c]..ou=Peo 70 6C 65 2C 6F 3D 75 6E 69 70 72 65 73 73 2E 63 ple,o=unipress.c 6F 6D 0A 01 02 0A 01 02 02 01 00 02 01 00 01 01 om.............. 00 A0 30 A1 17 A1 0F 87 02 73 6E 87 09 67 69 76 ..0......sn..giv 65 6E 6E 61 6D 65 87 04 6D 61 69 6C A3 15 04 0B enname..mail.... 6F 62 6A 65 63 74 63 6C 61 73 73 04 06 70 65 72 objectclass..per 73 6F 6E 30 00 A0 61 30 2F 04 16 31 2E 32 2E 38 son0..a0/..1.2.8 34 30 2E 31 31 33 35 35 36 2E 31 2E 34 2E 34 37 40.113556.1.4.47 33 04 15 30 13 30 04 04 02 73 6E 30 0B 04 09 67 3..0.0...sn0...g 69 76 65 6E 6E 61 6D 65 30 2E 04 17 32 2E 31 36 ivenname0...2.16 2E 38 34 30 2E 31 2E 31 31 33 37 33 30 2E 33 2E .840.1.113730.3. 34 2E 39 01 01 FF 04 10 30 0E 02 01 00 02 01 01 4.9.....0....... A0 06 02 01 01 02 01 00 __ __ __ __ __ __ __ __ ........ 0000 30 197: SEQUENCE { 0003 02 1: INTEGER = 2 0006 63 93: [APPLICATION 3] { 0008 04 24: STRING = 'ou=People,o=unipress.com' 0022 0A 1: ENUM = 2 0025 0A 1: ENUM = 2 0028 02 1: INTEGER = 0 002B 02 1: INTEGER = 0 002E 01 1: BOOLEAN = FALSE 0031 A0 48: [CONTEXT 0] { 0033 A1 23: [CONTEXT 1] { 0035 A1 15: [CONTEXT 1] { 0037 87 2: [CONTEXT 7] 0039 : 73 6E __ __ __ __ __ __ __ __ __ __ __ __ __ __ sn 003B 87 9: [CONTEXT 7] 003D : 67 69 76 65 6E 6E 61 6D 65 __ __ __ __ __ __ __ givenn ame 0046 : } 0046 87 4: [CONTEXT 7] 0048 : 6D 61 69 6C __ __ __ __ __ __ __ __ __ __ __ __ mail 004C : } 004C A3 21: [CONTEXT 3] { 004E 04 11: STRING = 'objectclass' 005B 04 6: STRING = 'person' 0063 : } 0063 : } 0063 30 0: SEQUENCE { 0065 : } 0065 : } 0065 A0 97: [CONTEXT 0] { 0067 30 47: SEQUENCE { 0069 04 22: STRING = '1.2.840.113556.1.4.473' 0081 04 21: STRING 0083 : 30 13 30 04 04 02 73 6E 30 0B 04 09 67 69 76 65 0.0...sn0. ..give 0093 : 6E 6E 61 6D 65 __ __ __ __ __ __ __ __ __ __ __ nname 0098 : } 0098 30 46: SEQUENCE { 009A 04 23: STRING = '2.16.840.1.113730.3.4.9' 00B3 01 1: BOOLEAN = TRUE 00B6 04 16: STRING 00B8 : 30 0E 02 01 00 02 01 01 A0 06 02 01 01 02 01 00 0......... ...... 00C8 : } 00C8 : } 00C8 : } Net::LDAP=HASH(0xc3064) received: 30 82 02 0E 02 01 02 64 82 02 07 04 26 75 69 64 0......d....&uid 3D 52 41 63 63 61 72 64 69 2C 6F 75 3D 50 65 6F =RAccardi,ou=Peo 70 6C 65 2C 20 6F 3D 75 6E 69 70 72 65 73 73 2E ple, o=unipress. 63 6F 6D 30 82 01 DB 30 1F 04 04 6D 61 69 6C 31 com0...0...mail1 17 04 15 72 61 63 63 61 72 64 69 40 75 6E 69 70 ...raccardi@unip 72 65 73 73 2E 63 6F 6D 30 41 04 0B 6F 62 6A 65 ress.com0A..obje 63 74 63 6C 61 73 73 31 32 04 03 74 6F 70 04 06 ctclass12..top.. 70 65 72 73 6F 6E 04 14 6F 72 67 61 6E 69 7A 61 person..organiza 74 69 6F 6E 61 6C 50 65 72 73 6F 6E 04 0D 69 6E tionalPerson..in 65 74 6F 72 67 70 65 72 73 6F 6E 30 13 04 02 63 etorgperson0...c 6E 31 0D 04 0B 52 6F 62 20 41 63 63 61 72 64 69 n1...Rob Accardi 30 11 04 03 75 69 64 31 0A 04 08 52 41 63 63 61 0...uid1...RAcca 72 64 69 30 12 04 09 67 69 76 65 6E 6E 61 6D 65 rdi0...givenname 31 05 04 03 52 6F 62 30 0F 04 02 73 6E 31 09 04 1...Rob0...sn1.. 07 41 63 63 61 72 64 69 30 33 04 0C 75 73 65 72 .Accardi03..user 70 61 73 73 77 6F 72 64 31 23 04 21 7B 53 48 41 password1#.!{SHA 7D 35 6A 74 51 38 75 71 57 63 73 61 62 56 31 71 }5jtQ8uqWcsabV1q 6B 4F 5A 50 59 49 63 6F 4F 74 44 45 3D 30 52 04 kOZPYIcoOtDE=0R. 0C 63 72 65 61 74 6F 72 73 6E 61 6D 65 31 42 04 .creatorsname1B. 40 75 69 64 3D 61 64 6D 69 6E 2C 6F 75 3D 41 64 @uid=admin,ou=Ad 6D 69 6E 69 73 74 72 61 74 6F 72 73 2C 6F 75 3D ministrators,ou= 54 6F 70 6F 6C 6F 67 79 4D 61 6E 61 67 65 6D 65 TopologyManageme 6E 74 2C 6F 3D 4E 65 74 73 63 61 70 65 52 6F 6F nt,o=NetscapeRoo 74 30 53 04 0D 6D 6F 64 69 66 69 65 72 73 6E 61 t0S..modifiersna 6D 65 31 42 04 40 75 69 64 3D 61 64 6D 69 6E 2C me1B.@uid=admin, 6F 75 3D 41 64 6D 69 6E 69 73 74 72 61 74 6F 72 ou=Administrator 73 2C 6F 75 3D 54 6F 70 6F 6C 6F 67 79 4D 61 6E s,ou=TopologyMan 61 67 65 6D 65 6E 74 2C 6F 3D 4E 65 74 73 63 61 agement,o=Netsca 70 65 52 6F 6F 74 30 24 04 0F 63 72 65 61 74 65 peRoot0$..create 74 69 6D 65 73 74 61 6D 70 31 11 04 0F 32 30 30 timestamp1...200 30 31 31 30 33 32 30 33 31 34 39 5A 30 24 04 0F 01103203149Z0$.. 6D 6F 64 69 66 79 74 69 6D 65 73 74 61 6D 70 31 modifytimestamp1 11 04 0F 32 30 30 30 31 31 30 33 32 30 33 31 34 ...2000110320314 39 5A __ __ __ __ __ __ __ __ __ __ __ __ __ __ 9Z 0000 30 526: SEQUENCE { 0004 02 1: INTEGER = 2 0007 64 519: [APPLICATION 4] { 000B 04 38: STRING = 'uid=RAccardi,ou=People, o=unipress.com' 0033 30 475: SEQUENCE { 0037 30 31: SEQUENCE { 0039 04 4: STRING = 'mail' 003F 31 23: SET { 0041 04 21: STRING = 'rac...@un...' 0058 : } 0058 : } 0058 30 65: SEQUENCE { 005A 04 11: STRING = 'objectclass' 0067 31 50: SET { 0069 04 3: STRING = 'top' 006E 04 6: STRING = 'person' 0076 04 20: STRING = 'organizationalPerson' 008C 04 13: STRING = 'inetorgperson' 009B : } 009B : } 009B 30 19: SEQUENCE { 009D 04 2: STRING = 'cn' 00A1 31 13: SET { 00A3 04 11: STRING = 'Rob Accardi' 00B0 : } 00B0 : } 00B0 30 17: SEQUENCE { 00B2 04 3: STRING = 'uid' 00B7 31 10: SET { 00B9 04 8: STRING = 'RAccardi' 00C3 : } 00C3 : } 00C3 30 18: SEQUENCE { 00C5 04 9: STRING = 'givenname' 00D0 31 5: SET { 00D2 04 3: STRING = 'Rob' 00D7 : } 00D7 : } 00D7 30 15: SEQUENCE { 00D9 04 2: STRING = 'sn' 00DD 31 9: SET { 00DF 04 7: STRING = 'Accardi' 00E8 : } 00E8 : } 00E8 30 51: SEQUENCE { 00EA 04 12: STRING = 'userpassword' 00F8 31 35: SET { 00FA 04 33: STRING = '{SHA}5jtQ8uqWcsabV1qkOZPYIcoOtDE=' 011D : } 011D : } 011D 30 82: SEQUENCE { 011F 04 12: STRING = 'creatorsname' 012D 31 66: SET { 012F 04 64: STRING = 'uid=admin,ou=Administrators,ou=TopologyManagem ent,o=NetscapeRoot' 0171 : } 0171 : } 0171 30 83: SEQUENCE { 0173 04 13: STRING = 'modifiersname' 0182 31 66: SET { 0184 04 64: STRING = 'uid=admin,ou=Administrators,ou=TopologyManagem ent,o=NetscapeRoot' 01C6 : } 01C6 : } 01C6 30 36: SEQUENCE { 01C8 04 15: STRING = 'createtimestamp' 01D9 31 17: SET { 01DB 04 15: STRING = '20001103203149Z' 01EC : } 01EC : } 01EC 30 36: SEQUENCE { 01EE 04 15: STRING = 'modifytimestamp' 01FF 31 17: SET { 0201 04 15: STRING = '20001103203149Z' 0212 : } 0212 : } 0212 : } 0212 : } 0212 : } Net::LDAP=HASH(0xc3064) received: 30 82 01 BB 02 01 02 64 82 01 B4 04 27 75 69 64 0......d....'uid 3D 41 4B 72 69 65 67 65 72 2C 20 6F 75 3D 70 65 =AKrieger, ou=pe 6F 70 6C 65 2C 20 6F 3D 75 6E 69 70 72 65 73 73 ople, o=unipress 2E 63 6F 6D 30 82 01 87 30 11 04 03 75 69 64 31 .com0...0...uid1 0A 04 08 41 4B 72 69 65 67 65 72 30 14 04 02 63 ...AKrieger0...c 6E 31 0E 04 0C 41 6C 61 6E 20 4B 72 69 65 67 65 n1...Alan Kriege 72 30 0F 04 02 73 6E 31 09 04 07 4B 72 69 65 67 r0...sn1...Krieg 65 72 30 13 04 09 67 69 76 65 6E 6E 61 6D 65 31 er0...givenname1 06 04 04 41 6C 61 6E 30 41 04 0B 6F 62 6A 65 63 ...Alan0A..objec 74 63 6C 61 73 73 31 32 04 03 74 6F 70 04 06 70 tclass12..top..p 65 72 73 6F 6E 04 14 6F 72 67 61 6E 69 7A 61 74 erson..organizat 69 6F 6E 61 6C 50 65 72 73 6F 6E 04 0D 69 6E 65 ionalPerson..ine 74 4F 72 67 50 65 72 73 6F 6E 30 52 04 0C 63 72 tOrgPerson0R..cr 65 61 74 6F 72 73 6E 61 6D 65 31 42 04 40 75 69 eatorsname1B.@ui 64 3D 61 64 6D 69 6E 2C 6F 75 3D 41 64 6D 69 6E d=admin,ou=Admin 69 73 74 72 61 74 6F 72 73 2C 6F 75 3D 54 6F 70 istrators,ou=Top 6F 6C 6F 67 79 4D 61 6E 61 67 65 6D 65 6E 74 2C ologyManagement, 6F 3D 4E 65 74 73 63 61 70 65 52 6F 6F 74 30 53 o=NetscapeRoot0S 04 0D 6D 6F 64 69 66 69 65 72 73 6E 61 6D 65 31 ..modifiersname1 42 04 40 75 69 64 3D 61 64 6D 69 6E 2C 6F 75 3D B.@uid=admin,ou= 41 64 6D 69 6E 69 73 74 72 61 74 6F 72 73 2C 6F Administrators,o 75 3D 54 6F 70 6F 6C 6F 67 79 4D 61 6E 61 67 65 u=TopologyManage 6D 65 6E 74 2C 6F 3D 4E 65 74 73 63 61 70 65 52 ment,o=NetscapeR 6F 6F 74 30 24 04 0F 63 72 65 61 74 65 74 69 6D oot0$..createtim 65 73 74 61 6D 70 31 11 04 0F 32 30 30 30 31 31 estamp1...200011 32 30 32 31 31 32 31 36 5A 30 24 04 0F 6D 6F 64 20211216Z0$..mod 69 66 79 74 69 6D 65 73 74 61 6D 70 31 11 04 0F ifytimestamp1... 32 30 30 30 31 31 32 30 32 31 31 32 31 36 5A __ 20001120211216Z 0000 30 443: SEQUENCE { 0004 02 1: INTEGER = 2 0007 64 436: [APPLICATION 4] { 000B 04 39: STRING = 'uid=AKrieger, ou=people, o=unipress.com' 0034 30 391: SEQUENCE { 0038 30 17: SEQUENCE { 003A 04 3: STRING = 'uid' 003F 31 10: SET { 0041 04 8: STRING = 'AKrieger' 004B : } 004B : } 004B 30 20: SEQUENCE { 004D 04 2: STRING = 'cn' 0051 31 14: SET { 0053 04 12: STRING = 'Alan Krieger' 0061 : } 0061 : } 0061 30 15: SEQUENCE { 0063 04 2: STRING = 'sn' 0067 31 9: SET { 0069 04 7: STRING = 'Krieger' 0072 : } 0072 : } 0072 30 19: SEQUENCE { 0074 04 9: STRING = 'givenname' 007F 31 6: SET { 0081 04 4: STRING = 'Alan' 0087 : } 0087 : } 0087 30 65: SEQUENCE { 0089 04 11: STRING = 'objectclass' 0096 31 50: SET { 0098 04 3: STRING = 'top' 009D 04 6: STRING = 'person' 00A5 04 20: STRING = 'organizationalPerson' 00BB 04 13: STRING = 'inetOrgPerson' 00CA : } 00CA : } 00CA 30 82: SEQUENCE { 00CC 04 12: STRING = 'creatorsname' 00DA 31 66: SET { 00DC 04 64: STRING = 'uid=admin,ou=Administrators,ou=TopologyManagem ent,o=NetscapeRoot' 011E : } 011E : } 011E 30 83: SEQUENCE { 0120 04 13: STRING = 'modifiersname' 012F 31 66: SET { 0131 04 64: STRING = 'uid=admin,ou=Administrators,ou=TopologyManagem ent,o=NetscapeRoot' 0173 : } 0173 : } 0173 30 36: SEQUENCE { 0175 04 15: STRING = 'createtimestamp' 0186 31 17: SET { 0188 04 15: STRING = '20001120211216Z' 0199 : } 0199 : } 0199 30 36: SEQUENCE { 019B 04 15: STRING = 'modifytimestamp' 01AC 31 17: SET { 01AE 04 15: STRING = '20001120211216Z' 01BF : } 01BF : } 01BF : } 01BF : } 01BF : } Net::LDAP=HASH(0xc3064) received: 30 0C 02 01 02 65 07 0A 01 00 04 00 04 00 __ __ 0....e........ 0000 30 12: SEQUENCE { 0002 02 1: INTEGER = 2 0005 65 7: [APPLICATION 5] { 0007 0A 1: ENUM = 0 000A 04 0: STRING = '' 000C 04 0: STRING = '' 000E : } 000E : } Can't call method "context" on an undefined value at /usr/local/lib/perl5/site_p erl/5.005/Net/LDAP/Control/VLV.pm line 107. -- David A. Pinkowitz UniPress Software, Inc. dpi...@un... (732) 287-2100 ext. 943 |
From: Graham B. <gb...@po...> - 2001-06-07 15:51:58
|
Can you send the output from adding $ldap->debug(15) Thanks, Graham. On Thu, Jun 07, 2001 at 11:05:09AM -0400, David A. Pinkowitz wrote: > As I reported, the patch allowed me to make my search; however, at the > time, I had commented out the lines getting the > LDAP_CONTROL_VLVRESPONSE. When I uncomment them, I get the following error > message: > > Can't call method "context" on an undefined value at ...VLV.pm line 107. > > That line is in sub response, which reads: "$asn->{contextID} = > $resp->context;" > > Here is my code segment again: > > ############## > $vlv = Net::LDAP::Control::VLV->new( > before => 0, # No entries before target entry > after => 1, # number of entries after target entry > content => 0, #If set to 0, list size is unknown > offset => 1, # Target entry is the first > ); > > $sort = Net::LDAP::Control::Sort->new( > order => "sn givenname" > ); > > $mesg=$ldap->search( > filter => '(&(|(|(sn=*) (givenname=*)) > (mail=*))(objectclass=person))', > base => 'ou=People,o=unipress.com', > attrs => $anonAttr, > control => [ $sort, $vlv ], #sets sort & vlv which works only in v.3 > ); > > ($resp) = $mesg->control( LDAP_CONTROL_VLVRESPONSE ); > $vlv->response( $resp ); > ###################### > > The vlv control results in the correct output, but I fail when calling the > second to last line as described above. Is there any debugging I should do > or any place I should look for the error? > > Thank you in advance for any help you can give me. > > > > -- > David A. Pinkowitz > UniPress Software, Inc. > dpi...@un... > (732) 287-2100 ext. 943 > |
From: Graham B. <gb...@po...> - 2001-06-07 15:49:11
|
On Thu, Jun 07, 2001 at 03:09:21PM +0100, Steve Haslam wrote: > On Thu, Jun 07, 2001 at 09:51:23AM -0400, Jim Harle wrote: > > This from a year old posting on this list that I had saved. Does anyone > > know if things are better with 5.6.1? My recollection was that the > > problems were mostly with mult-threaded installations of 5.6. Is that > > correct? > > 5.6.1 generally seems to be more stable than 5.6.0. I've not used > Net::LDAP much with it, though. But where I have it's worked fine... Yes 5.6.1 is much better, but I would still stay away from using threaded-perl. > hmm, can Net::LDAP do things like setting UTF8-ness on strings passed > to/from an LDAPv3 server? I get the impression it's not trivial to do > in pure Perl, though :| Right, it is not trivial. And in 5.7.x this is one area that is being worked on a lot. So I really dont want to do anything 5.6 specific. In 5.7 there is and Encode module. Although I only see Net::LDAP using this to get the octets of a value that has been passed and has been tagged as utf8. I don't think it will (yet ayway) be tagging the strings as they come back as it does not know which values are utf8 and which are not (eg a jpeg) Graham. |
From: Graham B. <gb...@va...> - 2001-06-07 15:44:24
|
This is an interesting idea ----- Forwarded message from tur...@ne... ----- Mailing-List: contact dbi...@pe...; run by ezmlm Delivered-To: mailing list db...@pe... Date: Wed, 06 Jun 2001 14:27:08 -0400 From: tur...@ne... To: db...@pe... Subject: Preannouncing 1st alpha DBD::Ldap release! X-Spam-Rating: onion.valueclick.com 1.6.2 0/1000/N Greetings, I am proud to release the very 1st alpha version of DBD::Ldap! This module is designed to allow one to access LDAP (Lightweight Directory Access Protocol) databases using traditional SQL and Perl and DBI. It is hoped that someone (besides me) will find this code useful. This is my very 1st release, so it has only been gently tested by me on my own OpenLDAP server using Linux Mandrake 7.2 and Perl 5.6.0. Most of the code was transcribed from my 1st and only other DBD module DBD::Sprite. This version of the module and early updates are available on my website: http://turnerville.virtualave.net -- I wanted to announce here and get a few replies before unleashing a version on CPAN. Enjoy & Thanks for any feedback! Jim Turner -------------------- README ---------------------- NAME DBD::Ldap - A DBI driver for LDAP databases. LDAP stands for the "Lightweight Directory Access Protocol". For more information, see: http://www.ogre.com/ldap/docs.html SYNOPSIS use DBI; $dbh = DBI->connect("DBI:Ldap:ldapdb",'user','password') #USER LOGIN. or die "Cannot connect as user: " . $DBI::errstr; $dbh = DBI->connect("DBI:Ldap:ldapdb") #ANONYMOUS LOGIN (Read-only). or die "Cannot connect as guest (readonly): " . $DBI::errstr; $sth = $dbh->prepare("select * from people where (cn like 'Smith%')") or die "Cannot prepare: " . $dbh->errstr(); $sth->execute() or die "Cannot execute: " . $sth->errstr(); while ((@results) = $sth->fetchrow_array) { print "--------------------------------------------------------\n"; ++$cnt; while (@results) { print "------>".join('|',split(/\0/, shift(@results)))."\n"; } } $sth->finish(); $dbh->disconnect(); WARNING THIS IS ALPHA SOFTWARE. It is *only* 'Alpha' because this is it's 1st release! DESCRIPTION DBD::Ldap is a DBI extension module adding an SQL database interface to standard LDAP databases to Perl's database-independent database interface. You will need access to an existing LDAP database or set up your own using an LDAP server, ie. "OpenLDAP", see (http://www.openldap.org). JLdap.pm is included in this module as a separate file, and is required. The main advantage of DBD::Ldap is the ability to query LDAP databases via standard SQL queries in leu of cryptic LDAP "filters". LDAP is optimized for quick lookup of existing data, but DBD::Ldap does support entry inserts, updates, and deletes with commit/rollback via the standard SQL commands! Ldap databases are "heirarchical" in structure, whereas other DBD-supported databases are "relational" and there is no Ldap-equivalent to SQL "tables", so DBD::Ldap maps a "table" interface over the Ldap "tree" via a configuration file you must set up. Each "table" is mapped to a common "base DN". For example, consider a typical Ldap database of employees within different departments within a company. You might have a "company" names "Acme" and the root "dn" of "dc=Acme, dc=com" (Acme.com). Below the company level, are divisions, ie. "Widgets", and "Blivets". Each division would have an entry with a "dn" of "ou=Widgets, dc=Acme, dc=com". Employees within each division could have a "dn" of "cn=John Doe, ou=Widgets, dc=Acme, dc=com". With DBD::Ldap, we could create tables to access these different levels, ie. "top", which would have a "DN" of "dc=Acme, dc=com", "WidgetDivision" for "dc=Acme, dc=com". Tables can also be constained by additional attribute specifications (filters), ie constraining by "objectclass", ie. "(objectclass=person)". Then, doing a "select * from WidgetDivision" would display all "person"s with a "dn" containing ""ou=Widgets, dc=Acme, dc=com". Prerequisites Convert::Ans1 (required by Net::LDAP) Net::LDAP DBI - an LDAP database to connect to. Installation Installing this module (and the prerequisites from above) is quite simple. You just fetch the archive, extract it with gzip -cd DBD-Ldap-0.1000.tar.gz | tar xf - (this is for Unix users, Windows users would prefer WinZip or something similar) and then enter the following: cd DBD-Ldap-#.### perl Makefile.PL make make test If any tests fail, let me know. Otherwise go on with make install Note that you almost definitely need root or administrator permissions. If you don't have them, read the ExtUtils::MakeMaker man page for details on installing in your own directories. the ExtUtils::MakeMaker manpage. Getting started: 1) Create a "database", ie. "foo" by creating a text file "foo.ldb". The general format of this file is: ---------------------------------------------------------- hostname[;port][:[root-dn][:[loginrule]]] tablename1:[basedn]:[basefilter]:dnattrs:[visableattrs]:[insertattrs]:[ldap_options] tablename2:[basedn]:[basefilter]:dnattrs:[visableattrs]:[insertattrs]:[ldap_options] ... ---------------------------------------------------------- <hostname> represents the ldap server host name. <port> represents the server's port, default is 389. <root-dn> if specified, is appended to the end of each tablename's base-dn. <loginrule> if specified, converts single word "usernames" to the appropriate DN, ie: "cn=*,<ROOT>" would convert user name "foo" to "cn=foo, " and append the "<root-dn>" onto that. The asterisk is converted to the user-name specified in the "connect" method. If not specified, the username specified in the "connect" method must be a full DN. If the "<root-dn>" is not specified, then the "<loginrule>" would need to be a full DN. tablename - represents the name to be used in SQL statements for a given set of entries which make up a virtual "table". basedn - if specified, is appended to the "<root-dn>" to make up the common base DN for all entries in this table. If "<root-dn>" is not specified, then a full DN must be specified; otherwise, the default is the root-dn. basefilter - if specified, specifies a filter to be used if no "where"- clause is specified in SQL queries. If a "where"-clause is specified, the resulting filter is "and"-ed with this one. The default is "(objectclass=*)". dnattrs - specifies which attributes that values for which are to be appended to the left of the basedn to create DNs for new entries being inserted into the table. visableattrs - if specified, one or more attributes separated by commas which will be sought when the SQL statement does not specify attributes, ie. "select * from tablename". If not specified, the attributes of the first matching entry are returned and used for all entries matching a given query. insertattrs - if specified, one or more attribute/value combinations to be added to any new entry inserted into the table, usually needed for objectclass values. The attributes and values usually correspond to those specivied in the "<basefilter>". The general format is: attr1=value1[|value2...],attr2=value1...,... These attributes and values will be joined with any user-specified values for these attributes. ldap_options - if specified, can be any one or more of the following: ldap_sizelimit - Limit the number of entries fetch by a query to this number (0 = no limit) - default: 0. ldap_timelimit - Limit the search to this number of seconds per query. (0 = no limit) - default: 0. ldap_scope - specify the "scope" of the search. Values are: "base", "one", and "sub", see Net::LDAP docs. Default is "one", meaning the set of records one level below the basedn. "base" means search only the basedn, and "sub" means the union of entries at the "base" level and "one" level below. ldap_inseparator - specify the separator character/string to be used in queries to separate multiple values being specified for a given attribute. Default is "|". ldap_outseparator - specify the separator character/string to be used in queryies to separate multiple values displayed as a result of a query. Default is "|". ldap_firstonly - only display the 1st value fetched for each attribute per entry. This makes "ldap_outseparator" unnecessary. 2) write your script to use DBI, ie: #!/usr/bin/perl use DBI; $dbh = DBI->connect('DBD:Ldap:mydb','me','mypassword') || die "Could not connect (".$DBI->err.':'.$DBI->errstr.")!"; ... #CREATE A TABLE, INSERT SOME RECORDS, HAVE SOME FUN! 3) get your application working. Inserting, fetching and modifying data 1st, we'll create a database called "ldapdb" with the tables previously mentioned in the example in the DESCRIPTION section: ----------------- file "ldapdb.ldb" ---------------- ldapserver:dc=Acme, dc=com:cn=*,<ROOT> top:::dc WidgetDivision:ou=Widgets, :&(objectclass=top)(objectclass=person):cn:cn,sn,ou,title,telephonenumber,description,objectclass,dn:objectclass=top|person|organizationalPerson:ldap_outseparator => ":" ---------------------------------------------------- The following examples insert some data in a table and fetch it back: First all data in the string: $dbh->do(<<END_SQL); INSERT INTO top (ou, cn, objectclass) VALUES ('Widgets', 'WidgetDivision', 'top|organizationalUnit') END_SQL Next an example using parameters: $dbh->do("INSERT INTO WidgetDivision (cn,sn,title,telephonenumber) VALUES (?, ?, ?, ?)", 'John Doe','DoeJ','Manager','123-1111'); END_SQL $dbh->commit(); NOTE: Unlike most other DBD modules which support transactions, changes made do NOT show up until the "commit" function is called, unless "AutoCommit" is set. This is due to the fact that fetches are done from the Ldap server and changes do not take effect there until the Net::LDAP "update" function is called, which is called by "commit". NOTE: The "dn" field is generated automatically from the base "dn" and the dn component fields specified by "dnattrs", If you try to insert a value directly into it, it will be ignored. Also, if not specified, any attribute/value combinations specified in the "insertattrs" option will be added automatically. To retrieve data, you can use the following: my($query) = "SELECT * FROM WidgetDivision WHERE cn like 'John%' ORDER BY cn"; my($sth) = $dbh->prepare($query); $sth->execute(); while (my $entry = $sth->fetchrow_hashref) { print("Found result record: cn = ", $entry->{'cn'}, ", phone = ", $row->{'telephonenumber'}); } $sth->finish(); The SQL "SELECT" statement above (combined with the table information in the "ldapdb.ldb" database file would generate and execute the following equivalent LDAP Search: base => 'ou=Widgets, dc=Acme, dc=com', filter => '(&(&(objectclass=top)(objectclass=person))(cn=John*))', scope => 'one', attrs => 'cn,sn,ou,title,telephonenumber,description,objectclass,dn' See the DBI(3) manpage for details on these methods. See the Data rows are modified with the UPDATE statement: $dbh->do("UPDATE WidgetDivision SET description = 'Outstanding Employee' WHERE cn = 'John Doe'"); NOTE: You can NOT change the "dn" field directly - direct changes will be ignored. You change the "rdn" component of the "dn" field by changing the value of the other field(s) which are appended to the base "dn". Also, if not specified, any attribute/value combinations specified in the "insertattrs" option will be added automatically. Likewise you use the DELETE statement for removing entries: $dbh->do("DELETE FROM WidgetDivision WHERE description = 'Outstanding Employee'"); Metadata The following attributes are handled by DBI itself and not by DBD::Ldap, thus they should all work as expected. PrintError RaiseError Warn The following DBI attributes are handled by DBD::Ldap: AutoCommit Works NUM_OF_FIELDS Valid after `$sth->execute' NUM_OF_PARAMS Valid after `$sth->prepare' NAME Valid after `$sth->execute'; undef for Non-Select statements. NULLABLE Not really working. Always returns an array ref of one's, as DBD::Ldap always allows NULL (handled as an empty string). Valid after `$sth->execute'. LongReadLen Should work LongTruncOk Should work These attributes and methods are not supported: bind_param_inout CursorName In addition to the DBI attributes, you can use the following dbh attributes. These attributes are read-only after "connect". ldap_dbuser Current database user. ldap_HOME Environment variable specifying a path to search for Ldap databases (*.sdb) files. Driver private methods DBI->data_sources() The `data_sources' method returns a list of "databases" (.ldb files) found in the current directory and, if specified, the path in the ldap_HOME environment variable. $dbh->tables() This method returns a list of table names specified in the current database. Example: my($dbh) = DBI->connect("DBI:Ldap:mydatabase",'me','mypswd'); my(@list) = $dbh->func('list_tables'); Restrictions DBD::Ldap currently treats all data as strings and all fields as VARCHAR(255). Currently, you must define tables manually in the "<database>.ldb" file using your favorite text editor. I hope to add support for the SQL "Create Table", "Alter Table", and "Drop Table" functions to handle this eventually. TODO "Create Table", "Alter Table", and "Drop Table" SQL functions for creating, altering, and deleting the tables defined in the "<database>.ldb" file. Some kind of datatype support, ie. numeric (for sorting), CHAR for padding, Long/Blob - for >255 chars per field, etc. KNOWN BUGS none - (yet). AUTHOR AND COPYRIGHT This module is Copyright (C) 2000 by Jim Turner Email: jim...@lm... All rights reserved. You may distribute this module under the terms of either the GNU General Public License or the Artistic License, as specified in the Perl README file. JLdap.pm is a derived work by Jim Turner from Ldap.pm, a module written and copyrighted (c) 1995-1998, by Shishir Gurdavaram (sh...@or...). SEE ALSO Net::LDAP(3), DBI(3), perl(1) For general information on DBI see http://www.symbolstone.org/technology/perl/DBI __________________________________________________________________ Get your own FREE, personal Netscape Webmail account today at http://webmail.netscape.com/ ----- End forwarded message ----- |
From: David A. P. <dpi...@un...> - 2001-06-07 15:06:18
|
As I reported, the patch allowed me to make my search; however, at the time, I had commented out the lines getting the LDAP_CONTROL_VLVRESPONSE. When I uncomment them, I get the following error message: Can't call method "context" on an undefined value at ...VLV.pm line 107. That line is in sub response, which reads: "$asn->{contextID} = $resp->context;" Here is my code segment again: ############## $vlv = Net::LDAP::Control::VLV->new( before => 0, # No entries before target entry after => 1, # number of entries after target entry content => 0, #If set to 0, list size is unknown offset => 1, # Target entry is the first ); $sort = Net::LDAP::Control::Sort->new( order => "sn givenname" ); $mesg=$ldap->search( filter => '(&(|(|(sn=*) (givenname=*)) (mail=*))(objectclass=person))', base => 'ou=People,o=unipress.com', attrs => $anonAttr, control => [ $sort, $vlv ], #sets sort & vlv which works only in v.3 ); ($resp) = $mesg->control( LDAP_CONTROL_VLVRESPONSE ); $vlv->response( $resp ); ###################### The vlv control results in the correct output, but I fail when calling the second to last line as described above. Is there any debugging I should do or any place I should look for the error? Thank you in advance for any help you can give me. -- David A. Pinkowitz UniPress Software, Inc. dpi...@un... (732) 287-2100 ext. 943 |
From: David A. P. <dpi...@un...> - 2001-06-07 14:24:13
|
At 10:04 PM 6/6/01 +0100, Graham Barr wrote: >Please try the attached patch. The patch appears to work. Thanks for all your help and especially the quick response. -- David A. Pinkowitz UniPress Software, Inc. dpi...@un... (732) 287-2100 ext. 943 |
From: Steve H. <ste...@ex...> - 2001-06-07 14:09:30
|
On Thu, Jun 07, 2001 at 09:51:23AM -0400, Jim Harle wrote: > This from a year old posting on this list that I had saved. Does anyone > know if things are better with 5.6.1? My recollection was that the > problems were mostly with mult-threaded installations of 5.6. Is that > correct? 5.6.1 generally seems to be more stable than 5.6.0. I've not used Net::LDAP much with it, though. But where I have it's worked fine... hmm, can Net::LDAP do things like setting UTF8-ness on strings passed to/from an LDAPv3 server? I get the impression it's not trivial to do in pure Perl, though :| SRH -- + Steve Haslam | W: +44-20-7447-1839 + + Grunt, Excite UK | M: +44-7775-645618 + . I'm killing things with this razor blade, making sure a price gets paid . |
From: Jim H. <ha...@us...> - 2001-06-07 13:51:31
|
This from a year old posting on this list that I had saved. Does anyone know if things are better with 5.6.1? My recollection was that the problems were mostly with mult-threaded installations of 5.6. Is that correct? > > I downloaded and installed PERL 5.6. > > Not the most stable of versions. 5.6 has some known problems and Net::LDAP > is known to tickle them. I would suggest using 5.005_03 Thanks --Jim Harle |
From: Chris R. <chr...@me...> - 2001-06-07 09:55:13
|
Graham Barr <gb...@po...> wrote: > ----- Forwarded message from "\"M?ller, Axel\"" <Axe...@gf...> > ----- > = > Date: Thu, 7 Jun 2001 10:44:37 +0200 = > To: "'gb...@po...'" <gb...@po...> > From: "M?ller, Axel" <Axe...@gf...> > Subject: ldap > X-Mailer: Internet Mail Service (5.5.2653.19) > = > Hello, > = > excuse me please. > We use your LDAP module to connect to a Microsoft Exchange Server Version > 5.5. > = > But we get bad Values return. > = > Each german letter "=E4=C4=F6=D6=FC=DC=DF" will be replaced with = "aAoOuU?". > = > Do you know, where we must change your Source-Code to solve this problem = ? > = > with kindly regards = > = > Axel M=FCller > Technik und Netze It may not be a problem with Net::LDAP. Net::LDAP doesn't know anything about the character set you used in your string value, and it doesn't know anything about the character set used by the directory server. It simply sends the bytes in your value to the directory server. You need to work out what character set your server is expecting. If it is an LDAPv3 server (and you are binding with version=3D>3 in Net::LDAP) then your string should contain the characters encoded using UTF-8. If it is an LDAPv2 server, then you need to work out how non-standard it is. The standard LDAPv2 character set is called T.61, but the server may not understand this. In T.61 you add accents to characters by putting an extra byte (a non-spacing diacritical) in front of the character. Some common accents = are: umlaut over letter =3D> \xc8 grave accent over letter =3D> \xc1 acute accent over letter =3D> \xc2 (eg =E4 becomes \xc8a) If that doesn't work with Exchange, Exchange is not handling T.61 correctly (ie it is a bug in Exchange.) I'm not sure how to obtain the "=DF". You should try binding using LDAPv3 and using UTF-8 in your string values, it is a lot easier. Cheers, Chris |
From: Graham B. <gb...@po...> - 2001-06-07 09:10:33
|
----- Forwarded message from "\"M?ller, Axel\"" <Axe...@gf...> --= --- Date: Thu, 7 Jun 2001 10:44:37 +0200=20 To: "'gb...@po...'" <gb...@po...> From: "M?ller, Axel" <Axe...@gf...> Subject: ldap X-Mailer: Internet Mail Service (5.5.2653.19) Hello, excuse me please. We use your LDAP module to connect to a Microsoft Exchange Server Version 5.5. But we get bad Values return. Each german letter "=E4=C4=F6=D6=FC=DC=DF" will be replaced with "aAoOuU?= ". Do you know, where we must change your Source-Code to solve this problem = ? with kindly regards =20 Axel M=FCller Technik und Netze GFT Systems GmbH Tel.: +49 (0)3677 663 381 Ehrenbergstr. 11 Fax: +49 (0)3677 6429-11 D-98693 Ilmenau mailto:Axe...@gf... http://www.gft-systems.de ----- End forwarded message ----- |
From: Graham B. <gb...@po...> - 2001-06-06 21:06:30
|
Please try the attached patch. Graham. On Wed, Jun 06, 2001 at 09:02:34PM +0100, Graham Barr wrote: > On Wed, Jun 06, 2001 at 03:49:49PM -0400, David A. Pinkowitz wrote: > > Here is the output: > > > 0098 30 28: SEQUENCE { > > 009A 04 23: STRING = '2.16.840.1.113730.3.4.9' > > 00B3 01 1: BOOLEAN = TRUE > > 00B6 : } > > Hm, Thats wrong. > > It looks like VLV.pm and ASN.pm are out of sync. > > I will make a patch and post it soon. > > Graham. |
From: Graham B. <gb...@po...> - 2001-06-06 20:04:27
|
On Wed, Jun 06, 2001 at 03:49:49PM -0400, David A. Pinkowitz wrote: > Here is the output: > 0098 30 28: SEQUENCE { > 009A 04 23: STRING = '2.16.840.1.113730.3.4.9' > 00B3 01 1: BOOLEAN = TRUE > 00B6 : } Hm, Thats wrong. It looks like VLV.pm and ASN.pm are out of sync. I will make a patch and post it soon. Graham. |
From: David A. P. <dpi...@un...> - 2001-06-06 19:50:46
|
Here is the output: Net::LDAP=HASH(0xc3064) sending: 30 81 B3 02 01 02 63 5D 04 18 6F 75 3D 50 65 6F 0.....c]..ou=Peo 70 6C 65 2C 6F 3D 75 6E 69 70 72 65 73 73 2E 63 ple,o=unipress.c 6F 6D 0A 01 02 0A 01 02 02 01 00 02 01 00 01 01 om.............. 00 A0 30 A1 17 A1 0F 87 02 73 6E 87 09 67 69 76 ..0......sn..giv 65 6E 6E 61 6D 65 87 04 6D 61 69 6C A3 15 04 0B enname..mail.... 6F 62 6A 65 63 74 63 6C 61 73 73 04 06 70 65 72 objectclass..per 73 6F 6E 30 00 A0 4F 30 2F 04 16 31 2E 32 2E 38 son0..O0/..1.2.8 34 30 2E 31 31 33 35 35 36 2E 31 2E 34 2E 34 37 40.113556.1.4.47 33 04 15 30 13 30 04 04 02 73 6E 30 0B 04 09 67 3..0.0...sn0...g 69 76 65 6E 6E 61 6D 65 30 1C 04 17 32 2E 31 36 ivenname0...2.16 2E 38 34 30 2E 31 2E 31 31 33 37 33 30 2E 33 2E .840.1.113730.3. 34 2E 39 01 01 FF __ __ __ __ __ __ __ __ __ __ 4.9... 0000 30 179: SEQUENCE { 0003 02 1: INTEGER = 2 0006 63 93: [APPLICATION 3] { 0008 04 24: STRING = 'ou=People,o=unipress.com' 0022 0A 1: ENUM = 2 0025 0A 1: ENUM = 2 0028 02 1: INTEGER = 0 002B 02 1: INTEGER = 0 002E 01 1: BOOLEAN = FALSE 0031 A0 48: [CONTEXT 0] { 0033 A1 23: [CONTEXT 1] { 0035 A1 15: [CONTEXT 1] { 0037 87 2: [CONTEXT 7] 0039 : 73 6E __ __ __ __ __ __ __ __ __ __ __ __ __ __ sn 003B 87 9: [CONTEXT 7] 003D : 67 69 76 65 6E 6E 61 6D 65 __ __ __ __ __ __ __ givenn ame 0046 : } 0046 87 4: [CONTEXT 7] 0048 : 6D 61 69 6C __ __ __ __ __ __ __ __ __ __ __ __ mail 004C : } 004C A3 21: [CONTEXT 3] { 004E 04 11: STRING = 'objectclass' 005B 04 6: STRING = 'person' 0063 : } 0063 : } 0063 30 0: SEQUENCE { 0065 : } 0065 : } 0065 A0 79: [CONTEXT 0] { 0067 30 47: SEQUENCE { 0069 04 22: STRING = '1.2.840.113556.1.4.473' 0081 04 21: STRING 0083 : 30 13 30 04 04 02 73 6E 30 0B 04 09 67 69 76 65 0.0...sn0. ..give 0093 : 6E 6E 61 6D 65 __ __ __ __ __ __ __ __ __ __ __ nname 0098 : } 0098 30 28: SEQUENCE { 009A 04 23: STRING = '2.16.840.1.113730.3.4.9' 00B3 01 1: BOOLEAN = TRUE 00B6 : } 00B6 : } 00B6 : } Net::LDAP=HASH(0xc3064) received: 30 17 02 01 02 65 12 0A 01 01 04 00 04 0B 56 4C 0....e........VL 56 20 43 6F 6E 74 72 6F 6C __ __ __ __ __ __ __ V Control 0000 30 23: SEQUENCE { 0002 02 1: INTEGER = 2 0005 65 18: [APPLICATION 5] { 0007 0A 1: ENUM = 1 000A 04 0: STRING = '' 000C 04 11: STRING = 'VLV Control' 0019 : } 0019 : } search failed with 1 At 08:39 PM 6/6/01 +0100, Graham Barr wrote: >Can you add > > $ldap->debug(15); > >just before the ->search and send the output on STDERR > >Graham. > >On Wed, Jun 06, 2001 at 02:55:23PM -0400, David A. Pinkowitz wrote: > > I've added the sort controls now. I have tested the sort control alone > and > > it works. But with vlv it gives me trouble. Here is my new code: > > > > -- > > $vlv = Net::LDAP::Control::VLV->new( > > before => 0, # No entries before target entry > > after => 2, # number of entries after target entry > > content => 0, #If set to 0, list size is unknown > > offset => 1, # Target entry is the first > > ); > > > > $sort = Net::LDAP::Control::Sort->new( > > order => "sn givenname" > > ); > > > > $mesg=$ldap->search( > > filter => '(&(|(|(sn=*) (givenname=*)) > > (mail=*))(objectclass=person))', > > base => 'ou=People,o=company.com', > > attrs => $anonAttr, > > control => [ $sort, $vlv ], > > ); > > > > ($resp) = $mesg->control( LDAP_CONTROL_VLVRESPONSE ) or die; > > $vlv->response( $resp ); > > -- > > > > If I leave the last two lines on, I will die when getting the > > VLVRESPONSE. If I remove those lines, I get an error 1, which I > understand > > is an LDAP Operations Error. I'm not sure what I'm doing wrong or what I > > should look for. I believe that I have copied sample code from the > > documentation correctly. Any advice? Thanks to those who have responded > > already. > > > > > > > > -- > > David A. Pinkowitz > > UniPress Software, Inc. > > dpi...@un... > > (732) 287-2100 ext. 943 > > > > > > -- David A. Pinkowitz UniPress Software, Inc. dpi...@un... (732) 287-2100 ext. 943 |
From: Graham B. <gb...@po...> - 2001-06-06 19:41:22
|
Can you add $ldap->debug(15); just before the ->search and send the output on STDERR Graham. On Wed, Jun 06, 2001 at 02:55:23PM -0400, David A. Pinkowitz wrote: > I've added the sort controls now. I have tested the sort control alone and > it works. But with vlv it gives me trouble. Here is my new code: > > -- > $vlv = Net::LDAP::Control::VLV->new( > before => 0, # No entries before target entry > after => 2, # number of entries after target entry > content => 0, #If set to 0, list size is unknown > offset => 1, # Target entry is the first > ); > > $sort = Net::LDAP::Control::Sort->new( > order => "sn givenname" > ); > > $mesg=$ldap->search( > filter => '(&(|(|(sn=*) (givenname=*)) > (mail=*))(objectclass=person))', > base => 'ou=People,o=company.com', > attrs => $anonAttr, > control => [ $sort, $vlv ], > ); > > ($resp) = $mesg->control( LDAP_CONTROL_VLVRESPONSE ) or die; > $vlv->response( $resp ); > -- > > If I leave the last two lines on, I will die when getting the > VLVRESPONSE. If I remove those lines, I get an error 1, which I understand > is an LDAP Operations Error. I'm not sure what I'm doing wrong or what I > should look for. I believe that I have copied sample code from the > documentation correctly. Any advice? Thanks to those who have responded > already. > > > > -- > David A. Pinkowitz > UniPress Software, Inc. > dpi...@un... > (732) 287-2100 ext. 943 > > > |
From: David A. P. <dpi...@un...> - 2001-06-06 18:56:21
|
I've added the sort controls now. I have tested the sort control alone and it works. But with vlv it gives me trouble. Here is my new code: -- $vlv = Net::LDAP::Control::VLV->new( before => 0, # No entries before target entry after => 2, # number of entries after target entry content => 0, #If set to 0, list size is unknown offset => 1, # Target entry is the first ); $sort = Net::LDAP::Control::Sort->new( order => "sn givenname" ); $mesg=$ldap->search( filter => '(&(|(|(sn=*) (givenname=*)) (mail=*))(objectclass=person))', base => 'ou=People,o=company.com', attrs => $anonAttr, control => [ $sort, $vlv ], ); ($resp) = $mesg->control( LDAP_CONTROL_VLVRESPONSE ) or die; $vlv->response( $resp ); -- If I leave the last two lines on, I will die when getting the VLVRESPONSE. If I remove those lines, I get an error 1, which I understand is an LDAP Operations Error. I'm not sure what I'm doing wrong or what I should look for. I believe that I have copied sample code from the documentation correctly. Any advice? Thanks to those who have responded already. -- David A. Pinkowitz UniPress Software, Inc. dpi...@un... (732) 287-2100 ext. 943 |
From: Graham B. <gb...@po...> - 2001-06-06 16:27:57
|
Attached is a patch that makes Net::LDAP::Schema return undef, or empty list, if a given name matches multiple items. I have posted this before, but this patch will set an error element which can be retieved via $schema->error If nobody reports a problem I will commit this soon. Graham. |
From: Jochen S. <Joc...@ic...> - 2001-06-06 15:38:39
|
> So the outer ( ) would be the filter surrounding a filtercomp. The > filtercomp cannot be 'and' (it doesn't start with &), 'or' (not |), 'not' > (not |) or 'item' (not an attr), therefore the filter is not legal. Hm, indeed! We missed this point. Thanks for your answer! Jochen |
From: Chris R. <chr...@me...> - 2001-06-06 15:22:49
|
Graham Barr <gb...@po...> wrote: > > A VLV control must be used woth a sort control. You may be able to detect That makes sense - error 60 is Net::LDAP's LDAP_SORT_CONTROL_MISSING error. > On Wed, Jun 06, 2001 at 10:06:22AM -0400, David A. Pinkowitz wrote: [...] >> If I comment out the last two lines, I get a message "search failed >> with 60." If I take the control out of the search completely, my To understand the error codes (or at least convert them into text), look at the Net::LDAP::Util::ldap_error_name function, and the Net::LDAP::Constant module. Cheers, Chris |
From: Chris R. <chr...@me...> - 2001-06-06 15:20:22
|
Jochen Stenzel <Joc...@ic...> wrote: > Hello, > > we are using Net::LDAP successfully for years now. Working on a query > generator, we just recognized that additional parens around a (partial > or complete) query can make a significant difference even if one would > not expect it: "(sn=name)" supplies results, while "((sn=name))" does > not. Is this behaviour defined? (We looked at RFC 2254 but did not find > a hint.) > > Thanks in advance > > Jochen The ABNF in RFC 2254 does not permit ((sn=name)). ---- filter = "(" filtercomp ")" filtercomp = and / or / not / item and = "&" filterlist or = "|" filterlist not = "!" filter filterlist = 1*filter item = simple / present / substring / extensible simple = attr filtertype value [...] ---- So the outer ( ) would be the filter surrounding a filtercomp. The filtercomp cannot be 'and' (it doesn't start with &), 'or' (not |), 'not' (not |) or 'item' (not an attr), therefore the filter is not legal. Cheers, Chris |
From: Graham B. <gb...@po...> - 2001-06-06 15:08:47
|
A VLV control must be used woth a sort control. You may be able to detect this in $mesg->code. But maybe not as the control is not critical so the server may just ignore it. Graham. On Wed, Jun 06, 2001 at 10:06:22AM -0400, David A. Pinkowitz wrote: > I'm attempting to set up a virtual list view control, but I am running into > some problems. Here is a code segment from some test code I am trying to > use just to make the initial search work: > > -- > $vlv = Net::LDAP::Control::VLV->new( > before => 0, # No entries before target entry > after => 2, # number of entries after target entry > content => 0, # list size is unknown > offset => 1, # Target entry is the first > ); > > $mesg=$ldap->search( > filter => '(&(|(|(sn=*) (givenname=*)) > (mail=*))(objectclass=person))', > base => 'ou=People,o=company.com', > attrs => $anonAttr, > control => [ $vlv ], > ); > > ($resp) = $mesg->control( LDAP_CONTROL_VLVRESPONSE ) or die; > $vlv->response( $resp ); > -- > > When I run this as is, the program dies with the second to last line. If I > comment out the last two lines, I get a message "search failed with > 60." If I take the control out of the search completely, my search works > correctly. Any advice as to what I am doing wrong or how I might debug > it? Thanks in advance. > > > > -- > David A. Pinkowitz > UniPress Software, Inc. > dpi...@un... > (732) 287-2100 ext. 943 > > > |
From: Jochen S. <Joc...@ic...> - 2001-06-06 14:50:18
|
Hello, we are using Net::LDAP successfully for years now. Working on a query generator, we just recognized that additional parens around a (partial or complete) query can make a significant difference even if one would not expect it: "(sn=name)" supplies results, while "((sn=name))" does not. Is this behaviour defined? (We looked at RFC 2254 but did not find a hint.) Thanks in advance Jochen |
From: David A. P. <dpi...@un...> - 2001-06-06 14:07:17
|
I'm attempting to set up a virtual list view control, but I am running into some problems. Here is a code segment from some test code I am trying to use just to make the initial search work: -- $vlv = Net::LDAP::Control::VLV->new( before => 0, # No entries before target entry after => 2, # number of entries after target entry content => 0, # list size is unknown offset => 1, # Target entry is the first ); $mesg=$ldap->search( filter => '(&(|(|(sn=*) (givenname=*)) (mail=*))(objectclass=person))', base => 'ou=People,o=company.com', attrs => $anonAttr, control => [ $vlv ], ); ($resp) = $mesg->control( LDAP_CONTROL_VLVRESPONSE ) or die; $vlv->response( $resp ); -- When I run this as is, the program dies with the second to last line. If I comment out the last two lines, I get a message "search failed with 60." If I take the control out of the search completely, my search works correctly. Any advice as to what I am doing wrong or how I might debug it? Thanks in advance. -- David A. Pinkowitz UniPress Software, Inc. dpi...@un... (732) 287-2100 ext. 943 |
From: Graham B. <gb...@po...> - 2001-06-05 19:06:02
|
On Tue, Jun 05, 2001 at 02:58:54PM -0400, Michael Grinnell wrote: > Hi, I'm fairly new to Net::LDAP (Just started a yesterday). The examples > that I found in the documentation were pretty good, and got me up and > running, but now I'm having a problem that I can't figure out. > > I'm testing a bind to the server with this snippet of code, and when it > fails because I input the wrong password, it returns a 0 ("LDAP_SUCCESS"), > when it should be returning a 49 ("BAD Credentials") > > $ldap = Net::LDAP->new($LDAPSERVER) or die "$@"; > $error = $ldap->bind ( Here you assign to $error > dn => $dn, > password => $FORM{'pass'} > ); > if ($error->code) { here you check $error->code > $ldapmsg = ldap_error_name($mesg->code); here you pass $mesg->code Typo in the Email or your script ? Graham. > $code = $mesg->code; > error("Authentication Failed<P>LDAP replied:<br>$ldapmsg<br>$code"); > } > > (error is a little custom die subroutine that outputs html) > > When it fails, $error->code = 0 > > I am using version 0.23, Perl 5.6.0, on OpenBSD 2.8, connecting to Netware > LDAP v. 3 server > > Any help would be greatly appreciated. Thank you. > Michael Grinnell > gri...@am... > > > perl -V output follows: > > Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration: > Platform: > osname=openbsd, osvers=2.8, archname=i386-openbsd > uname='openbsd' > config_args='-Dopenbsd_distribution=defined -dsE' > hint=recommended, useposix=true, d_sigaction=define > usethreads=undef use5005threads=undef useithreads=undef > usemultiplicity=undef > useperlio=undef d_sfio=undef uselargefiles=define > use64bitint=undef use64bitall=undef uselongdouble=undef usesocks=undef > Compiler: > cc='cc', optimize='-O2', gccversion=2.95.3 19991030 (prerelease) > cppflags='-fno-strict-aliasing -I/usr/local/include' > ccflags ='-fno-strict-aliasing -I/usr/local/include' > stdchar='char', d_stdstdio=undef, usevfork=true > intsize=4, longsize=4, ptrsize=4, doublesize=8 > d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12 > ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', > lseeksize=8 > alignbytes=4, usemymalloc=n, prototype=define > Linker and Libraries: > ld='cc', ldflags ='' > libpth=/usr/lib > libs=-lm -lc > libc=/usr/lib/libc.a, so=so, useshrplib=true, libperl=libperl.so.6.0 > Dynamic Linking: > dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=define, ccdlflags=' ' > cccdlflags='-DPIC -fPIC ', lddlflags='-shared -fPIC ' > > > Characteristics of this binary (from libperl): > Compile-time options: USE_LARGE_FILES > Locally applied patches: > SUIDMAIL - fixes for suidperl security > Built under openbsd > Compiled at Oct 31 2000 17:00:35 > @INC: > /usr/libdata/perl5/i386-openbsd/5.6.0 > /usr/local/libdata/perl5/i386-openbsd/5.6.0 > /usr/libdata/perl5 > /usr/local/libdata/perl5 > /usr/local/libdata/perl5/site_perl/i386-openbsd > /usr/libdata/perl5/site_perl/i386-openbsd > /usr/local/libdata/perl5/site_perl > /usr/libdata/perl5/site_perl > /usr/local/lib/perl5/site_perl > . > > |
From: Christoph N. <en...@ap...> - 2001-06-05 19:00:14
|
Hello all, Not to deviate off-topic too much, but I'm extending the LDAP schema for the university where I work. I'm curious if there is a compelling reason to use the ASCII "IA5String" (1.3.6.1.4.1.1466.115.121.1.26) instead of the UTF8 "directoryString" (1.3.6.1.4.1.1466.115.121.1.15) type. Is there some sort of performance gain or added benefit of using the ASCII string? Or is the advantage to simply use the directory to enforce the data? - Christoph |
From: Michael G. <gri...@am...> - 2001-06-05 18:58:51
|
Hi, I'm fairly new to Net::LDAP (Just started a yesterday). The examples that I found in the documentation were pretty good, and got me up and running, but now I'm having a problem that I can't figure out. I'm testing a bind to the server with this snippet of code, and when it fails because I input the wrong password, it returns a 0 ("LDAP_SUCCESS"), when it should be returning a 49 ("BAD Credentials") $ldap = Net::LDAP->new($LDAPSERVER) or die "$@"; $error = $ldap->bind ( dn => $dn, password => $FORM{'pass'} ); if ($error->code) { $ldapmsg = ldap_error_name($mesg->code); $code = $mesg->code; error("Authentication Failed<P>LDAP replied:<br>$ldapmsg<br>$code"); } (error is a little custom die subroutine that outputs html) When it fails, $error->code = 0 I am using version 0.23, Perl 5.6.0, on OpenBSD 2.8, connecting to Netware LDAP v. 3 server Any help would be greatly appreciated. Thank you. Michael Grinnell gri...@am... perl -V output follows: Summary of my perl5 (revision 5.0 version 6 subversion 0) configuration: Platform: osname=openbsd, osvers=2.8, archname=i386-openbsd uname='openbsd' config_args='-Dopenbsd_distribution=defined -dsE' hint=recommended, useposix=true, d_sigaction=define usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef useperlio=undef d_sfio=undef uselargefiles=define use64bitint=undef use64bitall=undef uselongdouble=undef usesocks=undef Compiler: cc='cc', optimize='-O2', gccversion=2.95.3 19991030 (prerelease) cppflags='-fno-strict-aliasing -I/usr/local/include' ccflags ='-fno-strict-aliasing -I/usr/local/include' stdchar='char', d_stdstdio=undef, usevfork=true intsize=4, longsize=4, ptrsize=4, doublesize=8 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12 ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8 alignbytes=4, usemymalloc=n, prototype=define Linker and Libraries: ld='cc', ldflags ='' libpth=/usr/lib libs=-lm -lc libc=/usr/lib/libc.a, so=so, useshrplib=true, libperl=libperl.so.6.0 Dynamic Linking: dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=define, ccdlflags=' ' cccdlflags='-DPIC -fPIC ', lddlflags='-shared -fPIC ' Characteristics of this binary (from libperl): Compile-time options: USE_LARGE_FILES Locally applied patches: SUIDMAIL - fixes for suidperl security Built under openbsd Compiled at Oct 31 2000 17:00:35 @INC: /usr/libdata/perl5/i386-openbsd/5.6.0 /usr/local/libdata/perl5/i386-openbsd/5.6.0 /usr/libdata/perl5 /usr/local/libdata/perl5 /usr/local/libdata/perl5/site_perl/i386-openbsd /usr/libdata/perl5/site_perl/i386-openbsd /usr/local/libdata/perl5/site_perl /usr/libdata/perl5/site_perl /usr/local/lib/perl5/site_perl . |