Subject: | Creating new instance fails due to permissions issues with SASL |
_initialise_admin_user() function croaks when calling doing an ldap modify to change the
manager user (change olcRootDN etc). The initial definitions for this are incorrect:
* _create_olc_database_config():
olcRootDN: gidNumber=$gid+uidNumber=$gid,cn=peercred,cn=external,cn=auth
should be
olcRootDN: gidNumber=$gid+uidNumber=$uid,cn=peercred,cn=external,cn=auth
* _create_olc_database_hdb():
olcSuffix: dc=example,dc=org
olcRootDN: gidNumber=$gid+uidNumber=$gid,cn=peercred,cn=external,cn=auth
should be
olcSuffix: dc=example,dc=com
olcRootDN: gidNumber=$gid+uidNumber=$uid,cn=peercred,cn=external,cn=auth
Also, _initialise_admin_user() is not correctly checking for bind failure:
$mesg = $ldap->bind( undef, 'sasl' => $sasl_client )
or Carp::croak( $mesg->error() );
(it should check $mesg->code).
In any case, it should instead just be set to the required values the first time, and
_initialise_admin_user() never called, as discussed with David Dick.