Fix: keeping root privileges active

This commit is contained in:
Vinicius Moreira
2019-07-01 13:05:55 -03:00
parent 23a0902e49
commit a1e83a5d19

View File

@@ -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,