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: Paul H. <hei...@cs...> - 2000-05-26 15:39:34
|
On Fri, 26 May 2000, Graham Barr wrote: > Now for writing we could do > > $dsml->open($file,"w"); > $dsml->write($entry); > $dsml->write($schema); > $dsml->close; > > The open would write the header and the close would write the footer. If you passed something like an IO::File object to open(), you might gain some flexibility if you wanted to write() to a pipe or something other than a file. Paul Heinlein hei...@cs... |
From: Mark W. <mew...@un...> - 2000-05-26 15:32:56
|
Yes. iPlanet (aka Netscape) dynamic groups are simply a groupOfUrls object where the memberurls value is set to an LDAP URL. To print out all members, you parse the URL and then search the server using the search string that's embeded in the URL. To determine if a particular entry is a member, you can set the search base to be the entry's DN and then run the search filter against it. You'll need the URI module to do this with Net::LDAP. If you look in the contrib directory of the Net::LDAP distribution, I have a couple of scripts in there that show how to do this. If you can find a copy of the May issue of Web Techniques, I have an article about this subject with code. The sample code should be at www.webtechniques.com. Mark "Bouarich, Reda" wrote: > Hello, > Can we manipulate Dynamics groups through a PERL API? > thanks. > reda. |
From: Graham B. <gb...@po...> - 2000-05-26 15:16:34
|
OK, I have been thinking about this some more. On Fri, May 26, 2000 at 08:58:20AM -0500, Mark Wilcox wrote: > > I have not tried the code, but from looking at it I have one concern. > > It seems that the whole DSML file must be read into memory in one go. > > I'll have to double-check this. I can't remember if XML::Parser's callback functions use > streaming or load the whole file. It's not that XML::Parser reads the whole file at one. It is that you read all the entries from teh XML file into @results. So you are loading them all into memory. I have been considering if we really need an API like LDIF where the user does read_entry() to get the next in the file. From my reading of XML::Parser there is no way to do this. When you tell it to parse it parses the whole file. So I was thinking that maybe XML::DSML should just use callbacks itself. For example have the user pass a sub reference which will be called whenever an entry is read. This can be extended when we start to read the schema, and we can have a different sub to call. Or we can just have the user check the type of object passed. I don't think this would be too much of a setback as I would think that most of the time the current LDIF is used in a loop anyway. So what we could end up with is something like $dsml = Net::LDAP::DSML->new(); $dsml->process( $file, entry => \&process_entry, schema => \&process_schema ) or die $dsml->error; Now for writing we could do $dsml->open($file,"w"); $dsml->write($entry); $dsml->write($schema); $dsml->close; The open would write the header and the close would write the footer. Thoughts ? Graham. |
From: Bouarich, R. <Red...@co...> - 2000-05-26 15:08:12
|
Hello, Can we manipulate Dynamics groups through a PERL API? thanks. reda. |
From: Graham B. <gb...@po...> - 2000-05-26 14:15:02
|
On Fri, May 26, 2000 at 08:58:20AM -0500, Mark Wilcox wrote: > > > Graham Barr wrote: > > > On Thu, May 25, 2000 at 08:01:11PM -0500, Mark Wilcox wrote: > > > Hi, > > > Here's my first version of Net::DSML (and the helper module XML::DSML > > > which you could use seperately, but it's probably easier to use > > > Net::DSML). > > > > This is a great start. > > Thanks. Last night I noticed a bug in my Base64 code for Net::LDAP::DSML, so I'm shipping > a new copy. > > Also I've made a patch to Net::LDAP::Entry so that the dump() method will Base64 encocde > binary in the ouptut. OK, great. > > In XML::DSML you have a comment about renaming the module as Net::LDAP::DSML::Parser. > > > > My answer would be that if it is a generic DSML parser, not connected with Net::LDAP, > > then XML::DSML is probably the right place for it to live. > > Yeah that's what I'm thinking as well, but I wanted to get something out for people to > play with and then figure out the best way to go. > > > > > > > I have not tried the code, but from looking at it I have one concern. > > It seems that the whole DSML file must be read into memory in one go. > > I'll have to double-check this. I can't remember if XML::Parser's callback functions use > streaming or load the whole file. XML::Parser I think always works on a whole file. But I think you can use XML::Parser::Expat which is the low-level access. > > This will be a disadvantage for large files and we should probably devise a way > > to read the entries one at a time. > > I'll double check, but worst-case I can rewrite it so that XML::Parser streams in the > file. Sure. One other thing to consider. I assmue the DSML does not specify an order for things to appear in the file if it contains entries and a schema. So you need to consider what to do if the user asks to read an entry when the next thing is a schema, and visa-versa. Graham. |
From: Mark W. <mew...@un...> - 2000-05-26 13:53:34
|
Graham Barr wrote: > On Thu, May 25, 2000 at 08:01:11PM -0500, Mark Wilcox wrote: > > Hi, > > Here's my first version of Net::DSML (and the helper module XML::DSML > > which you could use seperately, but it's probably easier to use > > Net::DSML). > > This is a great start. Thanks. Last night I noticed a bug in my Base64 code for Net::LDAP::DSML, so I'm shipping a new copy. Also I've made a patch to Net::LDAP::Entry so that the dump() method will Base64 encocde binary in the ouptut. > > > In XML::DSML you have a comment about renaming the module as Net::LDAP::DSML::Parser. > > My answer would be that if it is a generic DSML parser, not connected with Net::LDAP, > then XML::DSML is probably the right place for it to live. Yeah that's what I'm thinking as well, but I wanted to get something out for people to play with and then figure out the best way to go. > > > I have not tried the code, but from looking at it I have one concern. > It seems that the whole DSML file must be read into memory in one go. I'll have to double-check this. I can't remember if XML::Parser's callback functions use streaming or load the whole file. > > > This will be a disadvantage for large files and we should probably devise a way > to read the entries one at a time. I'll double check, but worst-case I can rewrite it so that XML::Parser streams in the file. > Mark > > > > I guess you did it this way as by default XML::Parser works on the whole > file before it returns. But IIRC, it is possible to interface to > XML::Parser at a lower level. If not them maybe XML::Parser is not the > way to go. > > > Graham. |
From: Graham B. <gb...@po...> - 2000-05-26 13:37:17
|
On Fri, May 26, 2000 at 01:06:40PM +0100, Chris Ridd wrote: > I am of the opinion that unbind leaves the TCP connection open, and it > looks like Simon is too. Kurt was of the opinion that unbind closed the > TCP connection. If you look at the packet trace there was no unbind() sent to the server. The question is why was no password sent in the second bind packet. Graham. |
From: <Sim...@wi...> - 2000-05-26 13:03:34
|
>This might be related to the "what does unbind really do" discussion >that Kurt from OpenLDAP had with us recently. > >I am of the opinion that unbind leaves the TCP connection open, and it >looks like Simon is too. Kurt was of the opinion that unbind closed the >TCP connection. > >The workaround is probably to destroy the $ldap object after unbinding >the first time, and then recreate it before binding the second time. > >Cheers, > >Chris Chris, The unbind was commented out because I didn't think it was necessary (according to the examples). When I uncommented it, it doesn't run correctly and throws an error 1. Traces from the program are below. I enabled both in and out packet tracing in case it helps some. Rgds, Simon. ---------------Perl trace-------------------- Net::LDAP=HASH(0x866075c) sending: 30 2F 02 01 01 60 2A 02 01 02 04 1C 63 6E 3D 6E 0/...`*.....cn=n 65 78 75 73 61 64 6D 2C 6F 75 3D 53 79 73 55 73 exusadm,ou=SysUs 65 72 73 2C 6F 3D 77 6C 80 07 61 70 70 6C 65 37 ers,o=wl..apple7 37 __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ 7 Net::LDAP=HASH(0x866075c) received: 30 0C 02 01 01 61 07 0A 01 00 04 00 04 00 __ __ 0....a........ Net::LDAP=HASH(0x866075c) sending: 30 3A 02 01 02 63 35 04 0D 6F 75 3D 75 73 65 72 0:...c5..ou=user 73 2C 6F 3D 77 6C 0A 01 02 0A 01 02 02 01 00 02 s,o=wl.......... 01 00 01 01 00 A3 0F 04 03 75 69 64 04 08 74 65 .........uid..te 73 74 75 73 65 72 30 04 04 02 64 6E __ __ __ __ stuser0...dn Net::LDAP=HASH(0x866075c) received: 30 22 02 01 02 64 1D 04 19 63 6E 3D 74 65 73 74 0"...d...cn=test 75 73 65 72 2C 6F 75 3D 75 73 65 72 73 2C 6F 3D user,ou=users,o= 77 6C 30 00 __ __ __ __ __ __ __ __ __ __ __ __ wl0. Net::LDAP=HASH(0x866075c) received: 30 0C 02 01 02 65 07 0A 01 00 04 00 04 00 __ __ 0....e........ Net::LDAP=HASH(0x866075c) sending: 30 05 02 01 03 42 00 __ __ __ __ __ __ __ __ __ 0....B. Net::LDAP=HASH(0x866075c) sending: 30 25 02 01 04 60 20 02 01 02 04 19 63 6E 3D 74 0%...` .....cn=t 65 73 74 75 73 65 72 2C 6F 75 3D 75 73 65 72 73 estuser,ou=users 2C 6F 3D 77 6C 80 00 __ __ __ __ __ __ __ __ __ ,o=wl.. user testuser failed bind: 1, I/O Error 494f3a3a536f636b65743a3a494e45543d474c4 f422830783838626332663429 at test.pl line 50. ----------------Novell LDAP trace----------------------- *** NDS Trace Utility - BEGIN Logging *** Fri May 26 13:58:51 2000 LDAP: listening for activity in monitor thread 0x82c on: LDAP: 0x83da28r LDAP: before select in monitor thread 0x82c, active_threads 0 LDAP: select activity LDAP: Accepting TCP connection LDAP: Found usable monitor thread 0x82c LDAP: new connection on 0x83d958 LDAP: select activity in monitor thread 0x82c LDAP: read activity on 0x83da28 LDAP: listening for activity in monitor thread 0x82c on: LDAP: 0x83da28r LDAP: 0x83d958r LDAP: before select in monitor thread 0x82c, active_threads 0 LDAP: select activity in monitor thread 0x82c LDAP: read activity on 0x83d958 LDAP: listening for activity in monitor thread 0x82c on: LDAP: 0x83da28r LDAP: 0x83d958r LDAP: before select in monitor thread 0x82c, active_threads 1 LDAP: do_bind LDAP: bind: protocol version 2 dn (cn=nexusadm,ou=SysUsers,o=wl) method 128 LDAP: dn (cn=nexusadm,ou=SysUsers,o=wl), ndsDn (CN=nexusadm.OU=SysUsers.O=wl) LDAP: send_ldap_result 0:: LDAP: select activity in monitor thread 0x82c LDAP: read activity on 0x83d958 LDAP: listening for activity in monitor thread 0x82c on: LDAP: 0x83da28r LDAP: 0x83d958r LDAP: before select in monitor thread 0x82c, active_threads 1 LDAP: do_search LDAP: SRCH base "ou=users,o=wl" scope 2 deref 2 LDAP: sizelimit 0 timelimit 0 attrsonly 0 LDAP: begin get_filter LDAP: EQUALITY LDAP: filter: (uid=testuser) LDAP: attrs: LDAP: dn LDAP: => send_search_entry (cn=testuser,ou=users,o=wl) LDAP: send_ldap_result 0:: LDAP: select activity in monitor thread 0x82c LDAP: read activity on 0x83d958 LDAP: listening for activity in monitor thread 0x82c on: LDAP: 0x83da28r LDAP: 0x83d958r LDAP: before select in monitor thread 0x82c, active_threads 1 LDAP: do_unbind LDAP: select activity in monitor thread 0x82c LDAP: read activity on 0x83da28 LDAP: listening for activity in monitor thread 0x82c on: LDAP: 0x83da28r LDAP: close conn in close_connection 0x5635c78 on skt 0x83d958 from opid -1 LDAP: called by "monitor_thread7" LDAP: freeing conn 0x5635c78 at index 1 in monitor thread 0x53c8308 LDAP: before select in monitor thread 0x82c, active_threads 0 *** NDS Trace Utility - END Logging *** Fri May 26 13:58:57 2000 |
From: Chris R. <Chr...@me...> - 2000-05-26 12:08:40
|
On Thu, 25 May 2000 20:15:17 BST, Graham Barr wrote: > This one is puzzling, there is no reason why a second bind should > do anything diffeent. > > The debug report from Simon is excellent help, but if you have > anything more it can only help > > Thanks, > Graham. This might be related to the "what does unbind really do" discussion that Kurt from OpenLDAP had with us recently. I am of the opinion that unbind leaves the TCP connection open, and it looks like Simon is too. Kurt was of the opinion that unbind closed the TCP connection. The workaround is probably to destroy the $ldap object after unbinding the first time, and then recreate it before binding the second time. Cheers, Chris |
From: Graham B. <gb...@po...> - 2000-05-26 08:07:26
|
On Thu, May 25, 2000 at 08:01:11PM -0500, Mark Wilcox wrote: > Hi, > Here's my first version of Net::DSML (and the helper module XML::DSML > which you could use seperately, but it's probably easier to use > Net::DSML). This is a great start. In XML::DSML you have a comment about renaming the module as Net::LDAP::DSML::Parser. My answer would be that if it is a generic DSML parser, not connected with Net::LDAP, then XML::DSML is probably the right place for it to live. I have not tried the code, but from looking at it I have one concern. It seems that the whole DSML file must be read into memory in one go. This will be a disadvantage for large files and we should probably devise a way to read the entries one at a time. I guess you did it this way as by default XML::Parser works on the whole file before it returns. But IIRC, it is possible to interface to XML::Parser at a lower level. If not them maybe XML::Parser is not the way to go. Graham. |
From: Mark W. <mew...@un...> - 2000-05-26 00:56:21
|
Hi, Here's my first version of Net::DSML (and the helper module XML::DSML which you could use seperately, but it's probably easier to use Net::DSML). For those who don't know about DSML, it's Directory Services Markup Language which is the XML standard for exchanging directory services data. While it will likely replace LDIF as the primary mechanism to exchange LDAP data, it is also designed to exchange other directory service data like NIS and NDS. This is useful when you must load data between disparate directory services asynchrously (sp). Currently it will write and read only entry elements, schema support will come in a future version (DSML schema is handled differently from entries, I need to figure the best way to handle this & I may need to make some changes/additions to Net::LDAP::Schema). enjoy! Mark |
From: Graham B. <gb...@po...> - 2000-05-25 19:20:53
|
This one is puzzling, there is no reason why a second bind should do anything diffeent. The debug report from Simon is excellent help, but if you have anything more it can only help Thanks, Graham. On Thu, May 25, 2000 at 08:00:55PM +0200, Christopher Arnold wrote: > > On Thu, 25 May 2000 Sim...@wi... wrote: > > > In the following code I am binding to an ldap server, doing a search for a > > dn and then binding again with the resulting dn. > Hmm, yes this was what i was going to report a couple of days before... > > > I am using Net::NetLDAP v0.18 and Convert::ASN1 0.06 > > Perl is 5.6.0 and the LDAP server is Novell's eDirectory for NT > > > > Basically what seems to happen is that the second bind is not transmitting > > the password I've given it, so the ldap server decides it is an anonymous > > bind and it does that and returns success. > > > I have noticed the same problem with what i belive was v0.17 and ASN 0.05 > running on FreeBSD 4.0-RELEASE with perl, version 5.005_03. > We are running against a iplanet LDAP server. > > > Any ideas ? > As a workaround i made a bind in the beginning of the program and an > unbind in the end... Not so elegant but it enabled me to work on other > issues. > > > I've also attached the relevant output pack from debug and also a trace > > from the LDAP server which bears this out. > > > I also have some traces (and example code) if someone needs them for > debugging. > > > /chris > > |
From: Christopher A. <ch...@xp...> - 2000-05-25 18:02:44
|
On Thu, 25 May 2000 Sim...@wi... wrote: > In the following code I am binding to an ldap server, doing a search for a > dn and then binding again with the resulting dn. Hmm, yes this was what i was going to report a couple of days before... > I am using Net::NetLDAP v0.18 and Convert::ASN1 0.06 > Perl is 5.6.0 and the LDAP server is Novell's eDirectory for NT > > Basically what seems to happen is that the second bind is not transmitting > the password I've given it, so the ldap server decides it is an anonymous > bind and it does that and returns success. > I have noticed the same problem with what i belive was v0.17 and ASN 0.05 running on FreeBSD 4.0-RELEASE with perl, version 5.005_03. We are running against a iplanet LDAP server. > Any ideas ? As a workaround i made a bind in the beginning of the program and an unbind in the end... Not so elegant but it enabled me to work on other issues. > I've also attached the relevant output pack from debug and also a trace > from the LDAP server which bears this out. > I also have some traces (and example code) if someone needs them for debugging. /chris |
From: <Sim...@wi...> - 2000-05-25 17:48:29
|
Dear all, I'm having some difficulty with ldap->bind which I hope someone can help me with. In the following code I am binding to an ldap server, doing a search for a dn and then binding again with the resulting dn. I'm writing routines to provide web-site authorisation, based on Apache::AuthCookie and Apache::Session and some code ideas from Apache::AuthNetLdap too :-) I am using Net::NetLDAP v0.18 and Convert::ASN1 0.06 Perl is 5.6.0 and the LDAP server is Novell's eDirectory for NT Basically what seems to happen is that the second bind is not transmitting the password I've given it, so the ldap server decides it is an anonymous bind and it does that and returns success. Any ideas ? I've also attached the relevant output pack from debug and also a trace from the LDAP server which bears this out. All help would be appreciated as I'm now completely stuck ! Simon Wilcox. -------------------CODE-------------- #!/perl/5.6.0/bin/mswin32-x86/perl.exe -w use strict; use Net::LDAP; my $lookdn = "cn=nexusadm,ou=SysUsers,o=wl"; my $lookpwd = "apple77"; my $basedn = "ou=users,o=wl"; my $ldapserver = "nexus.williamslea.com"; my $ldapport = 389; my $matchattr = "uid"; my $username = "testuser"; my $userpwd = "fred"; my $ldap = new Net::LDAP($ldapserver, port => $ldapport, debug=>1) or die "Damn: ($@)"; #initial bind as lookup user my $mesg = $ldap->bind(dn=> $lookdn, password=>$lookpwd); if (my $error = $mesg->code()) { die"Lookup: LDAP Connection Failed :$error"; } my $attrs = ['dn']; $mesg = $ldap->search( base => $basedn, scope => 'sub', filter => "($matchattr=$username)", attrs => $attrs ); if (my $error = $mesg->code()) { die"user $username: LDAP Connection Failed: $error"; } unless ($mesg->count()) { die"user $username: user entry not found for filter: $matchattr=$username"; } #now try to authenticate as user my $authdn = $mesg->shift_entry->dn(); #$ldap->unbind; $mesg = $ldap->bind(dn=>$authdn, password=>$userpwd); if (my $error = $mesg->code()) { my $txt=$mesg->error(); die"user $username failed bind: $error, $txt"; } my $error = $mesg->code(); die"EndResult: user $authdn:$userpwd bind: $error"; -------------------OUTPUT TRACE--------------------------- Net::LDAP=HASH(0x866071c) sending: 30 2F 02 01 01 60 2A 02 01 02 04 1C 63 6E 3D 6E 0/...`*.....cn=n 65 78 75 73 61 64 6D 2C 6F 75 3D 53 79 73 55 73 exusadm,ou=SysUs 65 72 73 2C 6F 3D 77 6C 80 07 61 70 70 6C 65 37 ers,o=wl..apple7 37 __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ 7 Net::LDAP=HASH(0x866071c) received: Net::LDAP=HASH(0x866071c) sending: 30 3A 02 01 02 63 35 04 0D 6F 75 3D 75 73 65 72 0:...c5..ou=user 73 2C 6F 3D 77 6C 0A 01 02 0A 01 02 02 01 00 02 s,o=wl.......... 01 00 01 01 00 A3 0F 04 03 75 69 64 04 08 74 65 .........uid..te 73 74 75 73 65 72 30 04 04 02 64 6E __ __ __ __ stuser0...dn Net::LDAP=HASH(0x866071c) received: Net::LDAP=HASH(0x866071c) received: Net::LDAP=HASH(0x866071c) sending: 30 25 02 01 03 60 20 02 01 02 04 19 63 6E 3D 74 0%...` .....cn=t 65 73 74 75 73 65 72 2C 6F 75 3D 75 73 65 72 73 estuser,ou=users 2C 6F 3D 77 6C 80 00 __ __ __ __ __ __ __ __ __ ,o=wl.. Net::LDAP=HASH(0x866071c) received: EndResult: user cn=testuser,ou=users,o=wl:fred bind: 0 at test.pl line 54. -----------------------LDAP SERVER LOG-------------------------- *** NDS Trace Utility - BEGIN Logging *** Thu May 25 16:53:39 2000 LDAP: listening for activity in monitor thread 0x718 on: LDAP: 0x83ddd0r LDAP: before select in monitor thread 0x718, active_threads 0 LDAP: select activity LDAP: Accepting TCP connection LDAP: Found usable monitor thread 0x718 LDAP: new connection on 0x83d8bc LDAP: select activity in monitor thread 0x718 LDAP: read activity on 0x83ddd0 LDAP: listening for activity in monitor thread 0x718 on: LDAP: 0x83ddd0r LDAP: 0x83d8bcr LDAP: before select in monitor thread 0x718, active_threads 0 LDAP: select activity in monitor thread 0x718 LDAP: read activity on 0x83d8bc LDAP: listening for activity in monitor thread 0x718 on: LDAP: 0x83ddd0r LDAP: 0x83d8bcr LDAP: before select in monitor thread 0x718, active_threads 1 LDAP: do_bind LDAP: bind: protocol version 2 dn (cn=nexusadm,ou=SysUsers,o=wl) method 128 LDAP: dn (cn=nexusadm,ou=SysUsers,o=wl), ndsDn (CN=nexusadm.OU=SysUsers.O=wl) LDAP: send_ldap_result 0:: LDAP: select activity in monitor thread 0x718 LDAP: read activity on 0x83d8bc LDAP: listening for activity in monitor thread 0x718 on: LDAP: 0x83ddd0r LDAP: 0x83d8bcr LDAP: before select in monitor thread 0x718, active_threads 1 LDAP: do_search LDAP: SRCH base "ou=users,o=wl" scope 2 deref 2 LDAP: sizelimit 0 timelimit 0 attrsonly 0 LDAP: begin get_filter LDAP: EQUALITY LDAP: filter: (uid=testuser) LDAP: attrs: LDAP: dn LDAP: => send_search_entry (cn=testuser,ou=users,o=wl) LDAP: send_ldap_result 0:: LDAP: select activity in monitor thread 0x718 LDAP: read activity on 0x83d8bc LDAP: listening for activity in monitor thread 0x718 on: LDAP: 0x83ddd0r LDAP: 0x83d8bcr LDAP: before select in monitor thread 0x718, active_threads 1 LDAP: do_bind LDAP: Treating simple bind request with dn = "cn=testuser,ou=users,o=wl" and empty password as anonymous. LDAP: bind: protocol version 2 dn () method 128 LDAP: accepting NULL bind LDAP: send_ldap_result 0:: LDAP: select activity in monitor thread 0x718 LDAP: read activity on 0x83d8bc LDAP: ber_get_next on fd 0x83d8bc failed errno 10057 LDAP: *** got 0 of 0 so far LDAP: close conn in close_connection 0x5635c78 on skt 0x83d8bc from opid -1 LDAP: called by "connection_activity" LDAP: freeing conn 0x5635c78 at index 1 in monitor thread 0x6239d88 LDAP: listening for activity in monitor thread 0x718 on: LDAP: 0x83ddd0r LDAP: before select in monitor thread 0x718, active_threads 0 *** NDS Trace Utility - END Logging *** Thu May 25 16:53:52 2000 |
From: Mark W. <mew...@un...> - 2000-05-25 00:36:10
|
I rewrote my patch using the second option you presented. I'll see if I come up with something better when I play with the schema module for my DSML stuff. Mark Graham Barr wrote: > On Tue, May 23, 2000 at 07:19:38PM -0500, Mark Wilcox wrote: > > > > > I think that block would be better written as > > while($value =~ s/^[\s,]*(["']?[^"'\s()]+["']?[,\s]*)//) { > $word .= $1 > @quotes = $word =~ /(["'])/g; # broken emacs '"])/; > last unless @quotes & 1; # Until even num of quotes > } > > However, we can do better. > > @quotes = $word =~ /(["'])/g; > last unless @quotes & 1; > > could just be > > last unless $word =~ tr/"'// & 1; > > But I think it could also be done with > > $value =~ s/^[\s,]*((["']?)(\\.|[^"'()\\]+)*\2)// or die "..."; > > However back to the initial problem, the die ... > > I think the die is probably the correct thing, but it should be caught > by an eval {} in new() and have new() return an error. > > Having said that, currently ::Schema just warns and returns undef. It probably > should do better than that. So I am open to suggestions. That goes for > all other modules too. > > Graham. |
From: Mark W. <mew...@un...> - 2000-05-24 13:52:17
|
Hi, here's the error message (I added some debug info so we can see what the original value was before the regex) Failed to parse token from value [] with ( objectclass $ ou ) MAY ( aci $ busin esscategory $ description $ destinationindicator $ facsimiletelephonenumber $ in ternationalisdnnumber $ l $ physicaldeliveryofficename $ postofficebox $ postala ddress $ postalcode $ preferreddeliverymethod $ registeredaddress $ searchguide $ seealso $ st $ street $ telephonenumber $ teletexterminalidentifier $ telexnum ber $ userpassword $ x121address $ nsadmindomainname ) ) at d:/Perl/site/lib/Net /LDAP/Schema.pm line 436. This is schema from iPlanet 4.1. I'll try to take a look at your suggestions tonite and see what I come up with. BTW Thanks to those who sent me NT GNU URLs. There's also a diff.pl as part of the Perl Power Tools. Mark Graham Barr wrote: > On Tue, May 23, 2000 at 07:19:38PM -0500, Mark Wilcox wrote: > > Hi, > > I've been playing with Net::LDAP::Schema on version .018 of Net::LDAP. > > Discovered that it kept crashing for my test script at Schema.pm line > > 433. > > > > This was > > ( $token, $value ) = $value =~ > > /^[\s,]*(["']?[^"'\s()]+["']?[,\s]*)(.*)$/; > > die( "Failed to parse token from value [$value]" ) unless $token; > > Can you send what $value was to start with ? Was it legal ? > > > I changed to > > ( $token, $value ) = $value =~ > > /^[\s,]*(["']?[^"'\s()]+["']?[,\s]*)(.*)$/; > > last unless $token; > > die( "Failed to parse token from value [$value]" ) unless $token; > > > > that seems to have fixed it. > > Hm, that should have given an error. That code is in a do{} block > and last cannot be used to exit a do{} block. > > I think that block would be better written as > > while($value =~ s/^[\s,]*(["']?[^"'\s()]+["']?[,\s]*)//) { > $word .= $1 > @quotes = $word =~ /(["'])/g; # broken emacs '"])/; > last unless @quotes & 1; # Until even num of quotes > } > > However, we can do better. > > @quotes = $word =~ /(["'])/g; > last unless @quotes & 1; > > could just be > > last unless $word =~ tr/"'// & 1; > > But I think it could also be done with > > $value =~ s/^[\s,]*((["']?)(\\.|[^"'()\\]+)*\2)// or die "..."; > > However back to the initial problem, the die ... > > I think the die is probably the correct thing, but it should be caught > by an eval {} in new() and have new() return an error. > > Having said that, currently ::Schema just warns and returns undef. It probably > should do better than that. So I am open to suggestions. That goes for > all other modules too. > > Graham. |
From: Graham B. <gb...@po...> - 2000-05-24 09:13:50
|
On Tue, May 23, 2000 at 09:20:07PM -0500, Rusty Biggs wrote: > Hi Neil. > > I don't know if the others have already replied yet, so I may be out of line in > my response. > > One thing that I saw very quickly with your code is that you have: > > '(&(cn=neil*)(sn=b*)' > > instead of : > > '(&(cn=neil*)(sn=b*))' # second parenthesis at the end Yes, the ::Filter module was not catching this as an error. But it does now. > I would have thought you would have caught an error, but I'm not sure > how the various LDAP servers respond to this. ( One that I'm familier with > (Isocor) chokes :) Well the server got a valid filter. ::Filter was encoding it as if the missing paren was there. Graham. |
From: Graham B. <gb...@po...> - 2000-05-24 09:12:09
|
On Tue, May 23, 2000 at 07:19:38PM -0500, Mark Wilcox wrote: > Hi, > I've been playing with Net::LDAP::Schema on version .018 of Net::LDAP. > Discovered that it kept crashing for my test script at Schema.pm line > 433. > > This was > ( $token, $value ) = $value =~ > /^[\s,]*(["']?[^"'\s()]+["']?[,\s]*)(.*)$/; > die( "Failed to parse token from value [$value]" ) unless $token; Can you send what $value was to start with ? Was it legal ? > I changed to > ( $token, $value ) = $value =~ > /^[\s,]*(["']?[^"'\s()]+["']?[,\s]*)(.*)$/; > last unless $token; > die( "Failed to parse token from value [$value]" ) unless $token; > > that seems to have fixed it. Hm, that should have given an error. That code is in a do{} block and last cannot be used to exit a do{} block. I think that block would be better written as while($value =~ s/^[\s,]*(["']?[^"'\s()]+["']?[,\s]*)//) { $word .= $1 @quotes = $word =~ /(["'])/g; # broken emacs '"])/; last unless @quotes & 1; # Until even num of quotes } However, we can do better. @quotes = $word =~ /(["'])/g; last unless @quotes & 1; could just be last unless $word =~ tr/"'// & 1; But I think it could also be done with $value =~ s/^[\s,]*((["']?)(\\.|[^"'()\\]+)*\2)// or die "..."; However back to the initial problem, the die ... I think the die is probably the correct thing, but it should be caught by an eval {} in new() and have new() return an error. Having said that, currently ::Schema just warns and returns undef. It probably should do better than that. So I am open to suggestions. That goes for all other modules too. Graham. |
From: Graham B. <gb...@po...> - 2000-05-24 08:37:51
|
On Wed, May 24, 2000 at 09:03:30AM +0200, Bouarich, Reda wrote: > Hello, > Is it possible to test for instance how much entries a perl program can > retrieve from the DIT in one second ? You can, but you will probably get a different result every time. THe problem with this type of benchmark is that you are not just timing the perl script. You also have to take into account that the server time taken to do the lookup will change depending on load and the network transport time will change depending on traffic. Graham. |
From: Bouarich, R. <Red...@co...> - 2000-05-24 07:06:12
|
Hello, Is it possible to test for instance how much entries a perl program can retrieve from the DIT in one second ? Thanks, reda. |
From: Mark W. <mew...@un...> - 2000-05-24 00:14:45
|
Hi, I've been playing with Net::LDAP::Schema on version .018 of Net::LDAP. Discovered that it kept crashing for my test script at Schema.pm line 433. This was ( $token, $value ) = $value =~ /^[\s,]*(["']?[^"'\s()]+["']?[,\s]*)(.*)$/; die( "Failed to parse token from value [$value]" ) unless $token; I changed to ( $token, $value ) = $value =~ /^[\s,]*(["']?[^"'\s()]+["']?[,\s]*)(.*)$/; last unless $token; die( "Failed to parse token from value [$value]" ) unless $token; that seems to have fixed it. I'd send a diff but I'm at home on NT and don't have a diff (if anyone knows an NT binary of diff, I'd be much obliged if you'd show me a URL ;). Mark |
From: Jensen, J. T <j.j...@au...> - 2000-05-23 22:27:24
|
-----Original Message----- From: Graham Barr To: Jensen, John T Cc: 'per...@ma...' Sent: 23/05/00 20:54 Subject: Re: where is Net::LDAP?? On Tue, May 23, 2000 at 12:58:47PM +1200, Jensen, John T wrote: > 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 eould suggest using 5.005_03 > The docs describe > Net::LDAP, but I can't find the .pm file. Well there are a few places, but the first place to look when looking for any perl module should be http://search.cpan.org Net::LDAP also has it's own homepage at http://perl-ldap.sourceforge.net/ you can also get perl-ldap (the distribution that contains Net::LDAP) and Convert-ASN1 from my CPAN directory http://www.perl.com/CPAN/authors/id/GBARR/ Graham. I'll give it a go tomorrow (not at the Uni today). Russell Fulton sent me a copy and I couldn't do the make. O/S is WinNT. jj |
From: Graham B. <gb...@po...> - 2000-05-23 15:27:20
|
This is completely off topic for the perl-ldap-dev list. Please take it elsewhere. Graham. On Tue, May 23, 2000 at 05:14:21PM +0200, Bouarich, Reda wrote: > > I want to write in a file using a perl program;i'm using this but it doesn't > seems to work, can anyone know how does it work? > thanks. > reda. > > > use lib '.'; > use lib 'lib'; > use Net::LDAP; > use Shell qw(mkdir ); > use File::Copy ; > use POSIX; > > > $user_name='tiger'; > $resource='mcc-resource.dat'; > $path=("/usr/reda/PERL").("/").("$user_name").("/"); > chop $path; > mkdir ("$path"); > open (FILE,">$path/$resource"); > copy ("$whathavetobecopied", "/usr/reda/PERL/tiger/mcc-resource.dat"); > |
From: Bouarich, R. <Red...@co...> - 2000-05-23 15:16:36
|
I want to write in a file using a perl program;i'm using this but it doesn't seems to work, can anyone know how does it work? thanks. reda. use lib '.'; use lib 'lib'; use Net::LDAP; use Shell qw(mkdir ); use File::Copy ; use POSIX; $user_name='tiger'; $resource='mcc-resource.dat'; $path=("/usr/reda/PERL").("/").("$user_name").("/"); chop $path; mkdir ("$path"); open (FILE,">$path/$resource"); copy ("$whathavetobecopied", "/usr/reda/PERL/tiger/mcc-resource.dat"); |
From: Graham B. <gb...@po...> - 2000-05-23 09:18:46
|
Yes it is possible, but you are being very vague in what you are trying to do. However this is not really relevant to the subject of this list, and would be better off being asked in one of the perl relayed newsgroups. Graham. On Tue, May 23, 2000 at 10:56:14AM +0200, Bouarich, Reda wrote: > Hello, > Is it possible ,in a Perl file, to create a file in a certain directory and > load configs (text and binary datas) into this file? > If yes, how could i Do? > Thanks a lot. > Reda. > |