Skip to content

Commit

Permalink
feat(core: sudo; privilege: isolate_root): improve doas support -2
Browse files Browse the repository at this point in the history
  • Loading branch information
actionless committed Jul 20, 2023
1 parent a9f8758 commit a41e47d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -207,11 +207,7 @@ Comma-separated list of packages names or globs, which upgrade should have addit
Path to pacman executable.

##### PrivilegeEscalationTool (default: sudo)
A tool used to escalate user privileges. If using `doas` then `persistent` option is required in `doas.conf`. For example:
```
permit persist :wheel
```
Currently supported options are `sudo` and `doas`.
A tool used to escalate user privileges. Currently supported options are `sudo` and `doas`.

##### PrivilegeEscalationTarget (default: pikaur)
Choices: pikaur, pacman.
Expand Down
13 changes: 7 additions & 6 deletions pikaur/privilege.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,13 @@ def isolate_root_cmd(
PikaurConfig().misc.PrivilegeEscalationTool.get_str(),
"-u", f"{user_id}",
]
base_root_isolator = [
PikaurConfig().misc.PrivilegeEscalationTool.get_str(),
f"--user=#{user_id}",
"--preserve-env",
"--",
]
else:
base_root_isolator = [
PikaurConfig().misc.PrivilegeEscalationTool.get_str(),
f"--user=#{user_id}",
"--preserve-env",
"--",
]
else:
base_root_isolator = [
"/usr/sbin/systemd-run",
Expand Down

0 comments on commit a41e47d

Please sign in to comment.