RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 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 "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". 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 "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-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 1187442 - subscription-manager some "--config" option can use all kinds of characters when it should be a "number"
Summary: subscription-manager some "--config" option can use all kinds of characters w...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: subscription-manager
Version: 7.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: candlepin-bugs
QA Contact: John Sefler
URL:
Whiteboard:
Depends On:
Blocks: rhsm-rhel72
TreeView+ depends on / blocked
 
Reported: 2015-01-30 03:32 UTC by xingge
Modified: 2016-09-20 02:28 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-04-29 17:03:11 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description xingge 2015-01-30 03:32:55 UTC
Description of problem:
subscription-manager some "--config" option can use all kinds of characters when it should be a "number"

Version-Release number of selected component (if applicable):
subscription-manager-firstboot-1.13.19-1.el7.x86_64
subscription-manager-1.13.19-1.el7.x86_64
subscription-manager-gui-1.13.19-1.el7.x86_64
python-rhsm-1.13.10-1.el7.x86_64

How reproducible:
always

Steps to Reproduce:
1.run subscription-manager config --server.port=PORT
2.run subscription-manager config --rhsmcertd.autoattachinterval=PORT 

Actual results:
No errors report and when run "subscription-manager --config" I get output below
[server]
   hostname = subscription.rhn.stage.redhat.com
   insecure = [0]
   port = PORT      <==================should ONLY be a number
   prefix = [/subscription]
   proxy_hostname = []
   proxy_password = []
   proxy_port = []
   proxy_user = []
   ssl_verify_depth = [3]

[rhsm]
   baseurl = [https://cdn.redhat.com]
   ca_cert_dir = [/etc/rhsm/ca/]
   consumercertdir = [/etc/pki/consumer]
   entitlementcertdir = [/etc/pki/entitlement]
   full_refresh_on_yum = [0]
   manage_repos = [1]
   pluginconfdir = [/etc/rhsm/pluginconf.d]
   plugindir = [/usr/share/rhsm-plugins]
   productcertdir = [/etc/pki/product]
   repo_ca_cert = [/etc/rhsm/ca/redhat-uep.pem]
   report_package_profile = [1]

[rhsmcertd]
   autoattachinterval = PORT  <===========should ONLY be a number
   certcheckinterval = [240]

[] - Default value in use


Expected results:
when run 
subscription-manager config --server.port=PORT
there should be a error report like
"port must be 0-65535."
when run 
subscription-manager config --rhsmcertd.autoattachinterval=PORT
the error report should be
"Must enter a number"

Additional info:
I find that if you set some option that require "numbers" to a character the subscription-manager will use the default value of the option, that's good but I think we should not let the customer set a wrong option value.

Comment 1 Adrian Likins 2015-04-29 17:03:11 UTC
I devel nack'ed this.

The config values are mostly untyped, with server port being the exception.

I don't think the complexity is worthwhile to solve this generally. We
could probably special case the port values at some point, but unlikely
for 7.2.


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