You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(9) |
Nov
(4) |
Dec
(15) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(23) |
Feb
(18) |
Mar
(11) |
Apr
(3) |
May
(23) |
Jun
(13) |
Jul
(16) |
Aug
(11) |
Sep
(5) |
Oct
(4) |
Nov
(2) |
Dec
(4) |
2003 |
Jan
(18) |
Feb
(13) |
Mar
(56) |
Apr
(3) |
May
(124) |
Jun
(21) |
Jul
(2) |
Aug
(8) |
Sep
(1) |
Oct
(23) |
Nov
(4) |
Dec
(2) |
2004 |
Jan
(18) |
Feb
(5) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Graham B. <gb...@us...> - 2003-05-06 21:57:51
|
Update of /cvsroot/perl-ldap/asn In directory sc8-pr-cvs1:/tmp/cvs-serv9128 Modified Files: parser.y Log Message: Add support for ANY DEFINED BY Patch from Simon Wilkinson Index: parser.y =================================================================== RCS file: /cvsroot/perl-ldap/asn/parser.y,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- parser.y 6 May 2003 12:40:32 -0000 1.9 +++ parser.y 6 May 2003 21:29:07 -0000 1.10 @@ -16,6 +16,8 @@ %token ENUM 16 %token COMPONENTS 17 %token POSTRBRACE 18 +%token DEFINED 19 +%token BY 20 %{ # Copyright (c) 2000-2002 Graham Barr <gb...@po...>. All rights reserved. @@ -164,17 +166,21 @@ } ; -oielem : WORD - | SEQUENCE - | SET - | ANY - | ENUM - ; - -oelem : oielem +oielem : WORD { @{$$ = []}[cTYPE] = $1; } + | SEQUENCE { @{$$ = []}[cTYPE] = $1; } + | SET { @{$$ = []}[cTYPE] = $1; } + | ANY defined { - @{$$ = []}[cTYPE] = ($1); + @{$$ = []}[cTYPE,cCHILD,cDEFINE] = ('ANY',undef,$2); } + | ENUM { @{$$ = []}[cTYPE] = $1; } + ; + +defined : { $$=undef; } + | DEFINED BY WORD { $$=$3; } + ; + +oelem : oielem ; nlist : nlist1 { $$ = $1; } @@ -287,6 +293,8 @@ '}' => $RBRACE, ',' => $COMMA, '::=' => $ASSIGN, + 'DEFINED' => $DEFINED, + 'BY' => $BY ); my $reserved = join("|", reverse sort grep { /\w/ } keys %reserved); |
From: Graham B. <gb...@us...> - 2003-05-06 21:47:22
|
Update of /cvsroot/perl-ldap/asn/t In directory sc8-pr-cvs1:/tmp/cvs-serv16892/t Modified Files: 14any.t Log Message: Remove duplicate my Index: 14any.t =================================================================== RCS file: /cvsroot/perl-ldap/asn/t/14any.t,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- 14any.t 6 May 2003 21:29:07 -0000 1.1 +++ 14any.t 6 May 2003 21:47:15 -0000 1.2 @@ -41,9 +41,9 @@ # Now check the second -my $result = pack("C*", 0x06, 0x03, 0x29, 0x01, 0x02, 0x30, 0x11, 0x02, - 0x01, 0x01, 0x04, 0x0c, 0x61, 0x6e, 0x64, 0x20, - 0x61, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67); +$result = pack("C*", 0x06, 0x03, 0x29, 0x01, 0x02, 0x30, 0x11, 0x02, + 0x01, 0x01, 0x04, 0x0c, 0x61, 0x6e, 0x64, 0x20, + 0x61, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67); stest 12, $result, $asn->encode(type => "1.1.1.2", content => {integer=>1, str=>"and a string"}); |
From: Graham B. <gb...@us...> - 2003-05-06 21:36:10
|
Update of /cvsroot/perl-ldap/asn/lib/Convert In directory sc8-pr-cvs1:/tmp/cvs-serv9128/lib/Convert Modified Files: ASN1.pm Log Message: Add support for ANY DEFINED BY Patch from Simon Wilkinson Index: ASN1.pm =================================================================== RCS file: /cvsroot/perl-ldap/asn/lib/Convert/ASN1.pm,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- ASN1.pm 6 May 2003 12:40:32 -0000 1.25 +++ ASN1.pm 6 May 2003 21:29:07 -0000 1.26 @@ -42,7 +42,7 @@ $EXPORT_TAGS{all} = \@EXPORT_OK; @opParts = qw( - cTAG cTYPE cVAR cLOOP cOPT cCHILD + cTAG cTYPE cVAR cLOOP cOPT cCHILD cDEFINE ); @opName = qw( @@ -177,6 +177,15 @@ $ret; } +sub registeroid { + my $self = shift; + my $oid = shift; + my $handler = shift; + + $self->{options}{oidtable}{$oid}=$handler; + $self->{oidtable}{$oid}=$handler; +} + # In XS the will convert the tree between perl and C structs sub _pack_struct { $_[0] } @@ -239,6 +248,7 @@ my (%stash, $result); my $script = $self->{script}; my $stash = (1 == @$script && !$self->{script}[0][cVAR]) ? \$result : ($result=\%stash); + _decode( $self->{options}, $script, @@ -248,6 +258,7 @@ undef, [], $_[0]); + $result; }; if ($@) { |
From: Graham B. <gb...@us...> - 2003-05-06 21:31:18
|
Update of /cvsroot/perl-ldap/asn/lib/Convert/ASN1 In directory sc8-pr-cvs1:/tmp/cvs-serv9128/lib/Convert/ASN1 Modified Files: _decode.pm _encode.pm parser.pm Log Message: Add support for ANY DEFINED BY Patch from Simon Wilkinson Index: _decode.pm =================================================================== RCS file: /cvsroot/perl-ldap/asn/lib/Convert/ASN1/_decode.pm,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- _decode.pm 6 May 2003 11:07:19 -0000 1.16 +++ _decode.pm 6 May 2003 21:29:07 -0000 1.17 @@ -124,8 +124,11 @@ $len += $npos-$pos; + $handler=($optn->{oidtable} && $op->[cDEFINE]) ? + $optn->{oidtable}{$stash->{$op->[cDEFINE]}} : undef; + ($seqof ? $seqof->[$idx++] : ref($stash) eq 'SCALAR' ? $$stash : $stash->{$var}) - = substr($buf,$pos,$len); + = $handler ? $handler->decode(substr($buf,$pos,$len)) : substr($buf,$pos,$len); $pos += $len + $indef; Index: _encode.pm =================================================================== RCS file: /cvsroot/perl-ldap/asn/lib/Convert/ASN1/_encode.pm,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- _encode.pm 6 May 2003 11:07:20 -0000 1.17 +++ _encode.pm 6 May 2003 21:29:07 -0000 1.18 @@ -356,7 +356,15 @@ # 0 1 2 3 4 5 6 # $optn, $op, $stash, $var, $buf, $loop, $path - $_[4] .= $_[3]; + my $handler; + if ($_[1]->[cDEFINE] && $_[2]->{$_[1]->[cDEFINE]}) { + $handler=$_[0]->{oidtable}{$_[2]->{$_[1]->[cDEFINE]}}; + } + if ($handler) { + $_[4] .= $handler->encode($_[3]); + } else { + $_[4] .= $_[3]; + } } Index: parser.pm =================================================================== RCS file: /cvsroot/perl-ldap/asn/lib/Convert/ASN1/parser.pm,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- parser.pm 6 May 2003 12:40:32 -0000 1.10 +++ parser.pm 6 May 2003 21:29:07 -0000 1.11 @@ -1,7 +1,7 @@ # 1 "y.tab.pl" #$yysccsid = "@(#)yaccpar 1.8 (Berkeley) 01/20/91 (Perl 2.0 12/31/92)"; -# 20 "parser.y" +# 22 "parser.y" ;# Copyright (c) 2000-2002 Graham Barr <gb...@po...>. All rights reserved. ;# This program is free software; you can redistribute it and/or @@ -93,110 +93,114 @@ sub constENUM () { 16 } sub constCOMPONENTS () { 17 } sub constPOSTRBRACE () { 18 } +sub constDEFINED () { 19 } +sub constBY () { 20 } sub constYYERRCODE () { 256 } my @yylhs = ( -1, 0, 0, 2, 2, 3, 3, 6, 6, 6, 6, 8, 13, 13, 12, 14, 14, 14, 9, 9, 9, - 10, 17, 17, 17, 17, 17, 11, 15, 15, 18, - 18, 18, 19, 1, 1, 20, 20, 20, 22, 22, - 22, 22, 21, 21, 21, 23, 23, 4, 4, 5, - 5, 5, 16, 16, 24, 7, 7, + 10, 17, 17, 17, 17, 17, 18, 18, 11, 15, + 15, 19, 19, 19, 20, 1, 1, 21, 21, 21, + 23, 23, 23, 23, 22, 22, 22, 24, 24, 4, + 4, 5, 5, 5, 16, 16, 25, 7, 7, ); my @yylen = ( 2, 1, 1, 3, 4, 4, 1, 1, 1, 1, 1, 3, 1, 1, 5, 1, 1, 1, 4, 4, 4, - 4, 1, 1, 1, 1, 1, 1, 1, 2, 1, - 3, 3, 4, 1, 2, 1, 3, 3, 2, 1, - 1, 1, 4, 1, 3, 0, 1, 0, 1, 0, - 1, 1, 1, 3, 2, 0, 1, + 4, 1, 1, 1, 2, 1, 0, 3, 1, 1, + 2, 1, 3, 3, 4, 1, 2, 1, 3, 3, + 2, 1, 1, 1, 4, 1, 3, 0, 1, 0, + 1, 0, 1, 1, 1, 3, 2, 0, 1, ); my @yydefred = ( 0, - 0, 49, 0, 0, 1, 0, 0, 44, 0, 36, - 0, 0, 0, 0, 52, 51, 0, 0, 0, 3, - 0, 6, 0, 11, 0, 0, 0, 0, 45, 0, - 37, 38, 0, 22, 0, 0, 25, 0, 42, 40, - 0, 41, 0, 27, 43, 4, 0, 0, 0, 0, - 7, 8, 9, 10, 0, 47, 39, 0, 0, 0, - 0, 0, 0, 30, 57, 5, 0, 0, 53, 0, - 18, 19, 0, 20, 0, 0, 55, 21, 0, 0, - 0, 32, 31, 54, 0, 0, 17, 15, 16, 14, - 33, + 0, 51, 0, 0, 1, 0, 0, 46, 0, 38, + 0, 0, 0, 0, 54, 53, 0, 0, 0, 3, + 0, 6, 0, 11, 0, 0, 0, 0, 47, 0, + 39, 40, 0, 22, 0, 0, 0, 0, 44, 42, + 0, 43, 0, 29, 45, 4, 0, 0, 0, 0, + 7, 8, 9, 10, 0, 25, 0, 49, 41, 0, + 0, 0, 0, 0, 0, 32, 59, 5, 0, 0, + 0, 55, 0, 18, 19, 0, 20, 0, 0, 28, + 57, 21, 0, 0, 0, 34, 33, 56, 0, 0, + 17, 15, 16, 14, 35, ); my @yydgoto = ( 4, - 5, 6, 20, 7, 17, 50, 66, 8, 51, 52, - 53, 54, 43, 90, 62, 68, 44, 63, 64, 9, - 10, 45, 57, 69, + 5, 6, 20, 7, 17, 50, 68, 8, 51, 52, + 53, 54, 43, 94, 64, 71, 44, 56, 65, 66, + 9, 10, 45, 59, 72, ); -my @yysindex = ( 53, - 5, 0, -1, 0, 0, 12, 96, 0, 30, 0, - 7, 96, 14, 4, 0, 0, 41, 70, 70, 0, - 96, 0, 92, 0, 7, 17, 20, 43, 0, 33, - 0, 0, 92, 0, 17, 20, 0, 82, 0, 0, - 64, 0, 93, 0, 0, 0, 70, 70, 75, 91, - 0, 0, 0, 0, 110, 0, 0, 33, 106, 117, - 33, 131, 62, 0, 0, 0, 128, 95, 0, 96, - 0, 0, 96, 0, 75, 75, 0, 0, 110, 97, - 92, 0, 0, 0, 17, 20, 0, 0, 0, 0, - 0, +my @yysindex = ( 7, + 9, 0, 12, 0, 0, 19, 99, 0, 59, 0, + 73, 99, 31, -1, 0, 0, 88, 57, 57, 0, + 99, 0, 95, 0, 73, 26, 34, 62, 0, 50, + 0, 0, 95, 0, 26, 34, 64, 66, 0, 0, + 86, 0, 106, 0, 0, 0, 57, 57, 101, 102, + 0, 0, 0, 0, 94, 0, 135, 0, 0, 50, + 120, 131, 50, 138, 61, 0, 0, 0, 149, 137, + 98, 0, 99, 0, 0, 99, 0, 101, 101, 0, + 0, 0, 135, 100, 95, 0, 0, 0, 26, 34, + 0, 0, 0, 0, 0, ); -my @yyrindex = ( 127, - 78, 0, 0, 0, 0, 133, 85, 0, 21, 0, - 78, 111, 0, 0, 0, 0, 0, 127, 118, 0, - 111, 0, 0, 0, 78, 0, 0, 0, 0, 78, - 0, 0, 0, 0, 11, 25, 0, 38, 0, 0, - 57, 0, 0, 0, 0, 0, 127, 127, 0, 119, - 0, 0, 0, 0, 0, 0, 0, 78, 0, 0, - 78, 0, 134, 0, 0, 0, 0, 0, 0, 111, - 0, 0, 111, 0, 0, 135, 0, 0, 0, 0, - 0, 0, 0, 0, 40, 66, 0, 0, 0, 0, - 0, +my @yyrindex = ( 130, + 81, 0, 0, 0, 0, 151, 136, 0, 39, 0, + 81, 114, 0, 0, 0, 0, 0, 130, 121, 0, + 114, 0, 0, 0, 81, 0, 0, 0, 0, 81, + 0, 0, 0, 0, 16, 29, 42, 69, 0, 0, + 37, 0, 0, 0, 0, 0, 130, 130, 0, 122, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 81, + 0, 0, 81, 0, 142, 0, 0, 0, 0, 0, + 0, 0, 114, 0, 0, 114, 0, 0, 143, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 3, 45, + 0, 0, 0, 0, 0, ); my @yygindex = ( 0, - 89, 0, 123, 3, -11, 68, 0, -9, -17, -20, - -15, 121, 0, 0, 0, 0, 0, 0, 63, 0, - 122, 0, 0, 71, + 96, 0, 132, 1, -11, 70, 0, 8, -17, -18, + -16, 133, 0, 0, 0, 0, 0, 0, 0, 67, + 0, 129, 0, 0, 75, ); -sub constYYTABLESIZE () { 150 } +sub constYYTABLESIZE () { 158 } my @yytable = ( 29, - 23, 22, 40, 12, 13, 39, 2, 41, 2, 33, - 23, 23, 14, 21, 24, 22, 12, 25, 11, 23, - 34, 23, 23, 3, 24, 24, 47, 21, 23, 48, - 13, 34, 12, 24, 2, 24, 24, 26, 26, 23, - 23, 18, 24, 26, 27, 28, 26, 19, 26, 26, - 23, 23, 49, 1, 2, 26, 46, 23, 80, 88, - 70, 81, 87, 73, 89, 24, 24, 46, 46, 3, - 30, 2, 56, 75, 46, 61, 24, 24, 48, 76, - 48, 48, 48, 24, 48, 48, 3, 50, 50, 50, - 48, 55, 34, 48, 35, 36, 28, 34, 58, 85, - 86, 28, 15, 16, 37, 78, 79, 38, 65, 37, - 67, 50, 38, 50, 50, 50, 71, 35, 56, 56, - 48, 48, 48, 50, 48, 48, 50, 72, 35, 48, - 48, 48, 2, 48, 48, 59, 60, 82, 83, 31, - 32, 74, 77, 42, 28, 29, 0, 46, 91, 84, + 23, 12, 23, 23, 40, 39, 41, 1, 2, 33, + 2, 21, 25, 23, 23, 23, 23, 13, 22, 14, + 23, 12, 11, 3, 23, 21, 23, 23, 24, 24, + 12, 24, 22, 23, 13, 47, 48, 24, 36, 24, + 24, 27, 27, 48, 24, 24, 24, 48, 48, 36, + 27, 2, 27, 27, 48, 24, 24, 30, 2, 27, + 73, 84, 24, 76, 85, 92, 91, 93, 26, 26, + 18, 49, 78, 3, 2, 57, 19, 26, 79, 26, + 26, 50, 55, 50, 50, 50, 26, 50, 50, 3, + 26, 27, 28, 50, 58, 34, 50, 35, 36, 28, + 34, 63, 89, 90, 28, 15, 16, 37, 82, 83, + 38, 60, 37, 69, 52, 38, 52, 52, 52, 67, + 37, 58, 58, 50, 50, 50, 52, 50, 50, 52, + 74, 37, 50, 50, 50, 70, 50, 50, 52, 52, + 52, 75, 61, 62, 86, 87, 31, 32, 77, 80, + 2, 81, 30, 31, 95, 42, 46, 88, ); my @yycheck = ( 17, - 12, 11, 23, 1, 6, 23, 2, 23, 2, 21, - 0, 1, 1, 11, 1, 25, 6, 14, 14, 9, - 0, 11, 12, 17, 0, 1, 10, 25, 18, 10, - 6, 11, 30, 9, 2, 11, 12, 0, 1, 0, - 1, 12, 18, 3, 4, 5, 9, 18, 11, 12, - 11, 12, 10, 1, 2, 18, 0, 18, 70, 80, - 58, 73, 80, 61, 80, 0, 1, 11, 12, 17, - 1, 2, 9, 12, 18, 1, 11, 12, 1, 18, - 3, 4, 5, 18, 7, 8, 17, 3, 4, 5, - 13, 10, 1, 16, 3, 4, 5, 1, 6, 3, - 4, 5, 7, 8, 13, 11, 12, 16, 18, 13, - 1, 1, 16, 3, 4, 5, 11, 0, 0, 1, - 3, 4, 5, 13, 7, 8, 16, 11, 11, 3, - 4, 5, 0, 7, 8, 47, 48, 75, 76, 18, - 19, 11, 15, 23, 11, 11, -1, 25, 81, 79, + 12, 1, 0, 1, 23, 23, 23, 1, 2, 21, + 2, 11, 14, 11, 12, 0, 1, 6, 11, 1, + 18, 6, 14, 17, 9, 25, 11, 12, 0, 1, + 30, 1, 25, 18, 6, 10, 0, 9, 0, 11, + 12, 0, 1, 10, 0, 1, 18, 11, 12, 11, + 9, 2, 11, 12, 18, 11, 12, 1, 2, 18, + 60, 73, 18, 63, 76, 84, 84, 84, 0, 1, + 12, 10, 12, 17, 2, 10, 18, 9, 18, 11, + 12, 1, 19, 3, 4, 5, 18, 7, 8, 17, + 3, 4, 5, 13, 9, 1, 16, 3, 4, 5, + 1, 1, 3, 4, 5, 7, 8, 13, 11, 12, + 16, 6, 13, 20, 1, 16, 3, 4, 5, 18, + 0, 0, 1, 3, 4, 5, 13, 7, 8, 16, + 11, 11, 3, 4, 5, 1, 7, 8, 3, 4, + 5, 11, 47, 48, 78, 79, 18, 19, 11, 1, + 0, 15, 11, 11, 85, 23, 25, 83, ); sub constYYFINAL () { 4 } -sub constYYMAXTOKEN () { 18 } -# 262 "y.tab.pl" +sub constYYMAXTOKEN () { 20 } +# 268 "y.tab.pl" sub yyclearin { $yychar = -1; } sub yyerrok { $yyerrflag = 0; } @@ -235,7 +239,7 @@ else { return (1) if $yychar == 0; -# 313 "y.tab.pl" +# 319 "y.tab.pl" $yychar = -1; next yyloop; @@ -267,7 +271,7 @@ if ($yychar < 0) { if (($yychar = &yylex) < 0) { $yychar = 0; } -# 352 "y.tab.pl" +# 358 "y.tab.pl" } if (($yyn = $yysindex[$yystate]) && ($yyn += $yychar) >= 0 && @@ -307,13 +311,13 @@ goto $label if exists $yystate{$label}; last switch; State1: { -# 94 "parser.y" +# 96 "parser.y" { $yyval = { '' => $yyvs[$yyvsp-0] }; last switch; } } State3: { -# 99 "parser.y" +# 101 "parser.y" { $yyval = { $yyvs[$yyvsp-2], [$yyvs[$yyvsp-0]] }; @@ -321,7 +325,7 @@ last switch; } } State4: { -# 103 "parser.y" +# 105 "parser.y" { $yyval=$yyvs[$yyvsp-3]; @@ -330,7 +334,7 @@ last switch; } } State5: { -# 110 "parser.y" +# 112 "parser.y" { $yyvs[$yyvsp-1]->[cTAG] = $yyvs[$yyvsp-3]; @@ -339,7 +343,7 @@ last switch; } } State11: { -# 124 "parser.y" +# 126 "parser.y" { @{$yyval = []}[cTYPE,cCHILD] = ('COMPONENTS', $yyvs[$yyvsp-0]); @@ -347,7 +351,7 @@ last switch; } } State14: { -# 134 "parser.y" +# 136 "parser.y" { $yyvs[$yyvsp-0]->[cTAG] = $yyvs[$yyvsp-2]; @@ -357,7 +361,7 @@ last switch; } } State18: { -# 147 "parser.y" +# 149 "parser.y" { @{$yyval = []}[cTYPE,cCHILD] = ('SEQUENCE', $yyvs[$yyvsp-1]); @@ -365,7 +369,7 @@ last switch; } } State19: { -# 151 "parser.y" +# 153 "parser.y" { @{$yyval = []}[cTYPE,cCHILD] = ('SET', $yyvs[$yyvsp-1]); @@ -373,7 +377,7 @@ last switch; } } State20: { -# 155 "parser.y" +# 157 "parser.y" { @{$yyval = []}[cTYPE,cCHILD] = ('CHOICE', $yyvs[$yyvsp-1]); @@ -381,59 +385,95 @@ last switch; } } State21: { -# 161 "parser.y" +# 163 "parser.y" { @{$yyval = []}[cTYPE] = ('ENUM'); last switch; } } -State27: { -# 174 "parser.y" +State22: { +# 168 "parser.y" + +{ @{$yyval = []}[cTYPE] = $yyvs[$yyvsp-0]; +last switch; +} } +State23: { +# 169 "parser.y" + +{ @{$yyval = []}[cTYPE] = $yyvs[$yyvsp-0]; +last switch; +} } +State24: { +# 170 "parser.y" + +{ @{$yyval = []}[cTYPE] = $yyvs[$yyvsp-0]; +last switch; +} } +State25: { +# 172 "parser.y" { - @{$yyval = []}[cTYPE] = ($yyvs[$yyvsp-0]); + @{$yyval = []}[cTYPE,cCHILD,cDEFINE] = ('ANY',undef,$yyvs[$yyvsp-0]); last switch; } } +State26: { +# 175 "parser.y" + +{ @{$yyval = []}[cTYPE] = $yyvs[$yyvsp-0]; +last switch; +} } +State27: { +# 178 "parser.y" + +{ $yyval=undef; +last switch; +} } State28: { # 179 "parser.y" +{ $yyval=$yyvs[$yyvsp-0]; +last switch; +} } +State30: { +# 185 "parser.y" + { $yyval = $yyvs[$yyvsp-0]; last switch; } } -State29: { -# 180 "parser.y" +State31: { +# 186 "parser.y" { $yyval = $yyvs[$yyvsp-1]; last switch; } } -State30: { -# 184 "parser.y" +State32: { +# 190 "parser.y" { $yyval = [ $yyvs[$yyvsp-0] ]; last switch; } } -State31: { -# 188 "parser.y" +State33: { +# 194 "parser.y" { push @{$yyval=$yyvs[$yyvsp-2]}, $yyvs[$yyvsp-0]; last switch; } } -State32: { -# 192 "parser.y" +State34: { +# 198 "parser.y" { push @{$yyval=$yyvs[$yyvsp-2]}, $yyvs[$yyvsp-0]; last switch; } } -State33: { -# 198 "parser.y" +State35: { +# 204 "parser.y" { @{$yyval=$yyvs[$yyvsp-0]}[cVAR,cTAG] = ($yyvs[$yyvsp-3],$yyvs[$yyvsp-2]); @@ -441,52 +481,52 @@ last switch; } } -State34: { -# 205 "parser.y" +State36: { +# 211 "parser.y" { $yyval = $yyvs[$yyvsp-0]; last switch; } } -State35: { -# 206 "parser.y" +State37: { +# 212 "parser.y" { $yyval = $yyvs[$yyvsp-1]; last switch; } } -State36: { -# 210 "parser.y" +State38: { +# 216 "parser.y" { $yyval = [ $yyvs[$yyvsp-0] ]; last switch; } } -State37: { -# 214 "parser.y" +State39: { +# 220 "parser.y" { push @{$yyval=$yyvs[$yyvsp-2]}, $yyvs[$yyvsp-0]; last switch; } } -State38: { -# 218 "parser.y" +State40: { +# 224 "parser.y" { push @{$yyval=$yyvs[$yyvsp-2]}, $yyvs[$yyvsp-0]; last switch; } } -State39: { -# 224 "parser.y" +State41: { +# 230 "parser.y" { @{$yyval=$yyvs[$yyvsp-1]}[cOPT] = ($yyvs[$yyvsp-0]); last switch; } } -State43: { -# 233 "parser.y" +State45: { +# 239 "parser.y" { @{$yyval=$yyvs[$yyvsp-0]}[cVAR,cTAG] = ($yyvs[$yyvsp-3],$yyvs[$yyvsp-2]); @@ -495,8 +535,8 @@ last switch; } } -State45: { -# 240 "parser.y" +State47: { +# 246 "parser.y" { @{$yyval=$yyvs[$yyvsp-0]}[cTAG] = ($yyvs[$yyvsp-2]); @@ -504,73 +544,73 @@ last switch; } } -State46: { -# 246 "parser.y" +State48: { +# 252 "parser.y" { $yyval = undef; last switch; } } -State47: { -# 247 "parser.y" +State49: { +# 253 "parser.y" { $yyval = 1; last switch; } } -State48: { -# 251 "parser.y" +State50: { +# 257 "parser.y" { $yyval = undef; last switch; } } -State50: { -# 255 "parser.y" +State52: { +# 261 "parser.y" { $yyval = undef; last switch; } } -State51: { -# 256 "parser.y" +State53: { +# 262 "parser.y" { $yyval = 1; last switch; } } -State52: { -# 257 "parser.y" +State54: { +# 263 "parser.y" { $yyval = 0; last switch; } } -State53: { -# 260 "parser.y" +State55: { +# 266 "parser.y" { last switch; } } -State54: { -# 261 "parser.y" +State56: { +# 267 "parser.y" { last switch; } } -State55: { -# 264 "parser.y" +State57: { +# 270 "parser.y" { last switch; } } -State56: { -# 267 "parser.y" +State58: { +# 273 "parser.y" { last switch; } } -State57: { -# 268 "parser.y" +State59: { +# 274 "parser.y" { last switch; } } -# 615 "y.tab.pl" +# 651 "y.tab.pl" } # switch $yyssp -= $yym; @@ -589,7 +629,7 @@ if ($yychar < 0) { if (($yychar = &yylex) < 0) { $yychar = 0; } -# 641 "y.tab.pl" +# 677 "y.tab.pl" } return $yyvs[$yyvsp] if $yychar == 0; @@ -610,7 +650,7 @@ $yyvs[++$yyvsp] = $yyval; } # yyloop } # yyparse -# 272 "parser.y" +# 278 "parser.y" my %reserved = ( @@ -629,6 +669,8 @@ '}' => constRBRACE(), ',' => constCOMMA(), '::=' => constASSIGN(), + 'DEFINED' => constDEFINED(), + 'BY' => constBY() ); my $reserved = join("|", reverse sort grep { /\w/ } keys %reserved); @@ -911,14 +953,15 @@ 1; -# 950 "y.tab.pl" +# 999 "y.tab.pl" -%yystate = ('State20','','State11','','State30','','State21','','State31', -'','State50','','State32','','State14','','State51','','State33','', -'State52','','State43','','State34','','State53','','State35','','State54', -'','State45','','State36','','State18','','State27','','State55','', -'State46','','State37','','State19','','State28','','State56','','State47', -'','State38','','State29','','State57','','State48','','State39','', -'State1','','State3','','State4','','State5',''); +%yystate = ('State34','','State11','','State33','','State24','','State47', +'','State40','','State31','','State37','','State23','','State22','', +'State21','','State57','','State39','','State56','','State20','','State25', +'','State38','','State14','','State19','','State5','','State53','', +'State26','','State27','','State50','','State36','','State45','','State4', +'','State3','','State32','','State49','','State30','','State35','', +'State48','','State52','','State55','','State28','','State58','','State41', +'','State18','','State59','','State1','','State54',''); 1; |
From: Graham B. <gb...@us...> - 2003-05-06 21:20:29
|
Update of /cvsroot/perl-ldap/ldap/lib/Net In directory sc8-pr-cvs1:/tmp/cvs-serv5604/lib/Net Modified Files: LDAP.pod Log Message: Move =back to correct position Index: LDAP.pod =================================================================== RCS file: /cvsroot/perl-ldap/ldap/lib/Net/LDAP.pod,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- LDAP.pod 6 May 2003 16:58:22 -0000 1.22 +++ LDAP.pod 6 May 2003 21:20:24 -0000 1.23 @@ -520,6 +520,8 @@ no DN is supplied the base object entry will be determined from the rootDSE entry. +=back + B<Example> my $schema = $ldap->schema(); @@ -801,8 +803,6 @@ certificate, do this: print "Subject DN: " . $ldaps->certificate->subject_name . "\n"; - -=back =item version |
From: Graham B. <gb...@us...> - 2003-05-06 16:58:25
|
Update of /cvsroot/perl-ldap/ldap/lib/Net In directory sc8-pr-cvs1:/tmp/cvs-serv10912/lib/Net Modified Files: LDAP.pod Log Message: Fix method names in examples Index: LDAP.pod =================================================================== RCS file: /cvsroot/perl-ldap/ldap/lib/Net/LDAP.pod,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- LDAP.pod 6 May 2003 15:47:37 -0000 1.21 +++ LDAP.pod 6 May 2003 16:58:22 -0000 1.22 @@ -524,9 +524,9 @@ my $schema = $ldap->schema(); # get objectClasses - @ocs = $schema->objectclasses(); + @ocs = $schema->all_objectclasses(); # Get the attributes - @atts = $schema->attributes(); + @atts = $schema->all_attributes(); =item search ( OPTIONS ) |
From: Graham B. <gb...@us...> - 2003-05-06 16:46:06
|
Update of /cvsroot/perl-ldap/ldap/lib/Net/LDAP In directory sc8-pr-cvs1:/tmp/cvs-serv3482/lib/Net/LDAP Modified Files: Message.pm Log Message: Call the callback, if any, for a message when its error is explicitly set Index: Message.pm =================================================================== RCS file: /cvsroot/perl-ldap/ldap/lib/Net/LDAP/Message.pm,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- Message.pm 6 May 2003 11:55:05 -0000 1.5 +++ Message.pm 6 May 2003 16:46:02 -0000 1.6 @@ -10,7 +10,7 @@ use strict; use vars qw($VERSION); -$VERSION = "1.05"; +$VERSION = "1.06"; my $MsgID = 0; @@ -96,6 +96,8 @@ sub set_error { my $self = shift; ($self->{resultCode},$self->{errorMessage}) = ($_[0]+0, "$_[1]"); + $self->{callback}->($self) + if (defined $self->{callback}); $self; } |
From: Graham B. <gb...@us...> - 2003-05-06 16:45:24
|
Update of /cvsroot/perl-ldap/ldap/lib/Net/LDAP In directory sc8-pr-cvs1:/tmp/cvs-serv3029/lib/Net/LDAP Modified Files: Bind.pm Log Message: Check result of client_step is defined or cause SASL auth to terminate Index: Bind.pm =================================================================== RCS file: /cvsroot/perl-ldap/ldap/lib/Net/LDAP/Bind.pm,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- Bind.pm 18 Feb 2002 16:51:42 -0000 1.3 +++ Bind.pm 6 May 2003 16:45:20 -0000 1.4 @@ -40,6 +40,9 @@ my $resp = $sasl->client_step($bind->{serverSaslCreds}); + $self->set_error(LDAP_DECODING_ERROR,"LDAP decode error"), return + unless defined $resp; + $self->encode( bindRequest => { version => $ldap->version, |
From: Chris R. <chr...@us...> - 2003-05-06 16:39:50
|
Update of /cvsroot/perl-ldap/ldap In directory sc8-pr-cvs1:/tmp/cvs-serv686 Modified Files: CREDITS Log Message: Added Derik Pates Index: CREDITS =================================================================== RCS file: /cvsroot/perl-ldap/ldap/CREDITS,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- CREDITS 6 May 2003 16:28:31 -0000 1.5 +++ CREDITS 6 May 2003 16:39:47 -0000 1.6 @@ -34,3 +34,4 @@ Damon Brodie <da...@br...> Peter Marschall <pe...@ad...> Paul David Fardy <pd...@mu...> +Derik Pates <dp...@ds...> |
From: Chris R. <chr...@us...> - 2003-05-06 16:38:29
|
Update of /cvsroot/perl-ldap/ldap In directory sc8-pr-cvs1:/tmp/cvs-serv32528 Modified Files: MANIFEST Log Message: Added LDAPI.pm Index: MANIFEST =================================================================== RCS file: /cvsroot/perl-ldap/ldap/MANIFEST,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- MANIFEST 11 Sep 2002 12:52:09 -0000 1.20 +++ MANIFEST 6 May 2003 16:38:24 -0000 1.21 @@ -82,6 +82,7 @@ lib/Net/LDAP/Search.pod lib/Net/LDAP/Security.pod lib/Net/LDAP/Util.pm +lib/Net/LDAPI.pm lib/Net/LDAPS.pm mkmanf t/00ldif-entry.t |
From: Chris R. <chr...@us...> - 2003-05-06 16:36:57
|
Update of /cvsroot/perl-ldap/ldap/lib/Net In directory sc8-pr-cvs1:/tmp/cvs-serv31828 Added Files: LDAPI.pm Log Message: New file from Derrik Pates --- NEW FILE: LDAPI.pm --- # Copyright (c) 2000-2002 Chris Ridd <chr...@me...> and # Graham Barr <gb...@po...>. All rights reserved. This program is # free software; you can redistribute it and/or modify it under the # same terms as Perl itself. package Net::LDAPI; @Net::LDAPI::ISA = ( 'Net::LDAP' ); $Net::LDAPI::VERSION = "0.01"; use strict; use Net::LDAP; use IO::Socket::UNIX; sub _connect { my ($ldap, $sockpath) = @_; $sockpath = "/var/lib/ldapi" unless defined($sockpath); $ldap->{'net_ldap_socket'} = IO::Socket::UNIX->new( Type => &SOCK_STREAM, Peer => $sockpath ); } 1; __END__ =head1 NAME Net::LDAPI - use LDAP over a UNIX domain socket =head1 SYNOPSIS use Net::LDAPI; $ldaps = new Net::LDAPI('/var/lib/ldapi'); =head1 DESCRIPTION Communicate using the LDAP protocol to a directory server using a UNIX domain socket. This class is a subclass of Net::LDAP so all the normal Net::LDAP methods can be used with a Net::LDAPI object; see the documentation for Net::LDAP to find out how to query a directory server using the LDAP protocol. =head1 CONSTRUCTOR =over 4 =item new ( [SOCKPATH] ) Create a new connection. SOCKPATH can optionally be specified, to specify the location of the UNIX domain socket to connect to. By default, the domain socket path is '/var/lib/ldapi'. This is OpenLDAP-specific. =back =head1 SEE ALSO L<Net::LDAP>, L<IO::Socket::UNIX> =head1 BUGS None yet. =head1 AUTHOR Derrik Pates <dp...@ds...> =head1 COPYRIGHT Original code Copyright (c) 2000-2002, Chris Ridd and Graham Barr. All rights reserved. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut |
From: Chris R. <chr...@us...> - 2003-05-06 16:32:14
|
Update of /cvsroot/perl-ldap/ldap/lib/Net In directory sc8-pr-cvs1:/tmp/cvs-serv29454/lib/Net Modified Files: LDAP.pm Log Message: Check client_start return value Index: LDAP.pm =================================================================== RCS file: /cvsroot/perl-ldap/ldap/lib/Net/LDAP.pm,v retrieving revision 1.44 retrieving revision 1.45 diff -u -d -r1.44 -r1.45 --- LDAP.pm 6 May 2003 16:18:15 -0000 1.44 +++ LDAP.pm 6 May 2003 16:32:11 -0000 1.45 @@ -254,6 +254,9 @@ my $initial = $sasl_conn->client_start; + return _error($ldap, $mesg, LDAP_LOCAL_ERROR, "$@") unless + defined($initial); + $passwd = { mechanism => $sasl_conn->mechanism, credentials => $initial |
From: Chris R. <chr...@us...> - 2003-05-06 16:28:36
|
Update of /cvsroot/perl-ldap/ldap In directory sc8-pr-cvs1:/tmp/cvs-serv27321 Modified Files: CREDITS Log Message: Added Peter Marschall and Paul David Fardy Index: CREDITS =================================================================== RCS file: /cvsroot/perl-ldap/ldap/CREDITS,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- CREDITS 6 May 2003 12:20:27 -0000 1.4 +++ CREDITS 6 May 2003 16:28:31 -0000 1.5 @@ -32,3 +32,5 @@ David Faltermier <dav...@hp...> Ziya Suzen <zi...@ri...> Damon Brodie <da...@br...> +Peter Marschall <pe...@ad...> +Paul David Fardy <pd...@mu...> |
From: Chris R. <chr...@us...> - 2003-05-06 16:26:18
|
Update of /cvsroot/perl-ldap/ldap/lib/Net/LDAP In directory sc8-pr-cvs1:/tmp/cvs-serv25985 Modified Files: Entry.pm Log Message: changes now returns an empty array if there were no changes. Index: Entry.pm =================================================================== RCS file: /cvsroot/perl-ldap/ldap/lib/Net/LDAP/Entry.pm,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- Entry.pm 3 Mar 2003 18:00:22 -0000 1.12 +++ Entry.pm 6 May 2003 16:26:15 -0000 1.13 @@ -310,7 +310,8 @@ } sub changes { - @{shift->{'changes'}} + my $ref = shift->{'changes'}; + $ref ? @$ref : (); } 1; |
From: Chris R. <chr...@us...> - 2003-05-06 16:18:18
|
Update of /cvsroot/perl-ldap/ldap/lib/Net In directory sc8-pr-cvs1:/tmp/cvs-serv21015 Modified Files: LDAP.pm Log Message: Peter's net_ldap_host fix Index: LDAP.pm =================================================================== RCS file: /cvsroot/perl-ldap/ldap/lib/Net/LDAP.pm,v retrieving revision 1.43 retrieving revision 1.44 diff -u -d -r1.43 -r1.44 --- LDAP.pm 6 May 2003 16:09:18 -0000 1.43 +++ LDAP.pm 6 May 2003 16:18:15 -0000 1.44 @@ -106,7 +106,6 @@ return undef unless $obj->{net_ldap_socket}; - $obj->{net_ldap_host} = $host; $obj->{net_ldap_resp} = {}; $obj->{net_ldap_version} = $arg->{version} || $LDAP_VERSION; $obj->{net_ldap_async} = $arg->{async} ? 1 : 0; |
From: Graham B. <gb...@us...> - 2003-05-06 16:09:21
|
Update of /cvsroot/perl-ldap/ldap/lib/Net In directory sc8-pr-cvs1:/tmp/cvs-serv16689/lib/Net Modified Files: LDAP.pm Log Message: Fix ->modify to not require the value in ->modify( add => [ attr => value ] ) to be an array reference Index: LDAP.pm =================================================================== RCS file: /cvsroot/perl-ldap/ldap/lib/Net/LDAP.pm,v retrieving revision 1.42 retrieving revision 1.43 diff -u -d -r1.42 -r1.43 --- LDAP.pm 6 May 2003 15:47:37 -0000 1.42 +++ LDAP.pm 6 May 2003 16:09:18 -0000 1.43 @@ -430,7 +430,7 @@ operation => $opcode, modification => { type => $attr, - vals => $val + vals => ref($val) ? $val : [$val] } }; } |
From: Chris R. <chr...@us...> - 2003-05-06 15:54:23
|
Update of /cvsroot/perl-ldap/ldap/lib/Net/LDAP In directory sc8-pr-cvs1:/tmp/cvs-serv9918 Modified Files: FAQ.pod Log Message: Major updates to terminology section, misc fixes, and updated books Index: FAQ.pod =================================================================== RCS file: /cvsroot/perl-ldap/ldap/lib/Net/LDAP/FAQ.pod,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- FAQ.pod 14 Mar 2003 10:04:55 -0000 1.27 +++ FAQ.pod 6 May 2003 15:54:19 -0000 1.28 @@ -48,13 +48,14 @@ =head2 Is there a mailing list ? -Yes there is at per...@li... +Yes there is at per...@pe... -You can subscribe to this list at - http://lists.sourceforge.net/mailman/listinfo/perl-ldap-dev +You can subscribe to this list by mailing per...@pe... =head2 Is the mailing list archived ? +Yes, at http://archive.develooper.com/per...@pe.../ + Archives of messages since we switched to using sourceforge can be found at @@ -145,8 +146,8 @@ =head2 What is a directory. -A directory is a special purpose database that usually contains -typed information such as text strings, binary data, or X.509 +A directory is a special purpose hierarchical database that usually +contains typed information such as text strings, binary data, or X.509 certificates. =head2 What is LDAP. @@ -167,14 +168,13 @@ =head2 What is a LDAP Directory. -In the strictest terms of the definition there is no such -thing as a LDAP directory. To be practical about this -situation every day directory professionals refer to their -directory as " a LDAP directory" because it is easy to -say and it does convey the type of protocol used to -communicate with their directory. Using this definition -a LDAP directory is a directory whose server software -conforms to the Lightweight Directory Access Protocol when +In the strictest terms of the definition there is no such thing as a +LDAP directory. To be practical about this situation every day +directory professionals refer to their directory as " a LDAP +directory" because it is easy to say and it does convey the type of +protocol used to communicate with their directory. Using this +definition a LDAP directory is a directory whose server software +conforms to the Lightweight Directory Access Protocol when communicating with a client. =head2 What is an Entry. @@ -183,19 +183,80 @@ is called an Entry. Entries are composed of attributes that contain the information to be recorded about an object. -Another non-traditional definition of a directory object -is called a record. Some directory professionals prefer -to use this definition because of the confusion that sometimes -results when using the term Entry. +(An entry in LDAP is somewhat analogous to a record in a table in an +SQL database, but don't get too hung up about this analogy!) -=head2 What is a Distinguished Name. +Entries are held in an upside-down tree structure. Entries can +therefore contain subordinate entries, and entries B<must> have one +direct superior entry. -Every entry in a directory, whether it is X.500 or LDAP, has -a Distinguished Name, or DN. It is a unique Entry identifier -through out the complete directory. No two Entries can have the -same DN within the same directory. +Entries with subordinate entries are called 'non-leaf' entries. -Example of a DN: +Entries without subordinate entries are called 'leaf' entries. + +An entry's direct superior entry is called the entry's 'parent'. + +'Non-leaf' entries are also said to have 'child' entries. + +=head2 What is an attribute. + +The entry(s) in a directory are composed of attributes that contain +information about the object. Each attribute has a type +and can contain one or more values. + +For example: + + cn=Road Runner + +is an attribute with a type named "cn", and one value. + +Each attribute is described by a 'syntax' which defines what kind of +information can be stored in the attributes values. Trying to store a +value that doesn't conform to the attribute's syntax will result in an +error. + +For example: + + jpegPhoto=unknown + +is not permitted by the directory, because jpegPhotos may only contain +JPEG-formatted images. + +Attributes may also be searched. The algorithms used to perform +different kinds of searches are described by the attribute's 'matching +rules'. Some matching rules are case-sensitive and some are +case-insensitive, for example. Sometimes matching rules aren't +defined for a particular attribute: there's no way to search for +jpegPhotos that contain a substring! + +You can examine all of a server's attribute definitions by reading the +schema from the server. + +=head2 What is an object class. + +An object class is the name associated with a group of attributes that +B<must> be present in an entry, and the group of attributes that +B<may> also be present in an entry. + +Object classes may be derived (subclassed) from other object classes. +For example the widely used 'inetOrgPerson' object class is derived +from 'organizationalPerson', which is itself derived from 'person' +which is itself derived from 'top'. + +Every entry has an attribute called 'objectClass' that lists all the +names of object classes (and their superclasses) being used with the +entry. + +You can examine all of a server's objectclass definitions by reading +the schema from the server. + +=head2 What is a Distinguished Name (DN). + +Every entry in a directory has a Distinguished Name, or DN. It is a +unique Entry identifier throughout the complete directory. No two +Entries can have the same DN within the same directory. + +Examples of DNs: cn=Road Runner, ou=bird, dc=cartoon, dc=com ou=bird, dc=cartoon, dc=com @@ -204,12 +265,15 @@ =head2 What is a Relative Distinguished Name. -Every Entry in a directory, whether it is X.500 or LDAP, has -a Distinguished Name which is made up of a sequence of Relative -Distinguished Names, or RDNs. The sequences of RDNs are separated -by commas (,) or semi-colons (;). There can be more than one -identical RDN in a directory, but they must be in different -bases, or branches, of the directory. +Every DN is made up of a sequence of Relative Distinguished Names, or +RDNs. The sequences of RDNs are separated by commas (,). In LDAPv2 +semi-colons (;) were also allowed. There can be more than one +identical RDN in a directory, but they must have different parent +entries. + +Technically, an RDN contains attribute-value assertions, or AVAs. When +an AVA is written down, the attribute name is separated from the +attribute value with an equals (=) sign. Example of a DN: @@ -221,21 +285,33 @@ RDN => dc=cartoon RDN => dc=com -The RDNs are delimited by a comma. +RDNs can contain multiple attributes, though this is somewhat +ususual. They are called multi-AVA RDNs, and each AVA is separated in +the RDN from the others with a plus sign (+). -=head2 What is a Naming RDN. +Example of a DN with a multi-AVA RDN: -Example of a DN: + cn=Road Runner+l=Arizona,ou=bird,dc=cartoon,dc=com - cn=Road Runner,ou=bird,dc=cartoon,dc=com +=head2 Where is an entry's name held? - Naming RDN of the proceeding DN: +Entries do B<not> contain their DN. When you retrieve an entry from +a search, the server will tell you the DN of each entry. - cn=Road Runner +On the other hand, entries B<do> contain their RDN. Recall that the RDN +is formed from one or more attribute-value assertions (AVAs); each entry +must contain all the attributes and values in the RDN. -Most of the time when directory professionals refer -to the RDN of an entry, this is the RDN that they -are referring to. +For example the entry: + + cn=Road Runner+l=Arizona,ou=bird,dc=cartoon,dc=com + +B<must> contain a 'cn' attribute containing at least the value +"Road Runner", B<and> an 'l' attribute containing at least the value +"Arizona". + +The attributes used in the RDN may contain additional values, but the +entry still only has one DN. =head2 What is a search base. @@ -256,19 +332,7 @@ Setting the search base to the lowest possible branch of the directory will speed up searches considerably. -=head2 What is an attribute. - -The entry(s) in a directory are composed of attributes that contain -information about the object. Each attribute has a type -and can contain one or more values. The attribute type is -associated with a syntax that defines what kind of information -can be stored in the attributes values and controls how -directory operations on the attribute behave. What attributes -are required and allowed in a entry is controlled by content -rules that are defined on a per-server basis or by a special -attribute in each entry called an objectClass. - -=head2 What is the difference between a LDAP server and a relational database +=head2 What is the difference between a LDAP server and a relational database. The most basic difference is that a directory server is a specialized database designed to provide fast searches. While a relational @@ -278,7 +342,7 @@ Directories also typically are hierarchical in nature (RDBMS is typically flat, but you can implement a hierarchy using tables and queries), -network-able, distributed and replicated. +networkable, distributed and replicated. LDAP provides an open-standard to a directory service. @@ -286,7 +350,7 @@ provide an LDAP client now) and authorization services (authentication and access control). -You could use a RDBMS for these types of queries but there's not a +You could use a RDBMS for these types of queries but there's no set standard, in particular over TCP/IP to connect to databases over the network. There's language specific protocols (like Perl's DBI and Java's JDBC) that hide this problem behind an API abstraction, but that's not a @@ -326,11 +390,11 @@ same steps that you would for most other distributions found on CPAN, that is - # replace 0.13 with the version you have + # replace 0.27 with the version you have - gunzip perl-ldap-0.13.tar.gz - tar xvf perl-ldap-0.13.tar - cd perl-ldap-0.13 + gunzip perl-ldap-0.27.tar.gz + tar xvf perl-ldap-0.27.tar + cd perl-ldap-0.27 perl Makefile.PL make @@ -472,19 +536,20 @@ =head2 What is the proper format of the bind DN. -The DN used to bind to a LDAP or X.550 directory is a FULLY QUALIFIED DN. -The exact syntax of the DN will vary between LDAP or X.500 implementations. +The DN used to bind to a directory is a FULLY QUALIFIED DN. The exact +structure of the DN will depend on what data has been stored in the +server. The following are valid examples. -uid=clif,ou=People,dc=umich,dc=edu + uid=clif,ou=People,dc=umich,dc=edu -cn=directory manager,ou=admins,dc=umich,dc=edu + cn=directory manager,ou=admins,dc=umich,dc=edu -In many LDAP and X.500 directory implementations the following -would be a valid fully qualified DN of the directory manager. +In some servers the following would be a valid fully qualified DN of +the directory manager. -cn=directory manager + cn=directory manager =head2 How can I tell when the server returns an error, bind() always returns true ? @@ -501,9 +566,9 @@ # Handle error codes here } -=head2 How can I set the ldap version of a connection to my ldap server? +=head2 How can I set the LDAP version of a connection to my ldap server? -This is done by adding the version option when binding to the ldap +This is done by adding the version option when binding to the LDAP server. For example; @@ -515,7 +580,7 @@ =head2 I did a search on my directory using the 'search' method. Where did the results go ? -Your search results are stored in a 'search object' container. +Your search results are stored in a 'search object'. Consider the following: use Net::LDAP; @@ -526,10 +591,10 @@ filter => "uid=jsmith", ); -$mesg is a search object container. It is a reference blessed into the -L<Net::LDAP::Search> package. By calling methods on -this object you can obtain information about the result and also the -individual entries. +$mesg is a search object. It is a reference blessed into the +L<Net::LDAP::Search> package. By calling methods on this object you +can obtain information about the result and also the individual +entries. The first thing to check is if the search was successful. This is done with with the method $mesg->code. This method will return the status code @@ -562,9 +627,9 @@ # ... } -In each case $entry is an entry object container. It is a reference blessed -into the L<Net::LDAP::Entry> package. By calling methods on this object -you can obtain information about the entry. +In each case $entry is an entry object. It is a reference blessed into +the L<Net::LDAP::Entry> package. By calling methods on this object you +can obtain information about the entry. For example, to obtain the DN for the entry @@ -764,7 +829,7 @@ =head1 USING NET::LDAPS -=head2 Using a potentially encrypted (SSL) network connection, how do I connect to my server? +=head2 Using an SSL network connection, how do I connect to my server? This class is a subclass of Net::LDAP so all the normal Net::LDAP methods can be used with a Net::LDAPS object; @@ -790,11 +855,12 @@ =head2 What are LDAP groups. -LDAP groups are a collection of distinguished names (DN) that are -listed in an attribute called member. One I<important note> to -remember is that a group can be a collection of groups. This -does I<NOT> imply that the subgroups will be flattened into one -big group. +LDAP groups are object classes that contain an attribute that can +store multiple DN values. Two standard object classes are +'groupOfNames' (which has a 'member' attribute) and +'groupOfUniqueNames' (which has a 'uniqueMember' attribute.) + +A group can be a member of another group. Two scripts for working with groups are available in the contrib directory. They are isMember.pl and printMembers.pl. @@ -893,7 +959,7 @@ must register with sourceforge before your scripts will be put into the contrib CVS system. -=head2 Is possible to get a complete entry, dn and attributes +=head2 Is possible to get a complete entry, DN and attributes without specifying the attributes name? Yes, just specify you want a list of no attributes back. The RFC says @@ -910,7 +976,7 @@ attrs => [ "*" ] -=head2 How do I put a jpeg photo into a entry in the directory. +=head2 How do I put a JPEG photo into a entry in the directory. Follow the following code example, replacing the (...) with whatever is relevant to your setup. @@ -977,7 +1043,7 @@ my $mesg = $ldap->modify( $entry, replace => { %qv_del_arry } ); -But make sure you are using LDAPv3, because that is defined to *not* work +But make sure you are using LDAPv3, because that is defined to B<not> work in LDAPv2. (A nice incompatibility between LDAPv2 and LDAPv3.) =head2 How can I delete a referral from an LDAP tree. @@ -1100,7 +1166,7 @@ The first problem here is that there are many different formats to hold certificates in, for example PEM, DER, PKCS#7 and PKCS#12. The directory -*only* uses the DER format (more correctly, it only uses the BER format) +B<only> uses the DER format (more correctly, it only uses the BER format) which is a binary format. Your first job is to ensure that your certificates are therefore in DER/BER @@ -1118,34 +1184,35 @@ To slurp in the certificate try something like this: - my $cert; - { - local $/ = undef; # Slurp mode - open CERT, "cert.der" or die; - $cert = <CERT>; - close CERT; - } - # The certificate is now in $cert + my $cert; + { + local $/ = undef; # Slurp mode + open CERT, "cert.der" or die; + binmode CERT; + $cert = <CERT>; + close CERT; + } + # The certificate is now in $cert For LDAPv2, because most directory vendors ignore the string representation of certificates defined in RFC 1778, you should add this value to the directory like this: - $res = $ldap->modify("cn=My User, o=My Company,c=XY", - add => [ - 'userCertificate' => [ $cert ] - ]); - die "Modify failed (" . ldap_error_name($res->code) . ")\n" - if $res->code; + $res = $ldap->modify("cn=My User, o=My Company,c=XY", + add => [ + 'userCertificate' => [ $cert ] + ]); + die "Modify failed (" . ldap_error_name($res->code) . ")\n" + if $res->code; For LDAPv3, you must do this instead: - $res = $ldap->modify("cn=My User, o=My Company, c=XY", - add => [ - 'userCertificate;binary' => [ $cert ] - ]); - die "Modify failed (" . ldap_error_name($res->code) . ")\n" - if $res->code; + $res = $ldap->modify("cn=My User, o=My Company, c=XY", + add => [ + 'userCertificate;binary' => [ $cert ] + ]); + die "Modify failed (" . ldap_error_name($res->code) . ")\n" + if $res->code; Of course, the entry you are trying to add the certificate to must use object classes that permit the userCertificate attribute, otherwise the @@ -1244,9 +1311,12 @@ Solaris and LDAP Naming Services. By Tom Bialaski, Michael Haines. ISBN: 0-13-030678-9 -Understanding and Deploying Ldap Directory Services. -By Tim Howes, Mark Smith, Gordon Good, Timothy A. Howe -ISBN: 1578700701 +Understanding and Deploying LDAP Directory Services (2ed). +By Tim Howes, Mark Smith, Gordon Good +ISBN: 0672323168 + +LDAP Directories Explained. +By Brian Arkills. ISBN 0-201-78792-X =head1 AUTHORS |
From: Graham B. <gb...@us...> - 2003-05-06 15:47:42
|
Update of /cvsroot/perl-ldap/ldap/lib/Net In directory sc8-pr-cvs1:/tmp/cvs-serv6865/lib/Net Modified Files: LDAP.pm LDAP.pod Log Message: Added ->disconnect to do explicit disconnects from the server Index: LDAP.pm =================================================================== RCS file: /cvsroot/perl-ldap/ldap/lib/Net/LDAP.pm,v retrieving revision 1.41 retrieving revision 1.42 diff -u -d -r1.41 -r1.42 --- LDAP.pm 6 May 2003 15:37:51 -0000 1.41 +++ LDAP.pm 6 May 2003 15:47:37 -0000 1.42 @@ -610,6 +610,11 @@ $err; } +sub disconnect { + my $self = shift; + _drop_conn($self, LDAP_USER_CANCELED, "Explicit disconnect"); +} + sub _sendmesg { my $ldap = shift; my $mesg = shift; Index: LDAP.pod =================================================================== RCS file: /cvsroot/perl-ldap/ldap/lib/Net/LDAP.pod,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- LDAP.pod 6 May 2003 11:52:40 -0000 1.20 +++ LDAP.pod 6 May 2003 15:47:37 -0000 1.21 @@ -777,6 +777,10 @@ =back +=item disconnect + +Disconnect from the server + =back =over 4 |
From: Graham B. <gb...@us...> - 2003-05-06 15:37:54
|
Update of /cvsroot/perl-ldap/ldap/lib/Net In directory sc8-pr-cvs1:/tmp/cvs-serv1965/lib/Net Modified Files: LDAP.pm Log Message: Better handling on IO errors Index: LDAP.pm =================================================================== RCS file: /cvsroot/perl-ldap/ldap/lib/Net/LDAP.pm,v retrieving revision 1.40 retrieving revision 1.41 diff -u -d -r1.40 -r1.41 --- LDAP.pm 27 Jan 2003 18:24:15 -0000 1.40 +++ LDAP.pm 6 May 2003 15:37:51 -0000 1.41 @@ -20,6 +20,7 @@ LDAP_LOCAL_ERROR LDAP_PARAM_ERROR LDAP_INAPPROPRIATE_AUTH + LDAP_SERVER_DOWN ); $VERSION = "0.2701"; @@ -625,7 +626,9 @@ if $debug & 4; } - syswrite($ldap->socket, $mesg->pdu, length($mesg->pdu)) + my $socket = $ldap->socket or return LDAP_SERVER_DOWN; + + syswrite($socket, $mesg->pdu, length($mesg->pdu)) or return _error($ldap, $mesg, LDAP_LOCAL_ERROR,"$!"); # for CLDAP, here we need to recode when we were sent @@ -652,14 +655,14 @@ sub _recvresp { my $ldap = shift; my $what = shift; - my $sock = $ldap->socket; + my $sock = $ldap->socket or return LDAP_SERVER_DOWN; my $sel = IO::Select->new($sock); my $ready; for( $ready = 1 ; $ready ; $ready = $sel->can_read(0)) { my $pdu; asn_read($sock, $pdu) - or return LDAP_OPERATIONS_ERROR; + or return _drop_conn($self, LDAP_OPERATIONS_ERROR, "Communications Error"); my $debug; if ($debug = $ldap->debug) { @@ -695,6 +698,20 @@ return LDAP_SUCCESS; } + +sub _drop_conn { + my ($self, $err, $etxt) = @_; + + delete $self->{net_ldap_socket}; + if (my $msgs = delete $self->{net_ldap_mesg}) { + foreach my $mesg (values %$msgs) { + $mesg->set_error($err, $etxt); + } + } + + $err; +} + sub _forgetmesg { my $ldap = shift; |
From: Graham B. <gb...@us...> - 2003-05-06 14:17:46
|
Update of /cvsroot/perl-ldap/asn/lib/Convert/ASN1 In directory sc8-pr-cvs1:/tmp/cvs-serv23161/lib/Convert/ASN1 Modified Files: Debug.pm Log Message: Fix debug output for OIDs Index: Debug.pm =================================================================== RCS file: /cvsroot/perl-ldap/asn/lib/Convert/ASN1/Debug.pm,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- Debug.pm 22 Jan 2002 11:24:28 -0000 1.7 +++ Debug.pm 6 May 2003 14:17:43 -0000 1.8 @@ -126,7 +126,7 @@ }; /^(?:(OBJECT ID)|(RELATIVE-OID))/ && do { - my @op; $op[opTYPE] = $1 ? opOBJID : opROID; + my @op; $op[cTYPE] = $1 ? opOBJID : opROID; Convert::ASN1::_dec_object_id({},\@op,{},$tmp,$_[0],$pos,$len); printf " = %s\n",$tmp; last; |
From: Graham B. <gb...@us...> - 2003-05-06 12:40:36
|
Update of /cvsroot/perl-ldap/asn/lib/Convert In directory sc8-pr-cvs1:/tmp/cvs-serv12187/lib/Convert Modified Files: ASN1.pm ASN1.pod Log Message: CER and DER SET encoding Index: ASN1.pm =================================================================== RCS file: /cvsroot/perl-ldap/asn/lib/Convert/ASN1.pm,v retrieving revision 1.24 retrieving revision 1.25 diff -u -d -r1.24 -r1.25 --- ASN1.pm 6 May 2003 11:07:19 -0000 1.24 +++ ASN1.pm 6 May 2003 12:40:32 -0000 1.25 @@ -21,7 +21,7 @@ } @ISA = qw(Exporter); - $VERSION = '0.16_01'; + $VERSION = '0.16_02'; %EXPORT_TAGS = ( io => [qw(asn_recv asn_send asn_read asn_write asn_get asn_ready)], @@ -109,7 +109,14 @@ sub configure { my $self = shift; my %opt = @_; - + + $self->{options}{encoding} = uc($opt{encoding} || 'BER'); + + unless ($self->{options}{encoding} =~ /^[BD]ER$/) { + require Carp; + Carp::croak("Unsupported encoding format '$opt{encoding}'"); + } + for my $type (qw(encode decode)) { if (exists $opt{$type}) { while(my($what,$value) = each %{$opt{$type}}) { Index: ASN1.pod =================================================================== RCS file: /cvsroot/perl-ldap/asn/lib/Convert/ASN1.pod,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- ASN1.pod 19 Aug 2002 23:59:18 -0000 1.7 +++ ASN1.pod 6 May 2003 12:40:32 -0000 1.8 @@ -63,7 +63,7 @@ =item encoding -One of 'ber', 'der', 'per'. I<Currently not used> +One of 'BER' or 'DER'. The default is 'BER' =back @@ -432,7 +432,7 @@ =head1 AUTHOR -Graham Barr <gb...@po...>, Report bugs via <bug...@rt...> +Graham Barr <gb...@po...>, Report bugs via <bug...@rt...> =head1 COPYRIGHT |
From: Graham B. <gb...@us...> - 2003-05-06 12:40:36
|
Update of /cvsroot/perl-ldap/asn/t In directory sc8-pr-cvs1:/tmp/cvs-serv12187/t Modified Files: 08set.t 13utf8.t Added Files: 12der.t Log Message: CER and DER SET encoding --- NEW FILE: 12der.t --- #!/usr/local/bin/perl # # Test the use of sets # use Convert::ASN1; BEGIN { require 't/funcs.pl' } print "1..18\n"; btest 1, $asn = Convert::ASN1->new(encoding => 'DER') or warn $asn->error; btest 2, $asn->prepare(q( SET { integer INTEGER, str STRING, bool BOOLEAN } )) or warn $asn->error; my $result = pack("C*", 0x31, 0x10, 0x01, 0x01, 0x00, 0x02, 0x01, 0x09, 0x04, 0x08, 0x41, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6E, 0x67 ); stest 3, $result, $asn->encode(integer => 9, bool => 0, str => "A string") or warn $asn->error; btest 4, $ret = $asn->decode($result) or warn $asn->error; ntest 5, 9, $ret->{integer}; ntest 6, 0, $ret->{bool}; stest 7, "A string", $ret->{str}; btest 8, $asn = Convert::ASN1->new or warn $asn->error; btest 9, $asn->prepare(q( SET { bool BOOLEAN, str STRING, integer INTEGER } )) or warn $asn->error; btest 10, $ret = $asn->decode($result) or warn $asn->error; ntest 11, 9, $ret->{integer}; ntest 12, 0, $ret->{bool}; stest 13, "A string", $ret->{str}; btest 14, $asn->prepare(q( SEQUENCE { true BOOLEAN, false BOOLEAN } )) or warn $asn->error; $result = pack("C*", 0x30, 0x06, 0x01, 0x01, 0xff, 0x01, 0x01, 0x00); stest 15, $result, $asn->encode(true => 99, false => 0) or warn $asn->error; btest 16, $ret = $asn->decode($result) or warn $asn->error; btest 17, $ret->{true}; btest 18, !$ret->{false}; Index: 08set.t =================================================================== RCS file: /cvsroot/perl-ldap/asn/t/08set.t,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- 08set.t 25 Mar 2002 14:59:28 -0000 1.2 +++ 08set.t 6 May 2003 12:40:32 -0000 1.3 @@ -19,7 +19,7 @@ } )) or warn $asn->error; -my $result = pack("C*", 0x31, 0x10, 0x02, 0x01, 0x09, 0x01, 0x01, 0x00, +my $result = pack("C*", 0x31, 0x10, 0x01, 0x01, 0x00, 0x02, 0x01, 0x09, 0x04, 0x08, 0x41, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6E, 0x67 ); Index: 13utf8.t =================================================================== RCS file: /cvsroot/perl-ldap/asn/t/13utf8.t,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- 13utf8.t 6 May 2003 11:07:18 -0000 1.1 +++ 13utf8.t 6 May 2003 12:40:32 -0000 1.2 @@ -7,7 +7,7 @@ use Convert::ASN1; BEGIN { require 't/funcs.pl' } -if ($] < 5.006) { +if ($] < 5.007) { print "1..0\n"; exit; } @@ -37,8 +37,8 @@ btest 8, $ret = $asn->decode($result) or warn $asn->error; stest 9, $utf_str, $ret->{str}; -# Test that UTF8String will upgrade on encoding, except in 5.6 -$result = $] > 5.007 ? pack("C*", 0x0c, 0x02, 0xc2, 0x81) : pack("C*", 0x0c, 0x01, 0x81); +# Test that UTF8String will upgrade on encoding +$result = pack("C*", 0x0c, 0x02, 0xc2, 0x81); stest 10, $result, $asn->encode(str => chr(0x81)) or warn $asn->error; btest 11, $ret = $asn->decode($result) or warn $asn->error; |
From: Graham B. <gb...@us...> - 2003-05-06 12:40:36
|
Update of /cvsroot/perl-ldap/asn In directory sc8-pr-cvs1:/tmp/cvs-serv12187 Modified Files: parser.y Log Message: CER and DER SET encoding Index: parser.y =================================================================== RCS file: /cvsroot/perl-ldap/asn/parser.y,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- parser.y 19 Aug 2002 23:51:37 -0000 1.8 +++ parser.y 6 May 2003 12:40:32 -0000 1.9 @@ -364,6 +364,17 @@ ;# Here we need to flatten CHOICEs and check that SET and CHOICE ;# do not contain duplicate tags ;#} + if ($op->[cTYPE] == opSET) { + ;# In case we do CER encoding we order the SET elements by thier tags + my @tags = map { + length($_->[cTAG]) + ? $_->[cTAG] + : $_->[cTYPE] == opCHOICE + ? (sort map { $_->[cTAG] } $_->[cCHILD])[0] + : '' + } @{$op->[cCHILD]}; + @{$op->[cCHILD]} = @{$op->[cCHILD]}[sort { $tags[$a] cmp $tags[$b] } 0..$#tags]; + } } else { ;# A SET of one element can be treated the same as a SEQUENCE |
From: Graham B. <gb...@us...> - 2003-05-06 12:40:36
|
Update of /cvsroot/perl-ldap/asn/lib/Convert/ASN1 In directory sc8-pr-cvs1:/tmp/cvs-serv12187/lib/Convert/ASN1 Modified Files: parser.pm Log Message: CER and DER SET encoding Index: parser.pm =================================================================== RCS file: /cvsroot/perl-ldap/asn/lib/Convert/ASN1/parser.pm,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- parser.pm 19 Aug 2002 23:51:38 -0000 1.9 +++ parser.pm 6 May 2003 12:40:32 -0000 1.10 @@ -706,6 +706,17 @@ ;# Here we need to flatten CHOICEs and check that SET and CHOICE ;# do not contain duplicate tags ;#} + if ($op->[cTYPE] == opSET) { + ;# In case we do CER encoding we order the SET elements by thier tags + my @tags = map { + length($_->[cTAG]) + ? $_->[cTAG] + : $_->[cTYPE] == opCHOICE + ? (sort map { $_->[cTAG] } $_->[cCHILD])[0] + : '' + } @{$op->[cCHILD]}; + @{$op->[cCHILD]} = @{$op->[cCHILD]}[sort { $tags[$a] cmp $tags[$b] } 0..$#tags]; + } } else { ;# A SET of one element can be treated the same as a SEQUENCE |
From: Chris R. <chr...@us...> - 2003-05-06 12:20:30
|
Update of /cvsroot/perl-ldap/ldap In directory sc8-pr-cvs1:/tmp/cvs-serv3807 Modified Files: CREDITS Log Message: Added Ziya Suzen and Damon Brodie Index: CREDITS =================================================================== RCS file: /cvsroot/perl-ldap/ldap/CREDITS,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- CREDITS 22 Feb 2003 18:31:55 -0000 1.3 +++ CREDITS 6 May 2003 12:20:27 -0000 1.4 @@ -20,7 +20,7 @@ Russell Fulton <r.f...@au...> Rusty Biggs <rg...@ti...> Clif Harden <c-h...@ti...> -Chris Ridd <Chr...@me...> +Chris Ridd <chr...@is...> Mark Wilcox <mew...@un...> Robbie Allen <ra...@ci...> Bryan Thale <th...@rs...> @@ -30,3 +30,5 @@ Kartik Subbarao <sub...@co...> Norbert Klasen <nor...@da...> David Faltermier <dav...@hp...> +Ziya Suzen <zi...@ri...> +Damon Brodie <da...@br...> |