Skip Menu |
 

This queue is for tickets about the Samba-LDAP CPAN distribution.

Report information
The Basics
Id: 33887
Status: resolved
Priority: 0/
Queue: Samba-LDAP

People
Owner: Nobody in particular
Requestors: bureado [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.03
Fixed in: (no value)



Subject: User's DN in User.pm's set_password is incorrectly assumed
Download (untitled) / with headers
text/plain 460b
The set_password method on Samba::LDAP::User builds user's DN based on the uid and the usersdn setting from smbldap.conf, which doesn't work for hierarchical LDAP deployments. Developers should be able _at least_ to specify the object DN in the args hash passed to the method. Please find attached a patch for User.pm which implements this functionality while still retaining the assumption that user are all under $self->{usersdn} Thanks for your time, Jose
Subject: User.pm.patch
Download User.pm.patch
text/x-diff 579b
--- Samba-LDAP-0.03/lib/Samba/LDAP/User.pm 2006-04-07 03:51:05.000000000 -0400 +++ /usr/share/perl5/Samba/LDAP/User.pm 2008-03-07 15:15:57.000000000 -0430 @@ -97,7 +97,12 @@ if ( defined( $args{oldpass} ) eq $args{newpass} ); # Set the $dn - my $dn = "uid=$args{user},$self->{usersdn}"; + my $dn; + if ( defined $args{dn} ) { + $dn = $args{dn}; + } else { + $dn = "uid=$args{user},$self->{usersdn}"; + } if ( $args{user} && $args{oldpass} && $args{newpass} ) { $self->{masterDN} = "uid=$args{user},$self->{usersdn}";
Subject: Re: [rt.cpan.org #33887] User's DN in User.pm's set_password is incorrectly assumed
Date: Fri, 7 Mar 2008 21:16:49 -0000 (GMT)
To: bug-Samba-LDAP [...] rt.cpan.org
From: "Gavin Henry" <ghenry [...] OpenLDAP.org>
Download (untitled) / with headers
text/plain 742b
<quote who="José Miguel Parrella Romero via RT"> Show quoted text
> > The set_password method on Samba::LDAP::User builds user's DN based on > the uid and the usersdn setting from smbldap.conf, which doesn't work > for hierarchical LDAP deployments. > > Developers should be able _at least_ to specify the object DN in the > args hash passed to the method. Please find attached a patch for User.pm > which implements this functionality while still retaining the assumption > that user are all under $self->{usersdn} > > Thanks for your time, > Jose >
Thanks. Fixed and new release uploaded. Gavin. -- Kind Regards, Gavin Henry. OpenLDAP Engineering Team. E ghenry@OpenLDAP.org Community developed LDAP software. http://www.openldap.org/project/


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.