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

pkexec Doesn't Completely Respect Working Directories #205

Open
polkit-github-migration-bot opened this issue Aug 28, 2023 · 0 comments
Open

Comments

@polkit-github-migration-bot
Copy link
Collaborator

In gitlab.freedesktop.org by N3k0-san on Aug 29, 2023, 24:04

Link to the original issue: https://gitlab.freedesktop.org/polkit/polkit/-/issues/204

Current behaviour, description of the problem

pkexec doesn't respect relative commands passed from where the running terminal session is actually ran from

(More on this in the detailed description)

Desired behaviour

pkexec should respect relative parameters given to commands that are elevated by pkexec

Reproducer

# As unprivileged user
cd ~
pkexec mkdir -p testing/polkit

Detailed description

Running pkexec as a substitute for sudo or doas (I personally use doas but I noticed this behavior about pkexec) causes an issue if you use commands using relative contexts.

In the example above, pkexec actually cause polkit to make folders in /root rather than where the command was ran from; this isn't ideal behavior for an authentication program.

Version of polkit: 122

Version of OS: Gentoo (LLVM-OpenRC Profile)

Anything else related to the issue: Associated Gentoo Bug Report

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