Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1959136

Summary: Backtick in password causes failure during deployment of virt-who config.
Product: Red Hat Satellite Reporter: gtaylor
Component: Virt-who Configure PluginAssignee: Marek Hulan <mhulan>
Status: CLOSED ERRATA QA Contact: Kunxin Huang <kuhuang>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.9.0CC: chrobert, mhulan, yanpliu, zhunting
Target Milestone: 6.12.0Keywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-11-16 13:32:29 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description gtaylor 2021-05-10 18:37:29 UTC
Description of problem:
During deployment of a virt-who config, if the password contains a backtick, the script and 'hammer virt-who-config deploy ...' fail.  
The failure is due to using backticks in the code for command substitution and the backtick in the password is conflicting.  


Version-Release number of selected component (if applicable):
virt-who.noarch  0.28.10-1.el7_9

How reproducible:
Always


Steps to Reproduce:
1. Infrastructure > Virt-who Configurations > Create Config
2. Fill out the fields as required.  For the Hypervisor Password field use text with a backtick. e.g. my`password.
3. Click submit
4. Click the Deploy tab to copy the hammer command or the Configuration script. 
5. Run either the hammer command or configuration script.

Actual results:
When using the hammer command:
/tmp/virt_who20210507-1272-1n4wcfx: line 102: unexpected EOF while looking for matching `''
/tmp/virt_who20210507-1272-1n4wcfx: line 108: syntax error: unexpected end of file

When using the script:
./myvirtwho: line 55: unexpected EOF while looking for matching ``'
./myvirtwho: line 108: syntax error: unexpected end of file



Expected results:
== Finished ==
Finished successfully




Additional info:
Workaround. Use the script method instead of the 'hammer virt-who-config deploy ...' method.  In the script: replace the backticks used for command substitution with $(). 
53 #  cr_password=`virt-who-password --password 'virt`who' 2> /dev/null`
54   cr_password=$(virt-who-password --password 'virt`who' 2> /dev/null)

Comment 6 errata-xmlrpc 2022-11-16 13:32:29 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Important: Satellite 6.12 Release), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2022:8506