This file is indexed.

/usr/share/debconf/fix_db.pl is in debconf 1.5.42ubuntu1.

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
#!/usr/bin/perl -w
# This file was preprocessed, do not edit!
use strict;
use Debconf::Db;
use Debconf::Log q{warn};

Debconf::Db->load;

if (! @ARGV || $ARGV[0] ne 'end') {
	my $fix=0;
	my $ok;
	my $counter=0;
	do {
		$ok=1;
	
		my %templates=();
		my $ti=$Debconf::Db::templates->iterator;
		while (my $t=$ti->iterate) {
			$templates{$t}=Debconf::Template->get($t);
		}
	
		my %questions=();
		my $qi=Debconf::Question->iterator;
		while (my $q=$qi->iterate) {
			if (! defined $q->template) {
				warn "question \"".$q->name."\" has no template field; removing it.";
				$q->addowner("killme",""); # make sure it has one owner at least, so removal is triggered
				foreach my $owner (split(/, /, $q->owners)) {
					$q->removeowner($owner);
				}
				$ok=0;
				$fix=1;
			}
			elsif (! exists $templates{$q->template->template}) {
				warn "question \"".$q->name."\" uses nonexistant template ".$q->template->template."; removing it.";
				foreach my $owner (split(/, /, $q->owners)) {
					$q->removeowner($owner);
				}
				$ok=0;
				$fix=1;
			}
			else {
				$questions{$q->name}=$q;
			}
		}
		
		foreach my $t (keys %templates) {
			my @owners=$Debconf::Db::templates->owners($t);
			if (! @owners) {
				warn "template \"$t\" has no owners; removing it.";
				$Debconf::Db::templates->addowner($t, "killme","");
				$Debconf::Db::templates->removeowner($t, "killme");
				$fix=1;
			}
			foreach my $q (@owners) {
				if (! exists $questions{$q}) {
					warn "template \"$t\" claims to be used by nonexistant question \"$q\"; removing that.";
					$Debconf::Db::templates->removeowner($t, $q);
					$ok=0;
					$fix=1;
				}
			}
		}
		$counter++;
	} until ($ok || $counter > 20);

	if ($fix) {
		Debconf::Db->save;
		exec($0, "end");
		die "exec of self failed";
	}
}

foreach my $templatefile (glob("/var/lib/dpkg/info/*.templates")) {
	my ($package) = $templatefile =~ m:/var/lib/dpkg/info/(.*?).templates:;
        Debconf::Template->load($templatefile, $package);
}

Debconf::Db->save;