Bug 1758759 - katello-certs-check must set LC_TIME for $(date) commands
Summary: katello-certs-check must set LC_TIME for $(date) commands
Keywords:
Status: ASSIGNED
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Certificates
Version: 6.5.0
Hardware: x86_64
OS: Linux
unspecified
medium vote
Target Milestone: Unspecified
Assignee: Chris Roberts
QA Contact: Stephen Wadeley
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-10-05 12:29 UTC by Andreas Bleischwitz
Modified: 2020-05-13 01:08 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:
Target Upstream Version:


Attachments (Terms of Use)
Fix for missing LC_TIME environment (998 bytes, patch)
2019-10-05 12:29 UTC, Andreas Bleischwitz
no flags Details | Diff


Links
System ID Priority Status Summary Last Updated
Foreman Issue Tracker 28004 Normal New katello-certs-check should set locales for $(date) commands 2020-06-18 15:02:49 UTC

Description Andreas Bleischwitz 2019-10-05 12:29:41 UTC
Created attachment 1622733 [details]
Fix for missing LC_TIME environment

Description of problem:
When invoking katello-certs-check with LC_TIME set to anything else than "C" or "en_US", the comparison of dates will fail.

Version-Release number of selected component (if applicable):
# rpm -qf /usr/sbin/katello-certs-check 
foreman-installer-katello-3.10.0.8-1.el7sat.noarch


How reproducible:
Always

Steps to Reproduce:
1. export LC_TIME to i.e. "de_DE.utf8"
2. invoke 'katello-certs-check' with valid certs and keys
3.

Actual results:
"""
Checking server certificate encoding: 
[OK]

date: ungültiges Datum „Okt 5 12:08:34 2019“
Checking expiration of certificate: /usr/sbin/katello-certs-check: Zeile 94: [: -gt: Einstelliger (unärer) Operator erwartet.

[OK]

Checking expiration of CA bundle: /usr/sbin/katello-certs-check: Zeile 100: [: -gt: Einstelliger (unärer) Operator erwartet.

[OK]
"""

Expected results:
"""
Checking server certificate encoding: 
[OK]

Checking expiration of certificate: 
[OK]

Checking expiration of CA bundle: 
[OK]
"""

Additional info:


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