Bug 1438974

Summary: appliance_console_cli doesn't handle ipa registration if the password has a '$' in it
Product: Red Hat CloudForms Management Engine Reporter: Saif Ali <saali>
Component: ApplianceAssignee: Yuri Rudman <yrudman>
Status: CLOSED CURRENTRELEASE QA Contact: Matt Pusateri <mpusater>
Severity: low Docs Contact:
Priority: medium    
Version: 5.7.0CC: abellott, jhardy, obarenbo, simaishi, yrudman
Target Milestone: GAKeywords: TestOnly, ZStream
Target Release: 5.9.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: appliance:auth:freeipa
Fixed In Version: 5.9.0.1 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1481846 (view as bug list) Environment:
Last Closed: 2018-03-06 15:45:45 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: CFME Core Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1481846    

Description Saif Ali 2017-04-04 23:50:36 UTC
Description of problem:
if you echo "$whatever" it's going to try to expand the variable 'whatever' which I don't believe to be the intent

AwesomeSpawn.run!("/bin/echo \"#{@password}\" | /usr/bin/kinit #{@principal}")

Can the double quotes replace it with single quotes

AwesomeSpawn.run!("/bin/echo \'#{@password}\' | /usr/bin/kinit #{@principal}")

Version-Release number of selected component (if applicable):
4.2

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 4 CFME Bot 2017-08-15 15:58:14 UTC
New commit detected on ManageIQ/manageiq-gems-pending/master:
https://github.com/ManageIQ/manageiq-gems-pending/commit/71b068c825fc421f57c72e2c7415d4c3284a64d6

commit 71b068c825fc421f57c72e2c7415d4c3284a64d6
Author:     Yuri Rudman <yrudman>
AuthorDate: Tue Aug 8 17:07:29 2017 -0400
Commit:     Yuri Rudman <yrudman>
CommitDate: Fri Aug 11 10:44:42 2017 -0400

    having '$' sign inside double quotation for echo argument is interpreted as variable which need to be resolved. Single quotation need to be used to keep '$'.
    
    https://bugzilla.redhat.com/show_bug.cgi?id=1438974

 lib/gems/pending/appliance_console/external_httpd_authentication.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comment 5 CFME Bot 2017-08-15 15:58:19 UTC
New commit detected on ManageIQ/manageiq-gems-pending/master:
https://github.com/ManageIQ/manageiq-gems-pending/commit/782e12a35ec01bfbc69726f3a13d90456c959a3b

commit 782e12a35ec01bfbc69726f3a13d90456c959a3b
Author:     Yuri Rudman <yrudman>
AuthorDate: Wed Aug 9 14:55:50 2017 -0400
Commit:     Yuri Rudman <yrudman>
CommitDate: Fri Aug 11 13:28:28 2017 -0400

    added rspec for ExternalHttpdAuthentication#configure_ipa_http_service
    https://bugzilla.redhat.com/show_bug.cgi?id=1438974

 .../external_httpd_authentication_spec.rb          | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

Comment 7 Matt Pusateri 2017-10-23 19:59:33 UTC
verified on 5.9.0.2