This file is indexed.

/usr/share/unity8/Components/PassphraseLockscreen.qml is in unity8-common 8.12+16.04.20160401-0ubuntu1.

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
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
/*
 * Copyright (C) 2013,2014,2015 Canonical, Ltd.
 *
 * 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 3.
 *
 * 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, see <http://www.gnu.org/licenses/>.
 */

import QtQuick 2.4
import Ubuntu.Components 1.3
import "../Components"

FocusScope {
    id: root
    y: units.gu(4)
    height: shakeContainer.height
    focus: true

    property string infoText
    property string errorText
    property bool entryEnabled: true
    property color foregroundColor: "#000000"

    readonly property string passphrase: pinentryField.text

    signal entered(string passphrase)
    signal cancel()

    function clear(playAnimation) {
        pinentryField.text = "";
        pinentryField.incorrectOverride = false;
        pinentryField.forceActiveFocus();
        if (playAnimation) {
            wrongPasswordAnimation.start();
        }
    }

    Column {
        id: shakeContainer
        anchors.horizontalCenter: parent.horizontalCenter
        width: parent.width
        spacing: units.gu(2)

        Label {
            id: infoField
            objectName: "infoTextLabel"
            fontSize: "x-large"
            color: root.foregroundColor
            anchors.horizontalCenter: parent.horizontalCenter
            text: root.infoText
        }

        FocusScope {
            id: entryContainer
            anchors { left: parent.left; right: parent.right; margins: units.gu(2) }
            height: units.gu(4)
            focus: true

            TextInput {
                id: pinentryField
                objectName: "pinentryField"
                focus: true

                property bool incorrectOverride: false

                anchors {
                    top: parent.top
                    left: parent.left
                    right: parent.right
                }
                horizontalAlignment: Text.AlignHCenter
                font.pixelSize: FontUtils.sizeToPixels("large")
                echoMode: TextInput.Password
                inputMethodHints: Qt.ImhHiddenText | Qt.ImhSensitiveData |
                                  Qt.ImhNoAutoUppercase | Qt.ImhNoPredictiveText
                color: root.foregroundColor
                cursorDelegate: Item {} // disable cursor
                onCursorPositionChanged: {
                    // And because we don't show the cursor, always position the
                    // cursor at the end of the string (so backspace works like
                    // the user expects, even if they've clicked on us and
                    // thus accidentally moved the cursor)
                    if (cursorPosition !== length) {
                        cursorPosition = length
                    }
                }
                clip: true

                // This is so that we can draw our own dots, for we want
                // complete control over the pixel sizes.  (The ubuntu font
                // has oddly sized password characters that don't scale right)
                opacity: 0

                // simulate being disabled, but without removing OSK focus
                maximumLength: root.entryEnabled ? 32767 : length

                onTextChanged: incorrectOverride = true

                onAccepted: {
                    if (pinentryField.text) {
                        root.entered(pinentryField.text);
                    }
                }
            }

            Row {
                id: dotRow
                anchors.centerIn: entryContainer

                property real dotSize: Math.min(units.gu(2), entryContainer.width / pinentryField.length)
                spacing: Math.min(units.gu(2), Math.max(0, (entryContainer.width / pinentryField.length) - dotSize))

                Repeater {
                    model: pinentryField.length
                    delegate: Rectangle {
                        color: root.foregroundColor
                        width: dotRow.dotSize
                        height: width
                        radius: width / 2
                    }
                }
            }

            Label {
                id: wrongNoticeLabel
                objectName: "wrongNoticeLabel"
                fontSize: "large"
                color: root.foregroundColor
                anchors.horizontalCenter: parent.horizontalCenter
                horizontalAlignment: Text.AlignHCenter
                text: root.errorText
                visible: pinentryField.text.length == 0 && !pinentryField.incorrectOverride
            }
        }
    }

    WrongPasswordAnimation {
        id: wrongPasswordAnimation
        objectName: "wrongPasswordAnimation"
        target: shakeContainer
    }
}