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: Graham B. <gb...@po...> - 2002-02-05 17:26:22
|
On Tue, Feb 05, 2002 at 03:45:07PM +0100, Norbert Klasen wrote: > > > --On Montag, 4. Februar 2002 20:15 +0000 Graham Barr <gb...@po...> > wrote: > > > Hm, that one fails some test :( > > > > try this > > This works like a charm. Tanks a lot! Well, actually I am not happy with that patch. It has some unwanted effects. I am working on a more general one. > For the interested I attached a sample perl script to decode X.509 > certificates. Do you mind if I include it in the distribution ? Graham. |
From: Norbert K. <nor...@da...> - 2002-02-05 17:14:18
|
--On Montag, 4. Februar 2002 20:15 +0000 Graham Barr <gb...@po...>=20 wrote: > Hm, that one fails some test :( > > try this This works like a charm. Tanks a lot! For the interested I attached a sample perl script to decode X.509=20 certificates. --=20 Norbert Klasen DAASI International GmbH phone: +49 7071 29 70336 Wilhelmstr. 106 fax: +49 7071 29 5114 72074 T=FCbingen email: nor...@da... Germany web: http://www.daasi.de |
From: Brian S. <sul...@dt...> - 2002-02-05 17:08:41
|
All, Was wondering if anyone could help. I installed perLDAP on a Solaris 2.6 box. I used perLDAP 1.4.1 and I compiled it with the Netscape C SDK. I tried it with 3.1, 4.1 and the 4.14 SDK's. When I run my trusty little perldap test script I get the following ld.so.1: /usr/local/bin/perl: fatal: relocation error: file /usr/local/lib/perl5/site_perl/5.005/sun4-solaris/auto/Mozilla/LDAP/API/API.so: symbol ldap_set_option: referenced symbol not found Killed Any ideas what I might have done wrong? Brian |
From: Graham B. <gb...@po...> - 2002-02-04 20:16:45
|
On Mon, Feb 04, 2002 at 07:16:53PM +0000, Graham Barr wrote: > On Mon, Feb 04, 2002 at 07:31:14PM +0100, Norbert Klasen wrote: > > Hi Graham, > > > > > Support for nested SEQUENCE/SET OF's > > > > I tested my script for decoding X.509 certificates again, and it now works > > for RDNs (SEQUENCE OF SET OF). However, I still cannot decode the CRL > > distributions points extenstion, which is a SEQUNCE OF SEQUNCE. The script > > dies with the following error message "Modification of a read-only value > > attempted at /usr/lib/perl5/site_perl/5.6.0/Convert/ASN1/_decode.pm line > > 319." > > > > Attached is a small script that show this behavior and an extract from a > > certificate. > > Ah, this happens because the top level element in that you are decoding is a sequence of. > > Try the attached patch. What will happen is that in the case that the top-level > element id a sequence of, decode will return an array ref instead of > a hash ref. Hm, that one fails some test :( try this Graham. |
From: Graham B. <gb...@po...> - 2002-02-04 19:17:58
|
On Mon, Feb 04, 2002 at 07:31:14PM +0100, Norbert Klasen wrote: > Hi Graham, > > > Support for nested SEQUENCE/SET OF's > > I tested my script for decoding X.509 certificates again, and it now works > for RDNs (SEQUENCE OF SET OF). However, I still cannot decode the CRL > distributions points extenstion, which is a SEQUNCE OF SEQUNCE. The script > dies with the following error message "Modification of a read-only value > attempted at /usr/lib/perl5/site_perl/5.6.0/Convert/ASN1/_decode.pm line > 319." > > Attached is a small script that show this behavior and an extract from a > certificate. Ah, this happens because the top level element in that you are decoding is a sequence of. Try the attached patch. What will happen is that in the case that the top-level element id a sequence of, decode will return an array ref instead of a hash ref. Graham. |
From: Norbert K. <nor...@da...> - 2002-02-04 18:34:51
|
Hi Graham, > Support for nested SEQUENCE/SET OF's I tested my script for decoding X.509 certificates again, and it now works=20 for RDNs (SEQUENCE OF SET OF). However, I still cannot decode the CRL=20 distributions points extenstion, which is a SEQUNCE OF SEQUNCE. The script=20 dies with the following error message "Modification of a read-only value=20 attempted at /usr/lib/perl5/site_perl/5.6.0/Convert/ASN1/_decode.pm line=20 319." Attached is a small script that show this behavior and an extract from a=20 certificate. --=20 Norbert Klasen DAASI International GmbH phone: +49 7071 29 70336 Wilhelmstr. 106 fax: +49 7071 29 5114 72074 T=FCbingen email: nor...@da... Germany web: http://www.daasi.de |
From: Graham B. <gb...@po...> - 2002-02-04 15:07:44
|
On Sun, Feb 03, 2002 at 06:24:04PM +0100, Peter Marschall wrote: > Hi, > > while playing around with perl-ldap 0.25, I found that Net::LDAP::LDIF > has a problem reading LDIF files conforming to RFC2849. > It chokes on the required line "version: 1" Thanks for the patch. A fix has been submitted to CVS and will be in 0.26 Graham. > I have written a small patch for Net::LDAP::LDIF.pm that fixes the problem. > It allows to read in the version an to write out a version that was given as > an option to new(). > > Although it may not be perfect, it helped me with my LDIF files > generated from various LDAP servers. > > I would appreciate if some parts of the functionality would make it into > perl-ldap 0.26 > > Yours > Peter > > -- > Peter Marschall | eMail: pet...@ma... > Scheffelstraße 15 | pet...@is... > 97072 Würzburg | Tel: 0931/14721 > PGP: D7 FF 20 FE E6 6B 31 74 D1 10 88 E0 3C FE 28 35 |
From: Torsten E. <tor...@os...> - 2002-02-04 14:52:29
|
>> >>I can't add DN over perl (Net::LDAP) >>--- >> $mesg = $ldap->add( >> dn => "uid=" . $uid .",". $wohin, >> attr => [ >> 'objectclass' => uri_unescape($query->param('objectclass')), >>......; >> >> >> > > What might be happening is that your > uri_unescape($query->param('objectclass')) call is returning a list of > objectclasses, which is turning your call into: > > attr => [ > 'objectclass' => 'top', > 'organizationalPerson' => 'inetOrgPerson', > 'mailrecipient' => 'nsmessagingserveruser', > ... > ] > > Probably not what you want! > > Surround the call to uri_unescape with [ ]: > > attr => [ > 'objectclass' => [ uri_unescape(...) ], > ... > ] > Thanks, the forgotten brackets are the solution! bye Torsten -- OSTSEE-ZEITUNG [http://www.ostsee-zeitung.de] Richard-Wagner-Straße 1a / 18055 Rostock Tel.: [0381] 365 108 / Fax: [0381] 365 584 |
From: Chris R. <chr...@me...> - 2002-02-04 13:37:15
|
Torsten Eymann <tor...@os...> wrote: > Hi, > > > I can't add DN over perl (Net::LDAP) > --- > $mesg = $ldap->add( > dn => "uid=" . $uid .",". $wohin, > attr => [ > 'objectclass' => uri_unescape($query->param('objectclass')), > ......; > > The Browser say's: > ADD Now dn:uid=TTor1,ou=Special Users,o=oz.de ''top', > 'organizationalPerson', 'inetOrgPerson', 'mailrecipient', > 'nsmessagingserveruser', 'nslicenseuser', 'oz'' failed to add entry: > Object class violation 65, Object class violation > > > > The Netscape error-log show: > [04/Feb/2002:13:52:46 +0100] - Entry (uid=TTor1,ou=Special Users,o=oz.de) > attr (organizationalperson) not allowed [04/Feb/2002:13:52:46 +0100] - > Entry (uid=TTor1,ou=Special Users,o=oz.de) attr (mailrecipient) not > allowed [04/Feb/2002:13:52:46 +0100] - Entry (uid=TTor1,ou=Special > Users,o=oz.de) attr (nslicenseuser) not allowed > > > Why dropped the NS-LDAP Server any objectclasses, if I use the > perl-module? What might be happening is that your uri_unescape($query->param('objectclass')) call is returning a list of objectclasses, which is turning your call into: attr => [ 'objectclass' => 'top', 'organizationalPerson' => 'inetOrgPerson', 'mailrecipient' => 'nsmessagingserveruser', ... ] Probably not what you want! Surround the call to uri_unescape with [ ]: attr => [ 'objectclass' => [ uri_unescape(...) ], ... ] Cheers, Chris |
From: Torsten E. <tor...@os...> - 2002-02-04 13:10:47
|
Hi, I can't add DN over perl (Net::LDAP) --- $mesg = $ldap->add( dn => "uid=" . $uid .",". $wohin, attr => [ 'objectclass' => uri_unescape($query->param('objectclass')), ......; The Browser say's: ADD Now dn:uid=TTor1,ou=Special Users,o=oz.de ''top', 'organizationalPerson', 'inetOrgPerson', 'mailrecipient', 'nsmessagingserveruser', 'nslicenseuser', 'oz'' failed to add entry: Object class violation 65, Object class violation The Netscape error-log show: [04/Feb/2002:13:52:46 +0100] - Entry (uid=TTor1,ou=Special Users,o=oz.de) attr (organizationalperson) not allowed [04/Feb/2002:13:52:46 +0100] - Entry (uid=TTor1,ou=Special Users,o=oz.de) attr (mailrecipient) not allowed [04/Feb/2002:13:52:46 +0100] - Entry (uid=TTor1,ou=Special Users,o=oz.de) attr (nslicenseuser) not allowed Why dropped the NS-LDAP Server any objectclasses, if I use the perl-module? Thanks, Torsten -- OSTSEE-ZEITUNG [http://www.ostsee-zeitung.de] Richard-Wagner-Straße 1a / 18055 Rostock Tel.: [0381] 365 108 / Fax: [0381] 365 584 |
From: Norbert K. <nor...@da...> - 2002-02-04 10:28:41
|
--On Montag, 28. Januar 2002 23:54 +0000 Graham Barr <gb...@po...>=20 wrote: > I'm looking into creating a mini-LDAP server that sendmail can talk to, > which does nothing more than lookup an email address to see if it exists > in our sybase database. > > I guess I'm looking for sort of an LDAP proxy. OpenLDAP has an SQL backend which can present information stored in some=20 RDBMS as an LDAP subtree. It uses ODBC but has so far only been tested with = mssql, mysql and Oracle. --=20 Norbert Klasen DAASI International GmbH phone: +49 7071 29 70336 Wilhelmstr. 106 fax: +49 7071 29 5114 72074 T=FCbingen email: nor...@da... Germany web: http://www.daasi.de |
From: Peter M. <pet...@ma...> - 2002-02-03 18:19:40
|
Hi, while playing around with perl-ldap 0.25, I found that Net::LDAP::LDIF has a problem reading LDIF files conforming to RFC2849. It chokes on the required line "version: 1" I have written a small patch for Net::LDAP::LDIF.pm that fixes the proble= m. It allows to read in the version an to write out a version that was given= as an option to new(). Although it may not be perfect, it helped me with my LDIF files generated from various LDAP servers. I would appreciate if some parts of the functionality would make it into perl-ldap 0.26 Yours Peter --=20 Peter Marschall | eMail: pet...@ma... Scheffelstra=DFe 15 | pet...@is... 97072 W=FCrzburg | Tel: 0931/14721 PGP: D7 FF 20 FE E6 6B 31 74 D1 10 88 E0 3C FE 28 35 |
From: Abu @ T. D. C. <ab...@tr...> - 2002-02-01 06:51:09
|
Hello. if somebody experience with DBD::LDAP please share to me, and i need sample code. I still comfuse writing .ldb file, and my perl code still error: Oops! The following error occurred when processing your request: No such table. () Here's some more information to help you: file: people is there DBD::LDAP mailing list? Thanks for help. -- __ (oo) / \/ \ GnuPg public information pub 1024/EBD26280 `V__V' A9A9 8F57 9E9D 14E3 05B4 3EDB C241 A313 EBD2 6280 You will always have good luck in your personal affairs. |
From: Graham B. <gb...@po...> - 2002-01-31 13:32:35
|
On Thu, Jan 31, 2002 at 09:39:32AM +0100, Piotr Roszatycki wrote: > > print "\n" if tell($self->{'fh'}) > 0; > > That works fine. Will you commit this change to CVS? Actually it will not work :( As for pipes it will always return -1 and so never output the \n I have a different patch that I have commited to CVS. Graham. |
From: Graham B. <gb...@po...> - 2002-01-31 13:24:30
|
On Thu, Jan 31, 2002 at 10:13:15AM +0100, Vincent MATHIEU wrote: > The patch doesn't work. > I propose another patch (diff LDAP.pm file from LDAP.pm) which works in the same way that the other API LDAP (netscape, openldap, perldap Mozilla, ...) That because there was a bug in it :) I do not like the comma separated list, it is very un-perl like. A new, working patch, is attached. Graham. |
From: Vincent M. <Vin...@un...> - 2002-01-31 09:12:12
|
The patch doesn't work. I propose another patch (diff LDAP.pm file from LDAP.pm) which works in the same way that the other API LDAP (netscape, openldap, perldap Mozilla, ...) Following syntaxes are possible: Net::LDAP->new(ldap.univ.fr); -> ldap on port 389 Net::LDAP->new(ldap.univ.fr, port => 392); -> ldap on port 392 Net::LDAP->new(ldap.univ.fr:392); -> ldap on port 392 Net::LDAP->new(ldap.univ.fr:392, port => 395); -> ldap on port 392 Net::LDAP->new(ldap.univ.fr, ldap2.univ.fr); -> ldap on port 389, then ldap2 on port 389 if impossible connection on ldap:389 Net::LDAP->new(ldap.univ.fr, ldap2.univ.fr, port => 395); -> ldap on port 395, then ldap2 on port 395 if impossible connection on ldap:395 Net::LDAP->new(ldap.univ.fr:392, ldap2.univ.fr); -> ldap on port 392, then ldap2 on port 389 if impossible connection on ldap:392 Net::LDAP->new(ldap.univ.fr:392, ldap2.univ.fr:395); -> ldap on port 392, then ldap2 on port 395 if impossible connection on ldap:392 Net::LDAP->new(ldap.univ.fr:392, ldap2.univ.fr, port => 395); -> ldap on port 392, then ldap2 on port 395 if impossible connection on ldap The other options are available. Vincent A 13:20 30/01/02 +0000, Graham Barr a écrit : >Several people have ask for this in the past. > >Try the attached patch. It accepts an array ref for the host and >will try each in turn. > >Graham. > >On Wed, Jan 30, 2002 at 11:22:01AM +0100, Vincent MATHIEU wrote: >> Hi, >> >> I use the perldap module to acces LDAP server (OpenLDAP). >> >> I use replica servers LDAP and I wish to be able to access the backup server in case of dysfunction >> of the master server. >> >> With other api, it is possible to indicate in the server names a list of servers. >> >> for exemple : >> $ldap = Net::LDAP->new(ldap.univ.fr:392,ldap2.univ-nancy2.fr:395); >> >> if ldap.univ-nancy2.fr:392 is unaccessible, then an attempt is made for access to ldap2.univ-nancy2.fr:395 >> >> It is not possible actualy do do this with the Net::LDAP module. >> >> Is it possible to modify the module so that it accepts this possibility (I can propose the patch) either I should create a class perl which inherits from the class Net::LDAP? >> >> Thanks >> >> >> -- >> Vincent MATHIEU >> CRI - Universite NANCY 2 | Email : Vin...@un... >> Pole Lorrain de Gestion | Tel : (33) 03.83.39.64.06 >> 13, Rue Michel Ney - C.O. 75 | Fax : (33) 03.83.39.64.43 >> 54013 Nancy Cedex. FRANCE |
From: Piotr R. <Pio...@ne...> - 2002-01-31 08:39:54
|
> print "\n" if tell($self->{'fh'}) > 0; That works fine. Will you commit this change to CVS? -- Piotr Roszatycki, Netia Telekom S.A. .''`. mailto:Pio...@ne... : :' : mailto:de...@de... `. `' `- |
From: K R. <kr...@ya...> - 2002-01-30 17:43:19
|
Thank you so much, Christopher. I finally got the script to work! It was so exciting. kary FROM: Christopher A BongaartsDATE: 01/14/2002 13:38:24SUBJECT: RE: Is it possible to query DNS for a SRV record in perl? As K Reddy once put it so eloquently: > Instead, he suggested that I query DNS for the SRV > record, which looks like this: > _.gc._tcp.us-city._sites.company.com. > > It worked when I used nslookup from a DOS prompt, but > I'm not sure how to look it up in UNIX. > I tried the Net::DNS module, but I honestly couldn't > figure out how (or if) it works for looking up SRV > records. Here is the code we use to lookup the PDC for doing Active Directory updates, using Net::DNS. Call it with the domain that you're trying to update. Returns a hostname and port. Note that I "hardcode" in the LDAPS port (via getservbyname) since MS doesn't define _ldaps as a service name. Change ldaps to ldap in the getservbyname, or return $rr->port to use the port in the SRV record, if you want non-ssl LDAP. ####snip sub lookup_pdc { my ($dc) = @_; my $res = new Net::DNS::Resolver; my $query = $res->send("_ldap._tcp.pdc._msdcs.$dc", "SRV"); if ($query) { foreach $rr ($query->answer) { next unless $rr->type eq 'SRV'; # return first found; find ldaps port from services file since # there's no _ldaps SRV record return $rr->target, scalar getservbyname('ldaps', 'tcp'); } } else { ¬e("SRV lookup failed: " . $res->errorstring); } return; } ####snip %% Christopher A. Bongaarts %% <EMAIL: PROTECTED> %% %% Internet Services %% http://umn.edu/~cab %% %% University of Minnesota %% +1 (612) 625-1809 %% __________________________________________________ Do You Yahoo!? Great stuff seeking new owners in Yahoo! Auctions! http://auctions.yahoo.com |
From: Graham B. <gb...@po...> - 2002-01-30 17:26:05
|
Consider this a temporary measure. I do plan to implement the controls being attached to the entry. Although $mesg->control should alway return controls from the last PDU recieved. Graham. On Wed, Jan 30, 2002 at 12:25:59PM -0500, Marc Sherman wrote: > Graham, > > Thank you! That worked!! FWIW, I've been using Net::LDAP for a couple of > weeks and it's great :) > > Marc Sherman > BioNetrix Inc. > > > > -----Original Message----- > > From: Graham Barr [mailto:gb...@po...] > > Sent: Wednesday, January 30, 2002 10:58 AM > > To: Marc Sherman > > Cc: 'per...@li...' > > Subject: Re: question about Net::LDAP::Message->control() > > > > > > I see two problems here, A bug in your code and a bug in Net::LDAP > > > > ->control returns a list, so calling it in a scalar context > > will simply > > return how many controls there were. You should also really > > pass the OID > > of the control you are looking for. > > > > But the bug in Net::LDAP is that it is not extracting controls from > > SearchResultEntry PDUs, but only SearchResultDone PDUs > > > > > > Simply adding > > > > $self->{controls} = $result->{controls} > > if exists $result->{controls}; > > > > at around line 38 in lib/Net/LDAP?Search.pm should solve that. > > > > However, this will only work for use in a callback, like you > > are doing. > > > > if someone just did the search then traversed the entry list, > > these controls > > would be lost. > > > > What is needed is for the Entry class to be able to hold > > controls, which is > > something that is needed for LDIF too. > > > > Graham. > > > > On Wed, Jan 30, 2002 at 10:14:00AM -0500, Marc Sherman wrote: > > > Hello, > > > > > > I'm trying to get persistent search working and I've been able to > > > successfully send the persistent search control to the > > server. When I make a > > > change on the server, it successfully sends me an entry > > change notification > > > control in response. I catch this response in the callback > > that I specified > > > to Net::LDAP->search() and I'm able to print out the DN of > > the changed > > > entry. My problem is that I am not able to extract the > > change notification > > > control in the response message. Here is the debug output > > which shows that > > > the control (OID 2.16.840.1.113730.3.4.7) is present in the response > > > message: > > > > > > Net::LDAP=HASH(0x1bdf0a8) received: > > > > > > 30 53 02 01 02 64 26 04 22 63 6E 3D 4C 75 63 79 0S...d&."cn=Lucy > > > 2C 6F 75 3D 44 65 76 65 6C 6F 70 6D 65 6E 74 2C ,ou=Development, > > > 6F 3D 42 69 6F 6E 65 74 72 69 78 30 00 A0 26 30 o=Bionetrix0..&0 > > > 24 04 17 32 2E 31 36 2E 38 34 30 2E 31 2E 31 31 $..2.16.840.1.11 > > > 33 37 33 30 2E 33 2E 34 2E 37 04 09 30 84 00 00 3730.3.4.7..0... > > > 00 03 0A 01 04 __ __ __ __ __ __ __ __ __ __ __ ..... > > > > > > 0000 83: SEQUENCE { > > > 0002 1: INTEGER = 2 > > > 0005 38: [APPLICATION 4] { > > > 0007 34: STRING = 'cn=Lucy,ou=Development,o=Bionetrix' > > > 002B 0: SEQUENCE { > > > 002D : } > > > 002D : } > > > 002D 38: [CONTEXT 0] { > > > 002F 36: SEQUENCE { > > > 0031 23: STRING = '2.16.840.1.113730.3.4.7' > > > 004A 9: STRING > > > 004C : 30 84 00 00 00 03 0A 01 04 __ __ __ __ > > __ __ __ 0........ > > > 0055 : } > > > 0055 : } > > > 0055 : } > > > In scrhCallBack !! > > > Got an entry !! > > > DN = cn=Lucy,ou=Development,o=Bionetrix > > > Died at D:\BAS\GenericSync\LDAP\test3.pl line 75. > > > > > > Here's my callback code: > > > > > > sub srchCallBack > > > { > > > my ($r, $obj) = @_; > > > print "In scrhCallBack !!\n"; > > > if (!$obj) > > > { > > > print "\t", $r->error, "\n"; > > > } > > > elsif ($obj->isa('Net::LDAP::Entry')) > > > { > > > print "\tGot an entry !!\n"; > > > print "\t\tDN = ", $obj->dn, "\n"; > > > $cbCtrl = $r->control or die "$@"; > > > print "\t\t", $cbCtrl, "\n"; > > > } > > > else > > > { > > > print "\tGot a reference !!\n"; > > > } > > > } > > > > > > As you can see my program dies as a result of $r->control > > failing. I tried > > > getting $r->code and $r->error but these methods cause the > > program to block > > > until the next change notification is received from the > > server. Any hints on > > > how to get the control? > > > > > > thanks, > > > Marc > > > > > > > > > > > > > > > > > > > > |
From: Graham B. <gb...@po...> - 2002-01-30 17:24:24
|
On Wed, Jan 30, 2002 at 04:45:11PM +0100, Piotr Roszatycki wrote: > > perl -le 'print tell(STDOUT);' > > > > So Net::LDAP::LDIF thinks it is not at the start of the file and > > outputs the blank line. > > > > It probably nees to be fixed, but it only happens when the output > > is really to a terminal, so I don't see the urgency. If you redirect > > to a file its fine > > > > perl -le 'warn tell(STDOUT);' > out > > 0 at -e line 1. > > Ah, I see. > > Unfortunately: > > perl -le 'warn tell(STDOUT);' | cat > out > -1 at -e line 1. Ah. > Maybe > > print "\n" if tell($self->{'fh'}) && $self->{'file'} ne "STDOUT"; > > would help? Why not just print "\n" if tell($self->{'fh'}) > 0; Graham. |
From: Marc S. <msh...@bi...> - 2002-01-30 17:22:22
|
Graham, Thank you! That worked!! FWIW, I've been using Net::LDAP for a couple of weeks and it's great :) Marc Sherman BioNetrix Inc. > -----Original Message----- > From: Graham Barr [mailto:gb...@po...] > Sent: Wednesday, January 30, 2002 10:58 AM > To: Marc Sherman > Cc: 'per...@li...' > Subject: Re: question about Net::LDAP::Message->control() > > > I see two problems here, A bug in your code and a bug in Net::LDAP > > ->control returns a list, so calling it in a scalar context > will simply > return how many controls there were. You should also really > pass the OID > of the control you are looking for. > > But the bug in Net::LDAP is that it is not extracting controls from > SearchResultEntry PDUs, but only SearchResultDone PDUs > > > Simply adding > > $self->{controls} = $result->{controls} > if exists $result->{controls}; > > at around line 38 in lib/Net/LDAP?Search.pm should solve that. > > However, this will only work for use in a callback, like you > are doing. > > if someone just did the search then traversed the entry list, > these controls > would be lost. > > What is needed is for the Entry class to be able to hold > controls, which is > something that is needed for LDIF too. > > Graham. > > On Wed, Jan 30, 2002 at 10:14:00AM -0500, Marc Sherman wrote: > > Hello, > > > > I'm trying to get persistent search working and I've been able to > > successfully send the persistent search control to the > server. When I make a > > change on the server, it successfully sends me an entry > change notification > > control in response. I catch this response in the callback > that I specified > > to Net::LDAP->search() and I'm able to print out the DN of > the changed > > entry. My problem is that I am not able to extract the > change notification > > control in the response message. Here is the debug output > which shows that > > the control (OID 2.16.840.1.113730.3.4.7) is present in the response > > message: > > > > Net::LDAP=HASH(0x1bdf0a8) received: > > > > 30 53 02 01 02 64 26 04 22 63 6E 3D 4C 75 63 79 0S...d&."cn=Lucy > > 2C 6F 75 3D 44 65 76 65 6C 6F 70 6D 65 6E 74 2C ,ou=Development, > > 6F 3D 42 69 6F 6E 65 74 72 69 78 30 00 A0 26 30 o=Bionetrix0..&0 > > 24 04 17 32 2E 31 36 2E 38 34 30 2E 31 2E 31 31 $..2.16.840.1.11 > > 33 37 33 30 2E 33 2E 34 2E 37 04 09 30 84 00 00 3730.3.4.7..0... > > 00 03 0A 01 04 __ __ __ __ __ __ __ __ __ __ __ ..... > > > > 0000 83: SEQUENCE { > > 0002 1: INTEGER = 2 > > 0005 38: [APPLICATION 4] { > > 0007 34: STRING = 'cn=Lucy,ou=Development,o=Bionetrix' > > 002B 0: SEQUENCE { > > 002D : } > > 002D : } > > 002D 38: [CONTEXT 0] { > > 002F 36: SEQUENCE { > > 0031 23: STRING = '2.16.840.1.113730.3.4.7' > > 004A 9: STRING > > 004C : 30 84 00 00 00 03 0A 01 04 __ __ __ __ > __ __ __ 0........ > > 0055 : } > > 0055 : } > > 0055 : } > > In scrhCallBack !! > > Got an entry !! > > DN = cn=Lucy,ou=Development,o=Bionetrix > > Died at D:\BAS\GenericSync\LDAP\test3.pl line 75. > > > > Here's my callback code: > > > > sub srchCallBack > > { > > my ($r, $obj) = @_; > > print "In scrhCallBack !!\n"; > > if (!$obj) > > { > > print "\t", $r->error, "\n"; > > } > > elsif ($obj->isa('Net::LDAP::Entry')) > > { > > print "\tGot an entry !!\n"; > > print "\t\tDN = ", $obj->dn, "\n"; > > $cbCtrl = $r->control or die "$@"; > > print "\t\t", $cbCtrl, "\n"; > > } > > else > > { > > print "\tGot a reference !!\n"; > > } > > } > > > > As you can see my program dies as a result of $r->control > failing. I tried > > getting $r->code and $r->error but these methods cause the > program to block > > until the next change notification is received from the > server. Any hints on > > how to get the control? > > > > thanks, > > Marc > > > > > > > > > > > > > |
From: Graham B. <gb...@po...> - 2002-01-30 15:59:00
|
I see two problems here, A bug in your code and a bug in Net::LDAP ->control returns a list, so calling it in a scalar context will simply return how many controls there were. You should also really pass the OID of the control you are looking for. But the bug in Net::LDAP is that it is not extracting controls from SearchResultEntry PDUs, but only SearchResultDone PDUs Simply adding $self->{controls} = $result->{controls} if exists $result->{controls}; at around line 38 in lib/Net/LDAP?Search.pm should solve that. However, this will only work for use in a callback, like you are doing. if someone just did the search then traversed the entry list, these controls would be lost. What is needed is for the Entry class to be able to hold controls, which is something that is needed for LDIF too. Graham. On Wed, Jan 30, 2002 at 10:14:00AM -0500, Marc Sherman wrote: > Hello, > > I'm trying to get persistent search working and I've been able to > successfully send the persistent search control to the server. When I make a > change on the server, it successfully sends me an entry change notification > control in response. I catch this response in the callback that I specified > to Net::LDAP->search() and I'm able to print out the DN of the changed > entry. My problem is that I am not able to extract the change notification > control in the response message. Here is the debug output which shows that > the control (OID 2.16.840.1.113730.3.4.7) is present in the response > message: > > Net::LDAP=HASH(0x1bdf0a8) received: > > 30 53 02 01 02 64 26 04 22 63 6E 3D 4C 75 63 79 0S...d&."cn=Lucy > 2C 6F 75 3D 44 65 76 65 6C 6F 70 6D 65 6E 74 2C ,ou=Development, > 6F 3D 42 69 6F 6E 65 74 72 69 78 30 00 A0 26 30 o=Bionetrix0..&0 > 24 04 17 32 2E 31 36 2E 38 34 30 2E 31 2E 31 31 $..2.16.840.1.11 > 33 37 33 30 2E 33 2E 34 2E 37 04 09 30 84 00 00 3730.3.4.7..0... > 00 03 0A 01 04 __ __ __ __ __ __ __ __ __ __ __ ..... > > 0000 83: SEQUENCE { > 0002 1: INTEGER = 2 > 0005 38: [APPLICATION 4] { > 0007 34: STRING = 'cn=Lucy,ou=Development,o=Bionetrix' > 002B 0: SEQUENCE { > 002D : } > 002D : } > 002D 38: [CONTEXT 0] { > 002F 36: SEQUENCE { > 0031 23: STRING = '2.16.840.1.113730.3.4.7' > 004A 9: STRING > 004C : 30 84 00 00 00 03 0A 01 04 __ __ __ __ __ __ __ 0........ > 0055 : } > 0055 : } > 0055 : } > In scrhCallBack !! > Got an entry !! > DN = cn=Lucy,ou=Development,o=Bionetrix > Died at D:\BAS\GenericSync\LDAP\test3.pl line 75. > > Here's my callback code: > > sub srchCallBack > { > my ($r, $obj) = @_; > print "In scrhCallBack !!\n"; > if (!$obj) > { > print "\t", $r->error, "\n"; > } > elsif ($obj->isa('Net::LDAP::Entry')) > { > print "\tGot an entry !!\n"; > print "\t\tDN = ", $obj->dn, "\n"; > $cbCtrl = $r->control or die "$@"; > print "\t\t", $cbCtrl, "\n"; > } > else > { > print "\tGot a reference !!\n"; > } > } > > As you can see my program dies as a result of $r->control failing. I tried > getting $r->code and $r->error but these methods cause the program to block > until the next change notification is received from the server. Any hints on > how to get the control? > > thanks, > Marc > > > > > > |
From: Piotr R. <Pio...@ne...> - 2002-01-30 15:45:28
|
> perl -le 'print tell(STDOUT);' > > So Net::LDAP::LDIF thinks it is not at the start of the file and > outputs the blank line. > > It probably nees to be fixed, but it only happens when the output > is really to a terminal, so I don't see the urgency. If you redirect > to a file its fine > > perl -le 'warn tell(STDOUT);' > out > 0 at -e line 1. Ah, I see. Unfortunately: perl -le 'warn tell(STDOUT);' | cat > out -1 at -e line 1. Maybe print "\n" if tell($self->{'fh'}) && $self->{'file'} ne "STDOUT"; would help? -- Piotr Roszatycki, Netia Telekom S.A. .''`. mailto:Pio...@ne... : :' : mailto:de...@de... `. `' `- |
From: Graham B. <gb...@po...> - 2002-01-30 15:19:50
|
On Wed, Jan 30, 2002 at 04:05:24PM +0100, Piotr Roszatycki wrote: > On Wed, 30 Jan 2002, Graham Barr wrote: > > The newline only happens when outputing to stdout, if you change > > the output to a file you do not see the newline. > > Why the output for stdout is different? perl -le 'print tell(STDOUT);' So Net::LDAP::LDIF thinks it is not at the start of the file and outputs the blank line. It probably nees to be fixed, but it only happens when the output is really to a terminal, so I don't see the urgency. If you redirect to a file its fine perl -le 'warn tell(STDOUT);' > out 0 at -e line 1. Graham. |
From: Marc S. <msh...@bi...> - 2002-01-30 15:10:20
|
Hello, I'm trying to get persistent search working and I've been able to successfully send the persistent search control to the server. When I make a change on the server, it successfully sends me an entry change notification control in response. I catch this response in the callback that I specified to Net::LDAP->search() and I'm able to print out the DN of the changed entry. My problem is that I am not able to extract the change notification control in the response message. Here is the debug output which shows that the control (OID 2.16.840.1.113730.3.4.7) is present in the response message: Net::LDAP=HASH(0x1bdf0a8) received: 30 53 02 01 02 64 26 04 22 63 6E 3D 4C 75 63 79 0S...d&."cn=Lucy 2C 6F 75 3D 44 65 76 65 6C 6F 70 6D 65 6E 74 2C ,ou=Development, 6F 3D 42 69 6F 6E 65 74 72 69 78 30 00 A0 26 30 o=Bionetrix0..&0 24 04 17 32 2E 31 36 2E 38 34 30 2E 31 2E 31 31 $..2.16.840.1.11 33 37 33 30 2E 33 2E 34 2E 37 04 09 30 84 00 00 3730.3.4.7..0... 00 03 0A 01 04 __ __ __ __ __ __ __ __ __ __ __ ..... 0000 83: SEQUENCE { 0002 1: INTEGER = 2 0005 38: [APPLICATION 4] { 0007 34: STRING = 'cn=Lucy,ou=Development,o=Bionetrix' 002B 0: SEQUENCE { 002D : } 002D : } 002D 38: [CONTEXT 0] { 002F 36: SEQUENCE { 0031 23: STRING = '2.16.840.1.113730.3.4.7' 004A 9: STRING 004C : 30 84 00 00 00 03 0A 01 04 __ __ __ __ __ __ __ 0........ 0055 : } 0055 : } 0055 : } In scrhCallBack !! Got an entry !! DN = cn=Lucy,ou=Development,o=Bionetrix Died at D:\BAS\GenericSync\LDAP\test3.pl line 75. Here's my callback code: sub srchCallBack { my ($r, $obj) = @_; print "In scrhCallBack !!\n"; if (!$obj) { print "\t", $r->error, "\n"; } elsif ($obj->isa('Net::LDAP::Entry')) { print "\tGot an entry !!\n"; print "\t\tDN = ", $obj->dn, "\n"; $cbCtrl = $r->control or die "$@"; print "\t\t", $cbCtrl, "\n"; } else { print "\tGot a reference !!\n"; } } As you can see my program dies as a result of $r->control failing. I tried getting $r->code and $r->error but these methods cause the program to block until the next change notification is received from the server. Any hints on how to get the control? thanks, Marc |