parent
742e7417d4
commit
ea713a3169
|
@ -66,11 +66,11 @@ sub authenticate {
|
|||
my ( $self, $req ) = @_;
|
||||
my $res = $self->SUPER::authenticate($req);
|
||||
|
||||
my $pls = $self->ldap->getLdapValue( $req->data->{entry}, 'pwdLastSet' );
|
||||
my $computed = $self->ldap->getLdapValue( $req->data->{entry},
|
||||
my $pls = $self->ldap->getLdapValue( $req->data->{ldapentry}, 'pwdLastSet' );
|
||||
my $computed = $self->ldap->getLdapValue( $req->data->{ldapentry},
|
||||
'msDS-User-Account-Control-Computed' );
|
||||
my $_adUac =
|
||||
$self->ldap->getLdapValue( $req->data->{entry}, 'userAccountControl' )
|
||||
$self->ldap->getLdapValue( $req->data->{ldapentry}, 'userAccountControl' )
|
||||
|| 0;
|
||||
|
||||
unless ( $res == PE_OK ) {
|
||||
|
|
|
@ -134,12 +134,12 @@ sub getUser {
|
|||
eval { $self->p->_authentication->setSecurity($req) };
|
||||
return PE_BADCREDENTIALS;
|
||||
}
|
||||
unless ( $req->data->{entry} = $mesg->entry(0) ) {
|
||||
unless ( $req->data->{ldapentry} = $mesg->entry(0) ) {
|
||||
$self->userLogger->warn("$req->{user} was not found in LDAP directory");
|
||||
eval { $self->p->_authentication->setSecurity($req) };
|
||||
return PE_BADCREDENTIALS;
|
||||
}
|
||||
$req->data->{dn} = $req->data->{entry}->dn();
|
||||
$req->data->{dn} = $req->data->{ldapentry}->dn();
|
||||
PE_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ sub getUser {
|
|||
eval { $self->p->_authentication->setSecurity($req) };
|
||||
return PE_ERROR;
|
||||
}
|
||||
unless ( $req->data->{entry} = $sth->fetchrow_hashref() ) {
|
||||
unless ( $req->data->{dbientry} = $sth->fetchrow_hashref() ) {
|
||||
$self->userLogger->warn("User $user not found");
|
||||
eval { $self->p->_authentication->setSecurity($req) };
|
||||
return PE_BADCREDENTIALS;
|
||||
|
@ -54,8 +54,8 @@ sub setSessionInfo {
|
|||
|
||||
foreach my $var ( keys %{ $self->exportedVars } ) {
|
||||
my $attr = $self->exportedVars->{$var};
|
||||
$req->{sessionInfo}->{$var} = $req->data->{entry}->{$attr}
|
||||
if ( defined $req->data->{entry}->{$attr} );
|
||||
$req->{sessionInfo}->{$var} = $req->data->{dbientry}->{$attr}
|
||||
if ( defined $req->data->{dbientry}->{$attr} );
|
||||
}
|
||||
PE_OK;
|
||||
}
|
||||
|
|
|
@ -40,7 +40,7 @@ sub setSessionInfo {
|
|||
%{ $self->conf->{ldapExportedVars} } );
|
||||
while ( my ( $k, $v ) = each %vars ) {
|
||||
$req->sessionInfo->{$k} =
|
||||
$self->ldap->getLdapValue( $req->data->{entry}, $v ) || "";
|
||||
$self->ldap->getLdapValue( $req->data->{ldapentry}, $v ) || "";
|
||||
}
|
||||
|
||||
PE_OK;
|
||||
|
@ -56,7 +56,7 @@ sub setGroups {
|
|||
if ( $self->conf->{ldapGroupBase} ) {
|
||||
|
||||
# Get value for group search
|
||||
my $group_value = $self->ldap->getLdapValue( $req->data->{entry},
|
||||
my $group_value = $self->ldap->getLdapValue( $req->data->{ldapentry},
|
||||
$self->conf->{ldapGroupAttributeNameUser} );
|
||||
|
||||
if ( $self->conf->{ldapGroupDecodeSearchedValue} ) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user