tiredofit / docker-fusiondirectory

Dockerized web based LDAP manager
MIT License
48 stars 18 forks source link

LDAP_PORT not set correctly #10

Closed dcendents closed 5 years ago

dcendents commented 5 years ago

As I mentioned in my comment to #9, the LDAP port when using LDAP_TLS=TRUE is not set in the file fusiondirectory.conf.

I tracked down the problem to the init script:

        LDAP_PORT=LDAP${i}_PORT

        if [ "${!LDAP_TLS}" = "TRUE" ] ; then
            LDAP_SCHEME="ldaps"
            LDAP_PORT=636
        fi

        if [ "${!LDAP_PORT}" = "" ] ; then
            LDAP_PORT=389
        fi

Then later on: <referral URI='${LDAP_SCHEME}://${!LDAP_HOST}:${!LDAP_PORT}...

Variable indirection is used: ${!LDAP_PORT}, which is fine when its value is LDAP${i}_PORT, but will not work when the value is explicitely set to 389 or 636.

dcendents commented 5 years ago

As a temporary fix, the following Dockerfile will fix it:

FROM tiredofit/fusiondirectory:1.16

RUN sed -i '417d' /etc/cont-init.d/10-fusiondirectory

Make sure to declare the value for LDAP1_PORT=636.

tiredofit commented 5 years ago

To look into and solve in short order! I will review and see where I've gone wrong here.

tiredofit commented 5 years ago

Thanks again for the find. I've pushed a new tag 1.17 and latest that resolves this issue.

dcendents commented 5 years ago

Hi @tiredofit , I'm sorry to say but version 1.17 does not solve the problem.

I do not see any modifications in the script https://github.com/tiredofit/docker-fusiondirectory/blob/master/install/etc/cont-init.d/10-fusiondirectory. On my side I have the same result, the port number is missing in the file /etc/fusiondirectory/fusiondirectory.conf

tiredofit commented 5 years ago

I've recomitted a new release 1.17.1 - Docker Hub is going berzerk on me right now so might be a day to get a new image built.

tiredofit commented 5 years ago

@dcendents I've just manually pushed one to skip past docker hubs auto builds - tiredofit/fusiondirectory:1.17.1

dcendents commented 5 years ago

Thanks @tiredofit it is working now with tiredofit/fusiondirectory:1.17.1