|
QtPass 2.0.0
Developer documentation
|
SSH_AUTH_SOCK discovery and validation for child processes. More...
#include <sshauthsock.h>
Public Types | |
| enum class | OverrideStatus : std::uint8_t { Valid , DoesNotExist , NotReadable , NotUnixDomainSocket } |
| Classify a non-empty SSH_AUTH_SOCK override path supplied by the user. More... | |
Static Public Member Functions | |
| static auto | overrideStatus (const QString &path) -> OverrideStatus |
| Validate an SSH_AUTH_SOCK override path. Caller is expected to skip validation when the input is empty / whitespace-only. | |
| static void | initialise (const QString &override={}) |
| Ensure SSH_AUTH_SOCK is set for child processes. | |
SSH_AUTH_SOCK discovery and validation for child processes.
Extracted from Util. GUI-launched applications don't inherit shell-set environment variables, so users with gpg-agent's SSH support or another external SSH agent see git push/pull fail. See initialise(). Issue #543.
Definition at line 23 of file sshauthsock.h.
|
strong |
Classify a non-empty SSH_AUTH_SOCK override path supplied by the user.
Empty / unset input is handled by the caller (no warning when the field is blank). On Windows the socket check is skipped — ssh-agent uses a named pipe there.
Definition at line 33 of file sshauthsock.h.
|
static |
Ensure SSH_AUTH_SOCK is set for child processes.
GUI-launched applications don't inherit shell-set environment variables (.bashrc/.zshrc/etc.), so users with gpg-agent's SSH support or other external SSH agents see git push/git pull fail when QtPass launches from a desktop launcher rather than a terminal. Issue #543.
Resolution order:
Sets the variable via qputenv so child processes inherit it.
| override | Manual override path from settings (empty → auto-probe). |
Definition at line 110 of file sshauthsock.cpp.
|
static |
Validate an SSH_AUTH_SOCK override path. Caller is expected to skip validation when the input is empty / whitespace-only.
| path | Non-empty candidate path. |
Definition at line 84 of file sshauthsock.cpp.