amnezia-client/client/core
lunardunno b3ff120bcf
Checking server user permissions to use sudo (#1442)
* Username if whoami returns an error

Сommand to use home directory name if whoami returns error or is missing for prepare_host.sh.

* Update check_user_in_sudo.sh

Сommand to use home directory name if whoami returns error or is missing for check_user_in_sudo.sh.
Checking server user permissions to use sudo using a package manager or using uname.
Сhecking and redefining the system language.
Checking requirements for sudo users or root in script.

* Cases have been changed and added.

Changed description of the “Server User Not In Sudo” case.
Corrected the name and description of the "ServerPacketManagerError" case. Packet to Package.
Adding a "SudoPackageIsNotPreinstalled" case.
Adding a "ServerUserNotAllowedInSudoers" case.
Adding a "ServerUserPasswordRequired" case.

* Serves errors have been changed and added.

Corrected the name of the "ServerPacketManagerError" error to "ServerPackageManagerError".
Adding a "SudoPackageIsNotPreinstalled" error.
Adding a "ServerUserNotAllowedInSudoers" error.
Adding a "ServerUserPasswordRequired" error.

* Return ServerPacketManagerError

Return to the name "ServerPacketManagerError".

* Added errors handling 

Added new errors' handling to serverController.cpp.
Permission checks are also performed for the root user.

* Update translations

Updating translations for two existing server errors.

* Myanmar translation update

* Update for my_MM.ts

* checking for not allowed

Checking for "not allowed" in stdOut

* Removed "not allowed"

Removed check for "not allowed" in stdOut

* Removed nested launch

Removed nested launch via sudo

* Returned nested launch

Returned nested launch via sudo

* All checks with sudo

Both checks with sudo always run.

* Moved removing timestamp sudo

Removing the sudo timestamp is done every time.

* Checking the user directory

Checking the accessibility of the user's home directory

* Polishing

Изменение порядка обработки ошибок.

* changing detection order 

change the order of detection of inconsistencies:
1. sudo not preinstalled. (if user != root)
2. user not in sudo or wheel group. (if user != root)
3. user's directory is not accessible. (for all)
4. user not allowed in sudoers. (for all)
5. user password required. (for all)

* Packet to Package

* chore: bump version (#1463)

* fix for sh (#1462)

Fix for servers where sh is used as default shell.

* Username if whoami returns an error

Сommand to use home directory name if whoami returns error or is missing for prepare_host.sh.

* Update check_user_in_sudo.sh

Сommand to use home directory name if whoami returns error or is missing for check_user_in_sudo.sh.
Checking server user permissions to use sudo using a package manager or using uname.
Сhecking and redefining the system language.
Checking requirements for sudo users or root in script.

* Cases have been changed and added.

Changed description of the “Server User Not In Sudo” case.
Corrected the name and description of the "ServerPacketManagerError" case. Packet to Package.
Adding a "SudoPackageIsNotPreinstalled" case.
Adding a "ServerUserNotAllowedInSudoers" case.
Adding a "ServerUserPasswordRequired" case.

* Serves errors have been changed and added.

Corrected the name of the "ServerPacketManagerError" error to "ServerPackageManagerError".
Adding a "SudoPackageIsNotPreinstalled" error.
Adding a "ServerUserNotAllowedInSudoers" error.
Adding a "ServerUserPasswordRequired" error.

* Return ServerPacketManagerError

Return to the name "ServerPacketManagerError".

* Update translations

Updating translations for two existing server errors.

* Added errors handling 

Added new errors' handling to serverController.cpp.
Permission checks are also performed for the root user.

* Myanmar translation update

* Update for my_MM.ts

* checking for not allowed

Checking for "not allowed" in stdOut

* Removed "not allowed"

Removed check for "not allowed" in stdOut

* Removed nested launch

Removed nested launch via sudo

* Returned nested launch

Returned nested launch via sudo

* All checks with sudo

Both checks with sudo always run.

* Moved removing timestamp sudo

Removing the sudo timestamp is done every time.

* Checking the user directory

Checking the accessibility of the user's home directory

* Polishing

Изменение порядка обработки ошибок.

* changing detection order 

change the order of detection of inconsistencies:
1. sudo not preinstalled. (if user != root)
2. user not in sudo or wheel group. (if user != root)
3. user's directory is not accessible. (for all)
4. user not allowed in sudoers. (for all)
5. user password required. (for all)

* Undoing unintended changes

Undoing unintended changes.

* Undoing unintended change

Undoing unintended change.

* not allowed to use sudo

The user is not allowed to use sudo on this server.

* Capital letters in the error

Capital letters in the error description.

---------

Co-authored-by: albexk <albexk@proton.me>
2025-03-14 20:39:58 +07:00
..
api chore: added 404 handling for revoke configs 2025-02-23 14:26:04 +07:00
controllers Checking server user permissions to use sudo (#1442) 2025-03-14 20:39:58 +07:00
serialization fix: adding second new VMess links now works (#1325) 2024-12-30 12:45:26 +07:00
defs.h Checking server user permissions to use sudo (#1442) 2025-03-14 20:39:58 +07:00
errorstrings.cpp Checking server user permissions to use sudo (#1442) 2025-03-14 20:39:58 +07:00
errorstrings.h Config export 2021-05-10 02:33:31 +03:00
installedAppsImageProvider.cpp feature/app-split-tunneling (#702) 2024-04-01 12:45:00 +01:00
installedAppsImageProvider.h feature/app-split-tunneling (#702) 2024-04-01 12:45:00 +01:00
ipcclient.cpp change node to IpcProcessTun2SocksReplica 2025-02-21 09:31:10 +02:00
ipcclient.h Some XRay improvements (#1075) 2024-09-20 12:12:22 +01:00
networkUtilities.cpp feature: added 409 error handling from server response 2025-02-15 13:58:48 +07:00
networkUtilities.h feature: added 409 error handling from server response 2025-02-15 13:58:48 +07:00
privileged_process.cpp Android manifest fix, IPC refactoring 2022-02-22 02:08:57 +03:00
privileged_process.h Android manifest fix, IPC refactoring 2022-02-22 02:08:57 +03:00
qrCodeUtils.cpp chore: fixed android build 2025-02-15 15:29:53 +07:00
qrCodeUtils.h chore: fixed android build 2025-02-15 15:29:53 +07:00
scripts_registry.cpp added ui for proxy container (#762) 2024-06-10 12:35:24 +01:00
scripts_registry.h Xray with Reality protocol (#494) 2024-03-27 11:02:34 +00:00
server_defs.cpp Various types containers support 2021-09-20 21:51:28 +03:00
server_defs.h NewServerSettings qml rework 2021-09-09 20:15:44 +03:00
sshclient.cpp ssh client now reuses an existing session instead of opening a new one 2024-04-12 20:00:21 +05:00
sshclient.h Replace sftp with scp (#602) 2024-03-06 01:24:28 +00:00