This file is indexed.

/usr/share/gosa/plugins/admin/fai/migration/class_migrate_faiBaseRDN.inc is in gosa-plugin-fai 2.7.4+reloaded1-1.

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
<?php 
class migrate_faiBaseRDN extends migrateFaiRDN implements propertyMigration
{
    protected $filter = "(&(objectClass=nothing)%s)";

    function checkForIssues()
    {
        $this->found = array();
        $ldap= $this->config->get_ldap_link();
        $ldap->cd($this->config->current['BASE']);

        $initialValue = $this->prefix.$this->property->getValue().$this->suffix;
        $targetValue = $this->prefix.$this->property->getValue(TRUE).$this->suffix;

        if(!empty($initialValue) && !preg_match("/,$/", $initialValue)) $initialValue.=",";
        if(!empty($targetValue) && !preg_match("/,$/", $targetValue)) $targetValue.=",";

        $from = $initialValue.$this->config->current['BASE'];
        $to = $targetValue.$this->config->current['BASE'];

        if($initialValue != $targetValue && $ldap->dn_exists($from)){
            $toParent = preg_replace("/^[^,]*+,/","",$to);
            if(!$ldap->dn_exists($toParent)){
                $this->found['add'][$toParent] = array();
            }
            $this->found['move'][] = array('from'=>$from, 'to'=>$to);
            return(TRUE);
        }
        return(FALSE);
    }

    function _execute()
    {
        $str = "<h3>"._("The storage position for FAI object has changed!")."</h3>";
       # $str.= _("Unfortunately, GOsa can not perform the necessary steps automatically to migrate the FAI objects. You have to do this manually, to keep the System deployment in a usable state!");
        $str .= migrateFaiRDN::execute();
        return($str);
    }

}
?>