This file is indexed.

/lib/partman/active_partition/20crypto_type/do_option is in ubiquity 18.04.14.

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
#!/bin/sh

. /lib/partman/lib/base.sh
. /lib/partman/lib/crypto-base.sh

dev=$2
id=$3
part=$dev/$id

cd $dev

select_crypto_type () {
	choices=$(
		for dir in /lib/partman/ciphers/*; do
			[ -d $dir ] || continue
			type=${dir##*/}

			db_metaget partman-crypto/crypto_type/$type description
			if [ -z "$RET" ]; then
				desc=$type
			else
				desc="$RET"
			fi
			printf "%s\t%s\n" $type "$desc"
		done
	)

	if [ -z "$choices" ]; then
		return 1
	fi

	template="partman-crypto/crypto_type"
	if ! debconf_select critical $template "$choices" ""; then
		return 1
	fi
	type=$RET

	if [ -f $part/crypto_type ]; then
		if [ "$(cat $part/crypto_type)" = $type ]; then
			# Same type selected, skip prepare_method
			return 0
		fi
	fi

	echo $type > $part/crypto_type
	crypto_prepare_method $part $type || return 1

	return 0
}

[ -f $part/method ] || exit 0
method=$(cat $part/method)

if [ $method = crypto ]; then
	# Load all known crypto types
	crypto_load_udebs partman-crypto-dm

	select_crypto_type || return 1
fi