service/pam: move pam execution to subprocess to allow killing it

Many pam modules can't be aborted well without this.
This commit is contained in:
outfoxxed 2024-06-18 03:29:25 -07:00
parent b5c8774a79
commit e89035b18c
Signed by untrusted user: outfoxxed
GPG key ID: 4C88A185FB89301E
10 changed files with 480 additions and 173 deletions

View file

@ -51,8 +51,6 @@ class PamContext
public:
explicit PamContext(QObject* parent = nullptr): QObject(parent) {}
~PamContext() override;
Q_DISABLE_COPY_MOVE(PamContext);
void classBegin() override {}
void componentComplete() override;
@ -69,7 +67,7 @@ public:
/// Respond to pam.
///
/// May not be called unless `responseRequired` is true.
Q_INVOKABLE void respond(QString response);
Q_INVOKABLE void respond(const QString& response);
[[nodiscard]] bool isActive() const;
void setActive(bool active);