mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-07 00:04:15 +02:00
Fix: keeping root privileges active
This commit is contained in:
@@ -33,7 +33,7 @@ def ask_root_password(locale_keys: dict):
|
|||||||
|
|
||||||
|
|
||||||
def validate_password(password: str) -> bool:
|
def validate_password(password: str) -> bool:
|
||||||
proc = subprocess.Popen('echo {} | sudo -S whoami'.format(password),
|
proc = subprocess.Popen('sudo -k && echo {} | sudo -S whoami'.format(password),
|
||||||
shell=True,
|
shell=True,
|
||||||
stdout=subprocess.PIPE,
|
stdout=subprocess.PIPE,
|
||||||
stderr=subprocess.DEVNULL,
|
stderr=subprocess.DEVNULL,
|
||||||
|
|||||||
Reference in New Issue
Block a user