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

SUDO_ASKPASS functionality #202

Open
adrelanos opened this issue Oct 11, 2023 · 2 comments
Open

SUDO_ASKPASS functionality #202

adrelanos opened this issue Oct 11, 2023 · 2 comments

Comments

@adrelanos
Copy link

Expected Behavior

Functional SUDO_ASKPASS functionality.

Current Behavior

Broken SUDO_ASKPASS functionality.

Possible Solution
Steps to Reproduce (for bugs)

VISUAL=mousepad SUDO_ASKPASS=/usr/bin/lxqt-sudo sudoedit --askpass /etc/a

Context

What are you trying to accomplish?

Editing files in /etc folder with a graphical text editor. This requires write permissions in that folder. Some sort of root rights will be required. With X11, sudoedit was suitable for this task.

sudoedit copies the file to a temporary location, edits it as a normal user and then overwrites the original using sudo. This way is much more secure as it does not run the editor as root.

If lxqt-sudo supported being used as SUDO_ASKPASS tool, then any text editor could still be used to edit files in /etc with root rights even under Wayland. Even editors that do not support gvfs. (Example: gedit admin:///etc/ld.so.preload)

Running any editor as root is insecure. In native Wayland it is no longer possible to run editors with root rights. (Excluding xwayland.)

@adrelanos
Copy link
Author

On a second thought I just saw that you have https://github.com/lxqt/lxqt-openssh-askpass which has just 1 usability bug for this use case:

@adrelanos
Copy link
Author

On the other hand, lxqt-sudo is nice because it shows the actual command that is about to be executed before executing it with root rights. If would be good if this feature could be kept for the sudoedit use case.

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

1 participant