Skip Menu |

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

Report information
The Basics
Id: 33886
Status: rejected
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)



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
--- 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}";