Bug 1774282
| Summary: | pki-server-nuxwdog template has pid file name with non-breakable space char encoded instead of 0x20 space char | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Marc Sauton <msauton> |
| Component: | pki-core | Assignee: | Alex Scheel <ascheel> |
| Status: | CLOSED ERRATA | QA Contact: | PKI QE <bugzilla-pkiqe> |
| Severity: | high | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 7.7 | CC: | aakkiang, afarley, ascheel, mharmsen, skhandel, tscherf |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | pki-core-10.5.17-6.el7 | Doc Type: | If docs needed, set a value |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2020-03-31 19:54:16 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: | |||
Checked in:
commit 4f2b8aaf13b488558b7718d7967d42db4d23d172 (HEAD -> DOGTAG_10_5_BRANCH, upstream/DOGTAG_10_5_BRANCH)
Author: Alexander Scheel <ascheel>
Date: Wed Nov 20 09:10:02 2019 -0500
Remove non-breaking space from pki-server-nuxwdog
In pki-server-nuxwdog, we had a non-breaking space at the end of a
quoted string, causing the resulting directory to end with a
non-breaking space.
This results in paths with incorrect names:
/var/log/pki/$INSTANCE/pids /
instead of
/var/log/pki/$INSTANCE/pids/
Resolves: rhbz#1774282
Signed-off-by: Alexander Scheel <ascheel>
I have verified this bug on latest RHEL7.8 below system configuration :
Red Hat Enterprise Linux Server release 7.8 Beta (Maipo)
[root@pki1 ~]# rpm -qa | grep pki
pki-javadoc-10.5.17-6.el7.noarch
pki-tests-CoreOS-dogtag-rpattath-test-rhcs-dec3-2018-1.0.8.20181203142759-0.noarch
pki-base-java-10.5.17-6.el7.noarch
pki-tests-CoreOS-dogtag-rpattath-test-rhcs-dec4-2018-v1-1.0.8.20181204145052-0.noarch
pki-tps-10.5.17-6.el7pki.x86_64
pki-tests-CoreOS-dogtag-rpattath-test-rhcs-dec14-2018-v1-1.0.8.20181214182156-0.noarch
pki-kra-10.5.17-6.el7.noarch
pki-tests-CoreOS-dogtag-aakkiang-test-rhcs-1.0.8.20180816213054-0.noarch
pki-tools-10.5.17-6.el7.x86_64
pki-tks-10.5.17-6.el7pki.noarch
pki-core-debuginfo-10.5.17-6.el7.x86_64
pki-tests-CoreOS-dogtag-PKI_TEST_USER_ID-bbhavsar-1.0.8.RPM.IDENTIFIER-0.noarch
pki-console-10.5.17-1.el7pki.noarch
pki-tests-pki-tests-20150522165149.1561420-0.noarch
pki-tests-CoreOS-dogtag-rpattath-test-rhcs-dec11-2018-v1-1.0.8.20181211232555-0.noarch
pki-symkey-10.5.17-6.el7.x86_64
pki-ca-10.5.17-6.el7.noarch
pki-tests-CoreOS-dogtag-rpattath-test-rhcs-nov28-2018-1.0.8.20181128181140-0.noarch
redhat-pki-console-theme-10.5.17-1.el7pki.noarch
pki-tests-pki-tests-dogtag-20151005152014.66e7821-0.noarch
pki-tests-CoreOS-dogtag-rpattath-test-rhcs-dec3-2018-v3-1.0.8.20181203181615-0.noarch
pki-tests-CoreOS-dogtag-rpattath-test-rhcs-dec3-2018-v2-1.0.8.20181203163629-0.noarch
pki-ocsp-10.5.17-6.el7pki.noarch
pki-tests-CoreOS-dogtag-rpattath-test-rhcs-nov27-2018-1.0.8.20181127155057-0.noarch
pki-base-10.5.17-6.el7.noarch
pki-tests-CoreOS-dogtag-rpattath-test-rhcs-dec12-2018-v2-1.0.8.20181212203959-0.noarch
pki-tests-CoreOS-dogtag-rpattath-test-rhcs-dec6-2018-v1-1.0.8.20181206194628-0.noarch
redhat-pki-server-theme-10.5.17-1.el7pki.noarch
pki-server-10.5.17-6.el7.noarch
pki-tests-CoreOS-dogtag-rpattath-test-rhcs-dec12-2018-v1-1.0.8.20181212192413-0.noarch
redhat-pki-10.5.17-1.el7pki.noarch
Path of pki-server-nuxwdog is this : /usr/sbin/pki-server-nuxwdog
Output of od -t x1a /sbin/pki-server-nuxwdog for line with invalid space character is :
162 u x _ f n a m e nl e c h o sp " T
163 0002420 6d 70 44 69 72 20 24 7b 43 41 54 41 4c 49 4e 41
164 m p D i r sp $ { C A T A L I N A
165 0002440 5f 42 41 53 45 7d 2f 6c 6f 67 73 2f 70 69 64 73
166 _ B A S E } / l o g s / p i d s
167 0002460 22 20 3e 3e 20 24 6e 75 78 5f 66 6e 61 6d 65 0a
168 " sp > > sp $ n u x _ f n a m e nl <<<<<<<<<<<<<<<<<<< !!!! It shows valid space character instead of 0xc2 0xa0
169 0002500 65 63 68 6f 20 22 43 68 69 6c 64 53 65 63 75 72
170 e c h o sp " C h i l d S e c u r
[root@pki1 ~]# systemctl status pki-tomcatd-nuxwdog
● pki-tomcatd-nuxwdog - PKI Tomcat Server topology-02-CA Started by Nuxwdog
Loaded: loaded (/usr/lib/systemd/system/pki-tomcatd-nuxwdog@.service; enabled; vendor preset: disabled)
Active: active (running) since Thu 2020-01-09 06:52:35 EST; 37s ago
Process: 28238 ExecStart=/bin/nuxwdog -f /etc/pki/%i/nuxwdog.conf (code=exited, status=0/SUCCESS)
Process: 28091 ExecStartPre=/usr/bin/pkidaemon start %i (code=exited, status=0/SUCCESS)
Main PID: 28240 (nuxwdog)
CGroup: /system.slice/system-pki\x2dtomcatd\x2dnuxwdog.slice/pki-tomcatd-nuxwdog
├─28240 /bin/nuxwdog -f /etc/pki/topology-02-CA/nuxwdog.conf
└─28241 /usr/lib/jvm/jre-1.8.0-openjdk/bin/java -DRESTEASY_LIB=/usr/share/java/resteasy-base -Djava.library.path=/usr/lib64/nuxwdog-jni -classpath /usr/share/tomcat/bin/bootstrap.jar:/usr/share/tom...
Jan 09 06:51:48 pki1.example.com systemd[1]: Starting PKI Tomcat Server topology-02-CA Started by Nuxwdog...
Jan 09 06:51:48 pki1.example.com pkidaemon[28091]: -----------------------
Jan 09 06:51:48 pki1.example.com pkidaemon[28091]: Banner is not installed
Jan 09 06:51:48 pki1.example.com pkidaemon[28091]: -----------------------
Jan 09 06:51:48 pki1.example.com pkidaemon[28091]: ----------------------
Jan 09 06:51:48 pki1.example.com pkidaemon[28091]: Enabled all subsystems
Jan 09 06:51:48 pki1.example.com pkidaemon[28091]: ----------------------
Jan 09 06:51:48 pki1.example.com pkidaemon[28091]: SUCCESS: Successfully archived '/var/lib/pki/topology-02-CA/conf/ca/archives/CS.cfg.bak.20200109065148'
Jan 09 06:51:48 pki1.example.com pkidaemon[28091]: SUCCESS: Successfully backed up '/var/lib/pki/topology-02-CA/conf/ca/CS.cfg.bak'
Jan 09 06:52:35 pki1.example.com systemd[1]: Started PKI Tomcat Server topology-02-CA Started by Nuxwdog.
[root@pki1 ~]# systemctl status pki-tomcatd-nuxwdog
● pki-tomcatd-nuxwdog - PKI Tomcat Server topology-02-CA Started by Nuxwdog
Loaded: loaded (/usr/lib/systemd/system/pki-tomcatd-nuxwdog@.service; enabled; vendor preset: disabled)
Active: active (running) since Thu 2020-01-09 06:52:35 EST; 37s ago
Process: 28238 ExecStart=/bin/nuxwdog -f /etc/pki/%i/nuxwdog.conf (code=exited, status=0/SUCCESS)
Process: 28091 ExecStartPre=/usr/bin/pkidaemon start %i (code=exited, status=0/SUCCESS)
Main PID: 28240 (nuxwdog)
CGroup: /system.slice/system-pki\x2dtomcatd\x2dnuxwdog.slice/pki-tomcatd-nuxwdog
├─28240 /bin/nuxwdog -f /etc/pki/topology-02-CA/nuxwdog.conf
└─28241 /usr/lib/jvm/jre-1.8.0-openjdk/bin/java -DRESTEASY_LIB=/usr/share/java/resteasy-base -Djava.library.path=/usr/lib64/nuxwdog-jni -classpath /usr/share/tomcat/bin/bootstrap.jar:/usr/share/tom...
Jan 09 06:51:48 pki1.example.com systemd[1]: Starting PKI Tomcat Server topology-02-CA Started by Nuxwdog...
Jan 09 06:51:48 pki1.example.com pkidaemon[28091]: -----------------------
Jan 09 06:51:48 pki1.example.com pkidaemon[28091]: Banner is not installed
Jan 09 06:51:48 pki1.example.com pkidaemon[28091]: -----------------------
Jan 09 06:51:48 pki1.example.com pkidaemon[28091]: ----------------------
Jan 09 06:51:48 pki1.example.com pkidaemon[28091]: Enabled all subsystems
Jan 09 06:51:48 pki1.example.com pkidaemon[28091]: ----------------------
Jan 09 06:51:48 pki1.example.com pkidaemon[28091]: SUCCESS: Successfully archived '/var/lib/pki/topology-02-CA/conf/ca/archives/CS.cfg.bak.20200109065148'
Jan 09 06:51:48 pki1.example.com pkidaemon[28091]: SUCCESS: Successfully backed up '/var/lib/pki/topology-02-CA/conf/ca/CS.cfg.bak'
Jan 09 06:52:35 pki1.example.com systemd[1]: Started PKI Tomcat Server topology-02-CA Started by Nuxwdog.
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, 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/RHBA-2020:1078 |
Description of problem: the file ./base/server/sbin/pki-server-nuxwdog has a non "breakable space" character instead of a space char in the pid file name, confusing the status commands. it is just before the append ( >> ) , and not a space character, coded as 0xc2 0xa0 , non visible here: echo "TmpDir ${CATALINA_BASE}/logs/pids" >> $FNAME but visible with an od command, or after installation, resulting in incorrect pid file names: /var/log/pki/subca1/pids / instead of /var/log/pki/subca1/pids/ and as a side effect, confusing any status command relying on the pid file, when nuxwdog is in use (like with common criteria) Version-Release number of selected component (if applicable): RHEL-7.7 How reproducible: always Steps to Reproduce: 1. cd pki-core-10.5.9 2. od -t x1a ./base/server/sbin/pki-server-nuxwdog | less 3. Actual results: ... 0002360 66 6e 61 6d 65 0a 65 63 68 6f 20 22 54 6d 70 44 f n a m e nl e c h o sp " T m p D 0002400 69 72 20 24 7b 43 41 54 41 4c 49 4e 41 5f 42 41 i r sp $ { C A T A L I N A _ B A 0002420 53 45 7d 2f 6c 6f 67 73 2f 70 69 64 73 22 c2 a0 <<<<<<<<<<< !!!!!!!!!!! S E } / l o g s / p i d s " B sp 0002440 3e 3e 20 24 6e 75 78 5f 66 6e 61 6d 65 0a 65 63 > > sp $ n u x _ f n a m e nl e c ... Expected results: Additional info: this is an old bug back from the RHCS-8 days and before. see RH bz 878666