[Bug 632051] Re: slapd dist-upgrade chown: invalid argument: `'

Nathan Stratton Treadway ubuntu.lp at nathanst.com
Wed Sep 8 01:48:50 BST 2010


It occured to me that when the postinst script is unable to determine
the database directory associated with a particular suffix (for whatever
reason), simply producing the error message "chown: invalid argument:
`'" and then aborting isn't very helpful to the system administrator.

Here's a patch that checks the result of the get_directory function
call, and if no directory is returned prints a descriptive warning
rather than trying to set permissions on <nothing>.

The patch only changes the update_database_permissions() function, so it
should be an improvement regardless of whether slapd.conf or
slapd.d-style configuration is in use.

This version of the patch simply prints a warning message and continues
processing the rest of the postinst run, on the theory the there's a
good chance that everything will still work fine even if we don't run
this particular "missing" chown command -- but if there is actually a
need to abort the installation in that situation, the patch could easily
be tweaked to print an appropriate message and then exit with an error
status instead.

** Patch added: "print descriptive warning message when get_directory function can't find the database directory for the given suffix"
   https://bugs.launchpad.net/ubuntu/+source/openldap/+bug/632051/+attachment/1555599/+files/slapd_2.4.21-0ubuntu5.3_postinst_empty_dbdir_warning.patch

** Tags added: patch

-- 
slapd dist-upgrade chown: invalid argument: `'
https://bugs.launchpad.net/bugs/632051
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to openldap in ubuntu.



More information about the Ubuntu-server-bugs mailing list