Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 238719 | Differences between
and this patch

Collapse All | Expand All

(-)/usr/sbin/smbldap-passwd (-2 / +4 lines)
Lines 88-93 Link Here
88
88
89
89
90
my ($dn,$ldap_master);
90
my ($dn,$ldap_master);
91
my $dn_line;
91
# First, connecting to the directory
92
# First, connecting to the directory
92
if ($< != 0) {
93
if ($< != 0) {
93
    # non-root user
94
    # non-root user
Lines 102-108 Link Here
102
	$config{masterDN}="uid=$user,$config{usersdn}";
103
	$config{masterDN}="uid=$user,$config{usersdn}";
103
	$config{masterPw}="$oldpass";
104
	$config{masterPw}="$oldpass";
104
	$ldap_master=connect_ldap_master();
105
	$ldap_master=connect_ldap_master();
105
	$dn=$config{masterDN};
106
        $dn_line=get_user_dn($user);
107
        $dn=get_dn_from_line($dn_line);
106
	if (!is_user_valid($user, $dn, $oldpass)) {
108
	if (!is_user_valid($user, $dn, $oldpass)) {
107
	    print "Authentication failure\n";
109
	    print "Authentication failure\n";
108
	    exit (10);
110
	    exit (10);
Lines 198-204 Link Here
198
if ($< != 0) {
200
if ($< != 0) {
199
    # if we are not root, we close the connection to re-open it as a 
201
    # if we are not root, we close the connection to re-open it as a 
200
    $ldap_master->unbind;
202
    $ldap_master->unbind;
201
    $config{masterDN}="uid=$user,$config{usersdn}";
203
    $config{masterDN}="$dn";
202
    $config{masterPw}="$oldpass";
204
    $config{masterPw}="$oldpass";
203
    $ldap_master=connect_ldap_master();
205
    $ldap_master=connect_ldap_master();
204
}
206
}

Return to bug 238719