/usr/share/dirsrv/updates/20betxn.pl is in 389-ds-base 1.3.7.10-1ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 | use Mozilla::LDAP::Conn;
use Mozilla::LDAP::Utils qw(normalizeDN);
use Mozilla::LDAP::API qw(:constant ldap_url_parse ldap_explode_dn);
sub runinst {
my ($inf, $inst, $dseldif, $conn) = @_;
my @errs;
my $ldapifile;
# Turn on nsslapd-pluginbetxn for
# cn=Multimaster Replication Plugin
# cn=Roles Plugin,cn=plugins,cn=config
# cn=USN,cn=plugins,cn=config
# cn=Retro Changelog Plugin,cn=plugins,cn=config
my @objplugins = (
"cn=Multimaster Replication Plugin,cn=plugins,cn=config",
"cn=Roles Plugin,cn=plugins,cn=config",
"cn=USN,cn=plugins,cn=config",
"cn=Retro Changelog Plugin,cn=plugins,cn=config"
);
foreach my $plugin (@objplugins) {
my $ent = $conn->search($plugin, "base", "(cn=*)");
if (!$ent) {
return ('error_finding_config_entry', $plugin, $conn->getErrorString());
}
$ent->setValues('nsslapd-pluginbetxn', "on");
$conn->update($ent);
}
# Set betxnpreoperation to nsslapd-plugintype for
# cn=7-bit check,cn=plugins,cn=config
# cn=attribute uniqueness,cn=plugins,cn=config
# cn=Auto Membership Plugin,cn=plugins,cn=config
# cn=Linked Attributes,cn=plugins,cn=config
# cn=Managed Entries,cn=plugins,cn=config
# cn=PAM Pass Through Auth,cn=plugins,cn=config
@preplugins = (
"cn=7-bit check,cn=plugins,cn=config",
"cn=attribute uniqueness,cn=plugins,cn=config",
"cn=Auto Membership Plugin,cn=plugins,cn=config",
"cn=Linked Attributes,cn=plugins,cn=config",
"cn=Managed Entries,cn=plugins,cn=config",
"cn=PAM Pass Through Auth,cn=plugins,cn=config"
);
foreach my $plugin (@preplugins) {
my $ent = $conn->search($plugin, "base", "(cn=*)");
if (!$ent) {
return ('error_finding_config_entry', $plugin, $conn->getErrorString());
}
$ent->setValues('nsslapd-pluginType', "betxnpreoperation");
$conn->update($ent);
}
# Set betxnpostoperation to nsslapd-plugintype for
# cn=MemberOf Plugin,cn=plugins,cn=config
# cn=referential integrity postoperation,cn=plugins,cn=config
# cn=State Change Plugin,cn=plugins,cn=config
@postplugins = (
"cn=MemberOf Plugin,cn=plugins,cn=config",
"cn=referential integrity postoperation,cn=plugins,cn=config",
"cn=State Change Plugin,cn=plugins,cn=config"
);
foreach my $plugin (@postplugins) {
my $ent = $conn->search($plugin, "base", "(cn=*)");
if (!$ent) {
return ('error_finding_config_entry', $plugin, $conn->getErrorString());
}
$ent->setValues('nsslapd-pluginType', "betxnpostoperation");
$conn->update($ent);
}
return ();
}
|