LPT: fix grant-lab and add delete account capability
This commit is contained in:
parent
de88e60fa5
commit
cda7b5b026
2 changed files with 98 additions and 16 deletions
|
|
@ -193,9 +193,9 @@ sub get_dn($$@)
|
|||
base => "$dn",
|
||||
filter => Net::LDAP::Filter->new("(objectClass=*)"),
|
||||
attrs => \@_,
|
||||
scope => "sub"
|
||||
scope => "base"
|
||||
);
|
||||
if ($mesg->code != 0) { log(WARN, $mesg->error); return undef; }
|
||||
return undef if ($mesg->code != 0);
|
||||
if ($mesg->count != 1) { log(WARN, "$dn not found or multiple entries match"); return undef; }
|
||||
|
||||
return $mesg->entry(0);
|
||||
|
|
@ -331,7 +331,7 @@ sub search_dn($$@)
|
|||
attrs => [ ],
|
||||
scope => "sub"
|
||||
);
|
||||
croak($mesg->error) if ($mesg->code != 0);
|
||||
return undef if ($mesg->code != 0);
|
||||
croak("$filter not found") if ($mesg->count == 0);
|
||||
croak("$filter not unique") if ($mesg->count > 1);
|
||||
|
||||
|
|
|
|||
Reference in a new issue