Bug 811053 - Stop using "shell=True" when invoking the subprocess module
Stop using "shell=True" when invoking the subprocess module
Product: PulpDist
Classification: Community
Component: Pulp Plugins (Show other bugs)
Unspecified Unspecified
urgent Severity urgent
: 0.1.0
: ---
Assigned To: Nick Coghlan
Depends On:
  Show dependency treegraph
Reported: 2012-04-09 20:58 EDT by Nick Coghlan
Modified: 2012-04-10 02:12 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-04-10 02:12:33 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Nick Coghlan 2012-04-09 20:58:08 EDT
To eliminate some early compatibility problems with the rsync invocation, the current subprocess invocation code relies on the system shell to parse the created rsync command line.

The test suite is now sufficiently comprehensive that this workaround should be eliminated - it was an acceptable quick fix to avoid stalling development, but needs to be eliminated before the code can be considered ready for deployment.
Comment 1 Nick Coghlan 2012-04-10 02:12:33 EDT
Fixed for 0.0.11

It turned out some arguments were already being manually quoted, which were then getting quoted *again* by the subprocess module when using "shell=False". This then confused rsync, which refused to run due to unrecognised filtering commands. Removing the manual quoting and relying entirely on the automatic quoting appears to have resolved the problem.

Note You need to log in before you can comment on or make changes to this bug.