Merge pull request #10502 from bcoca/checksums_only_sudo
ignore PE methods that are not sudo for checksumspull/4420/head
commit
c576b440c6
|
@ -1243,7 +1243,13 @@ class Runner(object):
|
||||||
python_interp = 'python'
|
python_interp = 'python'
|
||||||
|
|
||||||
cmd = conn.shell.checksum(path, python_interp)
|
cmd = conn.shell.checksum(path, python_interp)
|
||||||
data = self._low_level_exec_command(conn, cmd, tmp, sudoable=True)
|
|
||||||
|
#TODO: remove this horrible hack and find way to get checksum to work with other privilege escalation methods
|
||||||
|
if self.become_method == 'sudo':
|
||||||
|
sudoable = True
|
||||||
|
else:
|
||||||
|
sudoable = False
|
||||||
|
data = self._low_level_exec_command(conn, cmd, tmp, sudoable=sudoable)
|
||||||
data2 = utils.last_non_blank_line(data['stdout'])
|
data2 = utils.last_non_blank_line(data['stdout'])
|
||||||
try:
|
try:
|
||||||
if data2 == '':
|
if data2 == '':
|
||||||
|
|
Loading…
Reference in New Issue