Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#25214 - Last update broke openldap
Attached to Project:
Arch Linux
Opened by Julien Dessaux (adyxax) - Friday, 22 July 2011, 08:07 GMT
Last edited by Eric Belanger (Snowman) - Monday, 25 July 2011, 20:59 GMT
Opened by Julien Dessaux (adyxax) - Friday, 22 July 2011, 08:07 GMT
Last edited by Eric Belanger (Snowman) - Monday, 25 July 2011, 20:59 GMT
|
DetailsDescription:
The maintainer of the openldap package just issued an update. The problem is that command line arguments got hardcoded in /etc/rc.d/slapd, while those should have been in /etc/conf.d/slapd where they belong. This broke my installations and it will probably break others. Additional info: * package version(s) : 2.4.26-2 Steps to reproduce: * Have a working ldap server with the openldap package in version 2.4.24-2 or below. * Upgrade to 2.4.26-2. * Try to restart slapd and here you are. Suggestion to fix, the problem: * remove "-u ldap -g ldap" from lines 14 and 16 in /etc/rc.d/slapd * add "-u ldap -g ldap" in the SLAPD_OPTIONS field in /etc/conf.d/slapd |
This task depends upon
Closed by Eric Belanger (Snowman)
Monday, 25 July 2011, 20:59 GMT
Reason for closing: Not a bug
Additional comments about closing: user was running server as an openldap user
Monday, 25 July 2011, 20:59 GMT
Reason for closing: Not a bug
Additional comments about closing: user was running server as an openldap user
chown -R root:ldap /etc/openldap/schema
does it works afterwards with the "-u ldap -g ldap" options?
My openldap was already configured to drop its permission to an non-root user. Since it wasn't done by default I named this user openldap and configured it via the SLAPD_OPTIONS field in /etc/conf.d/slapd, which seemed like the right place to do it. If the updated package was taking advantage of this, pacman would nicely create a /etc/conf.d/slapd.pacnew file and as an admin I would be happily enjoying this great improvement of the default configuration.
In fact in my case there was another problem since the upgrade process did a chown of /var/lib/openldap/openldap-data. I didn't thought of that before, thank you for mentionning permissions. I would rather have pacman print some upgrade instructions instead of wildly messing with a working setup.
Here is what I got as an error message right after the upgrade :
[root@midgard /etc/conf.d] 3514 # /etc/rc.d/slapd restart
:: Stopping OpenLDAP [DONE]
:: Starting OpenLDAP [BUSY]
/etc/rc.d/slapd: line 9: 7760 Segmentation fault /usr/sbin/slapd -u ldap -g ldap -h "$SLAPD_SERVICES" $SLAPD_OPTIONS
[FAIL]
Anyway, thank you again for your help.
I added the "-u ldap -g ldap" to the daemon instead of the config file because they are not really options. The new packages is meant to be run as the ldap user and ldap group (all the files permissions are set accordingly). It's not something users can change like the other options, at least whithout messing with file permissions.
As for this bug report, I'm inclined to simply close it. I'll leave it open for a week or so in case there is something you or other users want to add. And it'll be easier to find for users who have similar problems. I would recommend to change your system to use the ldap user created by the package instead of your openldap user. It'll save you from permissions problems on future updates.
But as your explaination I must call it bullshit, I'm sorry. I was in no way using anything you could even remotely call a "custom package" since I just changed a configuration option!
The default "run as root" was a real problem. I agree with you and it is really better now you changed that - and I thank you for that. But what was I supposed to do before? File a bug report to change a default setting that annoy me? No I wouldn't think about doing that! Even though it was a dumb default setting, there was a sane way to fix the problem : the SLAPD_OPTIONS field in the conf.d file. Because this variable was provided there was no problem at all for me to do that.
Again I am sorry because I really respect the maintainer work and the time you provide to make archlinux a better linux distribution. You just didn't thought of a way some users would use your package and that's fine, I am not angry and I still thank you for this upgrade. Just don't bullshit please.
The -u and -g options are not like the rest of the options which works out-of-the-box by simply setting them in the conf.d file and restarting the server. First you must create the user and group if they don't exist already, then you need to modify the ownership of directories and files. So in addition of modifying the conf.d file which is expected from users, you also changed the ownership of directories/files installed by pacman which is unexpected. This is why the update cause some problems for you. If you still disagree, that is fine.
I'll close this as any further discussion would be pointless. The openldap server now runs as non-root and your system is fixed.