Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
FSL
conda
installer
Commits
46377cd0
Commit
46377cd0
authored
Oct 11, 2021
by
Paul McCarthy
🚵
Browse files
BF: Bad call to sudo_popen by validate_admin_password function, and wrong attr
name
parent
e2dc7a0b
Changes
1
Hide whitespace changes
Inline
Side-by-side
fslinstaller.py
View file @
46377cd0
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment