Bug 1288471 - /etc/httpd/alias/libnssckbi.so is a dangling relative symlink when /etc/httpd/alias is itself symlinked to some other directory
/etc/httpd/alias/libnssckbi.so is a dangling relative symlink when /etc/httpd...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: mod_nss (Show other bugs)
7.2
Unspecified Unspecified
unspecified Severity unspecified
: rc
: 7.3
Assigned To: Matthew Harmsen
Kaleem
:
Depends On:
Blocks: 1283777
  Show dependency treegraph
 
Reported: 2015-12-04 05:55 EST by Jan Pazdziora
Modified: 2016-11-03 17:19 EDT (History)
5 users (show)

See Also:
Fixed In Version: mod_nss-1.0.14-1.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-11-03 17:19:45 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jan Pazdziora 2015-12-04 05:55:25 EST
Description of problem:

When /etc/httpd/alias is a symlink to /data/etc/httpd/alias, the relative symlink libnssckbi.so -> ../../..//usr/lib64/libnssckbi.so does not resolve to correct location.

If possible, please use absolute symlink target.

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

mod_nss-1.0.11-6.el7.x86_64

How reproducible:

Deterministic.

Steps to Reproduce:
1. Install FreeIPA in a container where /etc/httpd/alias is a symlink to a directory on a data volume, /data/etc/httpd/alias.
2. ls -la /etc/httpd/alias/libnssckbi.so

Actual results:

Red dangling symlink.

Expected results:

Green non-dangling symlink.

Additional info:

Is that symlink needed at all? The FreeIPA installations in containers seem to be working fine in spite of the dangling symlink so maybe it could be removed altogether?
Comment 1 Rob Crittenden 2015-12-04 16:45:24 EST
These are the root certs and I had problems in the past with NSS finding the shared library on its own which is why I made a symlink.

How/when is the /etc/httpd/alias symlink being created? What does this do to rpm -V?
Comment 2 Jan Pazdziora 2015-12-05 04:05:33 EST
(In reply to Rob Crittenden from comment #1)
> These are the root certs and I had problems in the past with NSS finding the
> shared library on its own which is why I made a symlink.

It was just an idea, that it might not be needed. So the question is -- could it be an absolute one?

> How/when is the /etc/httpd/alias symlink being created? What does this do to
> rpm -V?

It is created when we move the configuration/data of the IPA instance to data volume for containerization:

  https://github.com/adelton/docker-freeipa/blob/master/Dockerfile#L27
Comment 3 Rob Crittenden 2015-12-05 22:21:47 EST
Can't a new link be generated at the same time a link is made for /etc/httpd/alias?
Comment 4 Jan Pazdziora 2015-12-06 05:16:49 EST
(In reply to Rob Crittenden from comment #1)
> These are the root certs and I had problems in the past with NSS finding the
> shared library on its own which is why I made a symlink.

By the way, is there a ticket/bugzilla for those issues? I'd be happy to test the latest versions to see if the problems are still present.
Comment 5 Jan Pazdziora 2015-12-06 05:20:21 EST
(In reply to Rob Crittenden from comment #3)
> Can't a new link be generated at the same time a link is made for
> /etc/httpd/alias?

You mean overwriting the link during the container build time? That certainly could be done but I've specifically tried to minimize changes that go to the containerized installation. My hope was to keep it as close to the "bare metal" setup as possible. Hence bugzillas like this one when I try to make the default installation easier for the containerized setup, while hopefully causing no regressions for the host installs.
Comment 6 Rob Crittenden 2015-12-07 08:43:01 EST
The link is from /etc/httpd/alias to the library. If you're moving /etc/httpd/alias I'm not sure why the link isn't moving as well. But simply re-creating it doesn't seem like it would be a problem and in fact not creating it is a regression.

There is no ticket/bug as I've solved it by symlinking the shared library.
Comment 7 Jan Pazdziora 2015-12-07 09:29:17 EST
(In reply to Rob Crittenden from comment #6)
> The link is from /etc/httpd/alias to the library. If you're moving
> /etc/httpd/alias I'm not sure why the link isn't moving as well.

It is moving.

But if it is moving from /etc/httpd/alias/libnssckbi.so to /data/etc/httpd/alias/libnssckbi.so, then ../../.. not longer point to root (/) but to /data, and there's no /data/usr/lib64 there.
Comment 9 Scott Poore 2016-09-21 10:47:47 EDT
Verified.

Version ::

mod_nss-1.0.14-5.el7.x86_64

Results ::

First confirmed link on rhel7.2

[root@rhel7-0 alias]# ls -l /etc/httpd/alias/libnssckbi.so
lrwxrwxrwx. 1 root root 33 Sep 13 08:09 /etc/httpd/alias/libnssckbi.so -> ../../..//usr/lib64/libnssckbi.so

[root@rhel7-0 alias]# rpm -q mod_nss
mod_nss-1.0.11-6.el7.x86_64


Now verified state in rhel7.3:

[root@vm4 alias]# ls -l /etc/httpd/alias/libnssckbi.so 
lrwxrwxrwx. 1 root root 24 Sep 21 09:36 /etc/httpd/alias/libnssckbi.so -> /usr/lib64/libnssckbi.so

[root@vm4 alias]# rpm -q mod_nss
mod_nss-1.0.14-5.el7.x86_64
Comment 11 errata-xmlrpc 2016-11-03 17:19:45 EDT
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://rhn.redhat.com/errata/RHSA-2016-2602.html

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