QtPass 2.0.0
Developer documentation
Loading...
Searching...
No Matches
sshauthsock.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2014 Anne Jan Brouwer
2// SPDX-License-Identifier: GPL-3.0-or-later
8#ifndef SRC_SSHAUTHSOCK_H_
9#define SRC_SSHAUTHSOCK_H_
10
11#include <QString>
12#include <cstdint>
13
23class SshAuthSock {
24public:
33 enum class OverrideStatus : std::uint8_t {
34 Valid,
35 DoesNotExist,
36 NotReadable,
38 NotUnixDomainSocket,
39 };
40
46 static auto overrideStatus(const QString &path) -> OverrideStatus;
47
76 static void initialise(const QString &override = {});
77
78private:
79 SshAuthSock() = default;
80};
81
82#endif // SRC_SSHAUTHSOCK_H_
OverrideStatus
Classify a non-empty SSH_AUTH_SOCK override path supplied by the user.
Definition sshauthsock.h:33
static auto overrideStatus(const QString &path) -> OverrideStatus
Validate an SSH_AUTH_SOCK override path. Caller is expected to skip validation when the input is empt...
static void initialise(const QString &override={})
Ensure SSH_AUTH_SOCK is set for child processes.