Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lack of compatibilitiy with doas / weird authority verification #4

Open
Imeguras opened this issue Dec 26, 2024 · 5 comments
Open

Lack of compatibilitiy with doas / weird authority verification #4

Imeguras opened this issue Dec 26, 2024 · 5 comments

Comments

@Imeguras
Copy link

Apparently the program is using SUDO_UID to check if the user has superuser capabilities("This program requires admin rights to work properly."), I'm unsure how doas does it, but some behaviors differ from sudo.

Doing SUDO_UID=0 tparted bypasses the protections, later giving an exception to lack of permissions

@Kagamma
Copy link
Owner

Kagamma commented Dec 30, 2024

It's my first time seeing doas command. A quick test with PR #5 shows that it fixed the issue. I will make a new release soon.

@Kagamma Kagamma closed this as completed Dec 30, 2024
@Kagamma
Copy link
Owner

Kagamma commented Dec 30, 2024

I am reopening this issue because at least on my system (Arch Linux), trying to run the app with doas on a virtual terminal without X session (Alt-Ctrl-F3, for example) results in Access Violation & error code 217. It runs fine on a terminal within X session.
sudo is fine in both cases.

Edit: Further investigation shows that the exception occurs during the initialization of Free Vision framework, so this is beyond me at the moment. Maybe I should file a bug report to the Free Pascal team so they can take a look at it.

@Kagamma Kagamma reopened this Dec 30, 2024
@Kagamma
Copy link
Owner

Kagamma commented Dec 30, 2024

New bug report to the FPC team: https://gitlab.com/freepascal.org/fpc/source/-/issues/41080

@Imeguras
Copy link
Author

Alright thank you! I also use arch, i've noticed other issues but since im not able to completely root out the cause and you seem to be developing the project alone i will atempt to investigate the code and post about the root cause of the issue

@Imeguras
Copy link
Author

Also i forgot to mention @Kagamma but i managed to make it work on my system in a weird contorted way
Just for some context and documentation:

my machine is a IBM x3850 x6 running with two compute books removed, 128Gb DDR4 ECC, I believe the graphic IC is soldered directly on the standard io-book(which is kinda of an extension of the motherboard, again im unshure if its there or if its integrated or even hidden on the PCB of the "motherboard" if you can even call it that) a arch linux instance installed on bare metal, with 6.12.6-arch1-1 kernel. Im running extra/opendoas 6.8.2-3, the config is not exotic. I also have aur/doas-sudo-shim 0.1.1-3 as im mostly used to sudo, and running it all on zsh, with oh-my-zsh installed. im also using ssh to acess the machine even though its on a local network

The way i made it "work" was by doing doas su, (which results in me going to bash i believe?) as root and then i do SUDO_UID=0 tparted and it just werks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants