korcankaraokcu / PINCE

Reverse engineering tool for linux games
Other
2.1k stars 149 forks source link

Use `polkit` rather than `sudo` #177

Open zefr0x opened 1 year ago

zefr0x commented 1 year ago

When looking in some Linux distributions we can see that there are very few packages depending in sudo (nearly all of those optionally depending on it), while most of them especially GUI ones depends on polkit for running things as super user or another user.

In ArchLinux we have 19 packages depending in sudo while 89 depedning in polkit.

https://archlinux.org/packages/core/x86_64/sudo/

https://archlinux.org/packages/extra/x86_64/polkit/

In Gentoo we have 25 packages depending in sudo while 115 depedning in polkit.

https://packages.gentoo.org/packages/app-admin/sudo/reverse-dependencies

https://packages.gentoo.org/packages/sys-auth/polkit/reverse-dependencies


The main reasons are:

  1. We have more control on privileges using polkit than sudo. We can restrict privileges to our needs, while using sudo we will get the privileges for every thing without restrictions.
  2. Inside a desktop environment polkit is integrated to show a GUI prompt to enter your password, while sudo require a terminal to enter your password. (We will have the ability to run PINCE as a normal desktop application)

Examples of applications using polkit:


Related issues:

korcankaraokcu commented 1 year ago

Yeah, polkit was mentioned in the past, it could be a nice addition. I'm not working actively on pince right now but I can try to implement it when I come back. Leaving the issue open for now

authorisation commented 3 months ago

I was having issues with gdb not being to initialize, turns out this was because I do not have sudo installed. Any reason why there is no exception printed for this in the terminal? Took me some fiddling to figure out.

korcankaraokcu commented 3 months ago

Any reason why there is no exception printed for this in the terminal?

All of distros we support use sudo that's why. You also don't need sudo specifically for the AppImage binary, any sudo equivalent that allows you to run a program as root will work. That "use sudo" message at the startup is just a recommendation since that's what most of the distros use

I'm not against the sudo alternatives but I just don't see it as important as the other features or improvements. I usually spend my free time on other issues. So, any PRs are welcome on this issue

Twig6943 commented 6 days ago

Any updates on this? (this is the only program I run through terminal)

brkzlr commented 6 days ago

No updates. If there are any, there would be comments or issue would be closed.

korcankaraokcu commented 6 days ago

@Twig6943 Please stop spamming "Any updates?" to issues unless you have something useful to say, or even better, a proper PR

Twig6943 commented 6 days ago

@Twig6943 Please stop spamming "Any updates?" to issues unless you have something useful to say, or even better, a proper PR

sorry, won't happen again