Debian Codegraph @

README

raw
1 Authen::SASL::XS - XS code to glue Perl SASL to Cyrus SASL
2
3 1. Build Authen::SASL::XS
4
5 First of all you need Authen::SASL installed at least in version 2.06 (with
6 server patch or higher).
7
8 Then run the Makefile.PL:
9
10 If you want to link it with SASL v1 library:
11
12 # perl Makefile.PL LIBS="-lsasl"
13
14 if your SASL library is located in another path:
15
16 # perl Makefile.PL INC=-I/opt/products/sasl/1.5.28/include \
17 ? LIBS="-L/opt/products/sasl/1.5.28/lib -lsasl"
18
19 If you want to link it with SASL v2 library:
20
21 # perl Makefile.PL LIBS="-lsasl2" DEFINE="-DSASL2"
22
23 if your SASL library is located in another path:
24
25 # perl Makefile.PL INC=-I/opt/products/sasl/2.1.15/include \
26 ? LIBS="-L/opt/products/sasl/2.1.15/lib -lsasl2" DEFINE="-DSASL2"
27
28 (Make sure that you set --with-plugin-dir correct when compiling
29 Cyrus SASL or that you point the enviroment variable SASL_PATH to
30 the correct plugin directory before starting make test or your
31 application)
32
33 After successful Makefile creation run
34
35 # make
36 # make test
37 # make install
38
39 (for a successful make test you have to have installed the PLAIN mechanism)
40
41 And everything is installed.
42
43 If you want to test gssapi functionality, copy the gssapiskel.pl to gssapi.t
44 and edit the file correctly. Don't forget the create keytabfiles. Then
45 rerun make test and see what happens.
46
47 2. Use Authen::SASL::XS with GSSAPI for LDAP
48
49 If you are able to use the ldap* tools with GSSAPI and now you want to use Perl
50 for this LDAP work, then you need Authen::SASL::XS 1.00 or later. Please try
51 this script before reporting any bugs or problems:
52
53 #!/usr/bin/perl -w
54 use Net::LDAP;
55 use Authen::SASL;
56
57 my $slavesasl = Authen::SASL->new(mechanism=>'GSSAPI'
58 'user' => " ", # empty callback, so Net::LDAP don't overrides it
59 );
60
61 my $ldap = Net::LDAP->new('server', version=>3, async=>1) || die "$@";
62
63 my $mesg = $ldap->bind("", sasl=>$slavesasl, async=>1);
64
65 $mesg->code && die $mesg->error;
66
67 $mesg = $ldap->search(async=>1,filter=>"(objectClass=*)",base=>"dc=workgroup");
68
69 @entries = $mesg->entries;
70
71 foreach $entry (@entries) {
72 $entry->dump;
73 }
74
75 ##
76 If you discover any problem please report the error message, your SASL version and
77 your LDAP version to me.