Merge pull request #221 from amnezia-vpn/bugfix/check-sudo-for-root

skipping sudo check for root user
This commit is contained in:
pokamest 2023-04-18 11:54:29 +01:00 committed by GitHub
commit 10bca290c3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -669,6 +669,10 @@ ErrorCode ServerController::isServerPortBusy(const ServerCredentials &credential
ErrorCode ServerController::isUserInSudo(const ServerCredentials &credentials, DockerContainer container)
{
if (credentials.userName == "root") {
return ErrorCode::NoError;
}
QString stdOut;
auto cbReadStdOut = [&](const QString &data, libssh::Client &) {
stdOut += data + "\n";