ltb-project / openldap-deb

Debian packages for OpenLDAP
http://ltb-project.org/wiki/documentation/openldap-deb
GNU General Public License v3.0
14 stars 13 forks source link

Package should not set root:root owner recursively #16

Closed davidcoutadeur closed 5 years ago

davidcoutadeur commented 6 years ago

When applying this command:

/bin/chown -R root:root ${LDAPSERVERDIR}

the owner modifications are applied recursively. However, if the directory slapd.d exists in etc/openldap/ and has correct owner root:ldap, it overwrites the owner permissions. We could instead select more precisely the files with:

/bin/chown root:root ${LDAPSERVERDIR}
/bin/chown -R root:root ${LDAPSERVERDIR}/bin
/bin/chown -R root:root ${LDAPSERVERDIR}/etc/openldap/{DB_CONFIG.example,ldap.conf,ldap.conf.default,ppm.conf,schema,slapd.conf,slapd.conf.default,slapd.ldif,slapd.ldif.default}
/bin/chown -R root:root ${LDAPSERVERDIR}/include
/bin/chown -R root:root ${LDAPSERVERDIR}/lib64
/bin/chown -R root:root ${LDAPSERVERDIR}/libexec
/bin/chown -R root:root ${LDAPSERVERDIR}/sbin
/bin/chown -R root:root ${LDAPSERVERDIR}/var
davidcoutadeur commented 6 years ago

Done in 7574606 + 539a43c Some adaptations necessary:

# Globally set owner to root:root
chown root:root ${LDAPSERVERDIR}
chown -R root:root ${LDAPSERVERDIR}/bin
chown -R root:root ${LDAPSERVERDIR}/etc/openldap/{DB_CONFIG.example,ldap.conf,ldap.conf.default,schema,slapd.conf.default,slapd.ldif,slapd.ldif.default}
chown -R root:root ${LDAPSERVERDIR}/include
chown -R root:root ${LDAPSERVERDIR}/lib*
chown -R root:root ${LDAPSERVERDIR}/libexec
chown -R root:root ${LDAPSERVERDIR}/sbin
chown -R root:root ${LDAPSERVERDIR}/var