This file is indexed.

/usr/include/libcalamares/kdsingleapplicationguard/kdsingleapplicationguard.h is in calamares 3.1.12-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
 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
#ifndef __KDTOOLSCORE_KDSINGLEAPPLICATIONGUARD_H__
#define __KDTOOLSCORE_KDSINGLEAPPLICATIONGUARD_H__

#include <QtCore/QObject>

#ifndef QT_NO_SHAREDMEMORY

#include <QtCore/QStringList>
#include <QtCore/QMetaType>

#include "pimpl_ptr.h"
#include "DllMacro.h"

#include <algorithm>

template <typename T> class QVector;
class QCoreApplication;

class DLLEXPORT KDSingleApplicationGuard : public QObject
{
    Q_OBJECT
    Q_ENUMS( Policy )
    Q_PROPERTY( bool operational READ isOperational )
    Q_PROPERTY( bool exitRequested READ isExitRequested )
    Q_PROPERTY( bool primaryInstance READ isPrimaryInstance NOTIFY becamePrimaryInstance )
    Q_PROPERTY( Policy policy READ policy WRITE setPolicy NOTIFY policyChanged )
public:
    enum Policy
    {
        NoPolicy = 0,
        AutoKillOtherInstances = 1
    };

    explicit KDSingleApplicationGuard( QObject * parent=0 );
    explicit KDSingleApplicationGuard( Policy policy, QObject * parent=0 );
    explicit KDSingleApplicationGuard( const QStringList & arguments, QObject * parent=0 );
    explicit KDSingleApplicationGuard( const QStringList & arguments, Policy policy, QObject * parent=0 );
    ~KDSingleApplicationGuard();

    bool isOperational() const;

    bool isExitRequested() const;

    bool isPrimaryInstance() const;

    Policy policy() const;
    void setPolicy( Policy policy );

    class Instance;

    QVector<Instance> instances() const;

Q_SIGNALS:
    void instanceStarted( const KDSingleApplicationGuard::Instance & instance );
    void instanceExited( const KDSingleApplicationGuard::Instance & instance );
    void exitRequested();
    void raiseRequested();
    void becamePrimaryInstance();
    void becameSecondaryInstance();
    void policyChanged( KDSingleApplicationGuard::Policy policy );

public Q_SLOTS:
    void shutdownOtherInstances();
    void killOtherInstances();

protected:
    /*! \reimp */ bool event( QEvent * event );

private:
#ifndef Q_WS_WIN
    static void SIGINT_handler( int );
#endif

private:
    friend struct ProcessInfo;

    class Private;
    kdtools::pimpl_ptr< Private > d;
};

class DLLEXPORT KDSingleApplicationGuard::Instance {
    friend class ::KDSingleApplicationGuard;
    friend class ::KDSingleApplicationGuard::Private;
    Instance( const QStringList &, bool, qint64 );
public:
    Instance();
    Instance( const Instance & other );
    ~Instance();

    void swap( Instance & other ) {
        std::swap( d, other.d );
    }

    Instance & operator=( Instance other ) {
        swap( other );
        return *this;
    }

    bool isNull() const { return !d; }
    bool isValid() const;

    bool areArgumentsTruncated() const;

    const QStringList & arguments() const;
    qint64 pid() const;

    void shutdown();
    void kill();
    void raise();

private:
    class Private;
    Private * d;
};

namespace std {
    template <>
    inline void swap( KDSingleApplicationGuard::Instance & lhs,
                      KDSingleApplicationGuard::Instance & rhs )
    {
        lhs.swap( rhs );
    }
} // namespace std

QT_BEGIN_NAMESPACE

template <>
inline void qSwap( KDSingleApplicationGuard::Instance & lhs,
                   KDSingleApplicationGuard::Instance & rhs )
{
    lhs.swap( rhs );
}
Q_DECLARE_METATYPE( KDSingleApplicationGuard::Instance )
Q_DECLARE_TYPEINFO( KDSingleApplicationGuard::Instance, Q_MOVABLE_TYPE );

QT_END_NAMESPACE


#endif // QT_NO_SHAREDMEMORY

#endif /* __KDTOOLSCORE_KDSINGLEAPPLICATIONGUARD_H__ */