Dear all,
Finally got a first draft on to the CPAN at:
This carries on from Namespace: Samba::LDAP ?, and hasn't had many design changes, just a bit of bare bones conversion from the scripts to OO. I have completed most of the conversion and the docs are thin, as well as the tests, but it's on the right track code design wise (I hope).
I will be setting up a Public LDAP directory that gets wiped every night, at test.samba-ldap.suretecsystems.com. This is where all the tests will get thrown at.
Thing is, I can't install it from any machine via cpan or cpanp, but I think that is due to it being a _01 release.
Anyway, I glad I posted this, as it has been on the go since Jan. But being non-paid work, it gets postponed sometimes ;-)
Gavin.
I stopped reading at this part in [http://search.cpan.org/src/GHENRY/Samba-LDAP-0.01_01/lib/Samba/LDAP.pm|Samba::LDAP]:
if ( $self->{ldapTLS} == 1 ) {
$ldap_master->start_tls(
verify => $self->{verify},
clientcert => $self->{clientcert},
clientkey => $self->{clientkey},
cafile => $self->{cafile},
);
}
$ldap_master->bind( $self->{masterDN}, password => $self->{masterPw}, );
Please, please, please confirm that the requested TLS connection worked before you send a Domain Admin privileged account and password over the connection. The needed code looks like:
$ladp_master->code && die "failed to start TLS: ", $ldap_master->error ;
The same holds true for the _slave function.
Updated: Okay I read some more. I'm twitching about:
if ($homedir) {
my @rmargs = ('-rf');
# print "rm @rmargs $homedir\n";
system( 'rm', @rmargs, $homedir );
}
in [http://search.cpan.org/src/GHENRY/Samba-LDAP-0.01_01/lib/Samba/LDAP/User.pm|Samba::LDAP::User]. So many possible values of $homedir lead to ruin.
In general, there appears to be a lot of shelling out functionality that could be done in pure perl.
Thanks for taking the time to read some of it idsfa.
Like I said, I haven't really touched/cleaned up any of the original code. The above isn't mine, all I have done so far is split everything up into classes and move things to methods.
I saw the above right away too, but in the next release, things like this will be re-written and removed.
Thanks though.
Gavin.
Thing is, I can't install it from any machine via cpan or cpanp, but I think that is due to it being a _01 release.
Correct. You have to tell cpanp? that you know what you are doing, explicitly.
cpan install GHENRY/Samba-LDAP-0.01_01.tar.gz... will work just fine. Thanks for doing this work, I'm very insterested to see what will come of it.
• another intruder with the mooring in the heart of the Perl
Many thanks grinder!
Great to see some positive response.
This is my first proper distro and OO project too. So any advice that "anyone" can give me on the way moving forward, would be "greatly" appreciated!
Gavin.
perlmonks.org content © perlmonks.org and ghenry, grinder, idsfa
prlmnks.org © 2006 edmund von der burg (eccles & toad)
v 0.03