Commit 46377cd0 authored by Paul McCarthy's avatar Paul McCarthy 🚵
Browse files

BF: Bad call to sudo_popen by validate_admin_password function, and wrong attr

name
parent e2dc7a0b
......@@ -445,7 +445,7 @@ class Context(object):
"""Prompt the user for their administrator password."""
def validate_admin_password(password):
proc = Process.sudo_popen(['true'], password)
proc = Process.sudo_popen(['true'], password, stdin=sp.PIPE)
proc.communicate()
return proc.returncode == 0
......@@ -1016,7 +1016,7 @@ class Process(object):
admin = admin and os.getuid() != 0
if admin: password = ctx.password
if admin: password = ctx.admin_password
else: password = None
cmd = shlex.split(cmd)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment