Skip to content

Commit

Permalink
fix "Wrong permissions ownership of installed binaries" (references #10
Browse files Browse the repository at this point in the history
…) + migration of slapd.default file
  • Loading branch information
davidcoutadeur committed Apr 3, 2018
1 parent af7cbc9 commit 62dfbd0
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ source $BASEDIR/openldap-ltb.vars

# Change owner
/bin/chown -R ${LDAPUSER}:${LDAPGROUP} "${LDAPSERVERDIR}/${_LIB}"

/bin/chown -R root:${LDAPGROUP} ${LDAPSERVERDIR}/etc/openldap/check_password.conf
chmod 640 ${LDAPSERVERDIR}/etc/openldap/check_password.conf
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ source $BASEDIR/openldap-ltb.vars
/bin/chown -R ${LDAPUSER}:${LDAPGROUP} "${LDAPSERVERDIR}/${_LIB}"
/bin/chmod +x "${LDAPSERVERDIR}/${_LIB}/ppm_test"

/bin/chown -R root:${LDAPGROUP} ${LDAPSERVERDIR}/etc/openldap/ppm.conf
chmod 640 ${LDAPSERVERDIR}/etc/openldap/ppm.conf

# add path to PPM config file if not present
grep -q -E "PPM_CONFIG_FILE" /etc/profile.d/openldap.sh || echo "export PPM_CONFIG_FILE='$PPM_CONF'" >> /etc/profile.d/openldap.sh

Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,11 @@ fi
#grep -q "${LDAPSERVERDIR}" /etc/ld.so.conf || echo "${LDAPSERVERDIR}/${_LIB}" >> /etc/ld.so.conf
#/sbin/ldconfig

# If migrating to new initscript (+cli), migrate default/slapd to cli conf file
if [ -e "/etc/default/slapd" ]; then
mv /etc/default/slapd ${LDAPSERVERDIR}/etc/openldap/slapd-cli.conf
fi


# Create some dirs and change owner
mkdir -p ${LDAPDATADIR}
Expand All @@ -33,6 +38,8 @@ mkdir -p ${LDAPBACKUPDIR}
/bin/chown -R ${LDAPUSER}:${LDAPGROUP} ${LDAPDATADIR}
/bin/chown -R ${LDAPUSER}:${LDAPGROUP} ${LDAPLOGSDIR}
/bin/chown -R ${LDAPUSER}:${LDAPGROUP} ${LDAPSERVERDIR}/var/run
/bin/chown -R root:${LDAPGROUP} ${LDAPSERVERDIR}/etc/openldap/slapd.conf
chmod 640 ${LDAPSERVERDIR}/etc/openldap/slapd.conf


# Automatize init script
Expand Down

0 comments on commit 62dfbd0

Please sign in to comment.