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 1774282 - pki-server-nuxwdog template has pid file name with non-breakable space char encoded instead of 0x20 space char
Summary: pki-server-nuxwdog template has pid file name with non-breakable space char e...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: pki-core
Version: 7.7
Hardware: All
OS: Linux
unspecified
high
Target Milestone: rc
: ---
Assignee: Alex Scheel
QA Contact: PKI QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-11-19 23:56 UTC by Marc Sauton
Modified: 2023-03-24 16:06 UTC (History)
6 users (show)

Fixed In Version: pki-core-10.5.17-6.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-03-31 19:54:16 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2020:1078 0 None None None 2020-03-31 19:54:23 UTC

Description Marc Sauton 2019-11-19 23:56:32 UTC
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

Comment 3 Alex Scheel 2019-11-20 15:00:04 UTC
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>

Comment 7 shalini 2020-01-06 07:40:03 UTC
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

Comment 8 shalini 2020-01-09 11:58:59 UTC
[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.

Comment 9 shalini 2020-01-09 11:59:30 UTC
[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.

Comment 14 errata-xmlrpc 2020-03-31 19:54:16 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, 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


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