[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#52011: pkexec: PATH environment variable
From: |
Hamzeh Nasajpour |
Subject: |
bug#52011: pkexec: PATH environment variable |
Date: |
Sun, 21 Nov 2021 11:33:05 +0330 |
User-agent: |
Cyrus-JMAP/3.5.0-alpha0-1371-g2296cc3491-fm-20211109.003-g2296cc34 |
The `PATH` environment variable is hard-code here:
https://github.com/freedesktop/polkit/blob/master/src/programs/pkexec.c#L882-L886
We don't have any executable in these paths in guix:
```
/usr/sbin:/usr/bin:/sbin:/bin:/root/bin
```
Replicate the issue:
1. Run the `pkexec`
2. Enter your password
3. run `echo $PATH` in the opened terminal
4. You will see this path: `/usr/sbin:/usr/bin:/sbin:/bin:/root/bin`
5. You can't run most of the commands. (`ls`, `passwd`, `chpasswd` and so on.)
Expected Behavior:
Running all of the commands without any error.
Isn't it? Should not we patch the `PATH` environment variable in `pkexec`
source codes? Either way, some applications like `lxqt-admin-user` and
`lxqt-admin-time` has an issue and they can't run the commands via `pkexec`. I
get this error when I want to change user password via `lxqt-admin-user`. It's
using `pkexec` to change password.
```
/run/current-system/profile/bin/lxqt-admin-user-helper: line 7: exec: passwd:
not found
```
--
Hamzeh Nasajpour
PantherX Team
- bug#52011: pkexec: PATH environment variable,
Hamzeh Nasajpour <=