The account name for a service keytab cannot exceed 20 characters.
The routine that was generating a unique id incorrectly attempted to
perform an LDAP query. This change fixes that problem.
my $this_prefix = substr($this_cn, 0, 20-$suffix_size);
my $this_format = "%0${suffix_size}i";
while ($cnt<$loop_limit) {
- my $this_cn = $this_prefix . sprintf($this_format, $cnt);
- $this_dn = ldap_get_dn($this_base, "cn=$this_cn");
+ $this_cn = $this_prefix . sprintf($this_format, $cnt);
+ $this_dn = $self->ldap_get_dn($this_base, "cn=$this_cn");
if (!$this_dn) {
$this_id = $this_cn;
last;