This file is indexed.

/usr/sbin/migrate-ds-admin is in 389-admin 1.1.35-2.

This file is owned by root:root, with mode 0o755.

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
75
76
77
78
79
80
81
82
83
84
85
86
#!/usr/bin/env perl
# BEGIN COPYRIGHT BLOCK
# This Program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation; version 2 of the License.
# 
# This Program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
# 
# You should have received a copy of the GNU General Public License along with
# this Program; if not, write to the Free Software Foundation, Inc., 59 Temple
# Place, Suite 330, Boston, MA 02111-1307 USA.
# 
# Copyright (C) 2007 Red Hat, Inc.
# All rights reserved.
# END COPYRIGHT BLOCK
#

use lib qw(/usr/lib/x86_64-linux-gnu/dirsrv/perl);

use strict;

use AdminMigration;
use AdminUtil;
use AdminServer;
use Migration;
use Resource;
use DSMigration;
use SetupLog;

my $res = new Resource("/usr/share/dirsrv/properties/migrate-ds-admin.res",
                       "/usr/share/dirsrv/properties/migrate-ds.res",
                       "/usr/share/dirsrv/properties/setup-ds-admin.res",
                       "/usr/share/dirsrv/properties/setup-ds.res");

my $mig = new Migration($res); # parse cmd line etc.

$mig->msg('begin_dsadmin_migration', $mig->{oldsroot});

if (!$mig->{inf}->{General}->{ConfigDirectoryAdminPwd}) {
    $mig->msg('error_configds_adminpwd_required');
    $mig->doExit(1);
}

# first, migrate directory server instances
# either the config ds will be one of them, or we
# should have already migrated the config DS
$mig->msg('begin_ds_migration', $mig->{oldsroot});
if (!migrateDS($mig)) {
    $mig->doExit(1);
}

# next, migrate the admin server - this also registers the directory servers
$mig->msg('begin_as_migration', $mig->{oldsroot});
if (!migrateAdminServer($mig)) {
    $mig->doExit(1);
}

# next, register/update the new directory servers
# in the config ds
$mig->msg('registering_dirserver_instances');
my @errs;
if (!registerManyDSWithConfigDS($mig->{inf}, \@errs,
                                $mig->{configdir},
                                @{$mig->{instances}})) {
    $mig->msg($FATAL, @errs);
    $mig->doExit(1);
}

$mig->msg('end_dsadmin_migration');

$mig->doExit(0);

END {
    if ($mig and $mig->{keep}) {
        $mig->{inf}->write("__temp__");
    }
}

# emacs settings
# Local Variables:
# mode:perl
# indent-tabs-mode: nil
# tab-width: 4
# End: