On Thu, Jan 06, 2011 at 01:34:46PM -0500, Wesley Craig wrote: > On 06 Jan 2011, at 13:02, Jeroen van Meeuwen (Kolab Systems) wrote: > > I suppose for the switching to the cyrus user, what I always do is, for > > example: > > # su - -s /bin/bash cyrus -c '/usr/lib/cyrus-imapd/ctl_mboxlist -d' > > Because the cyrus user does not have a valid shell in RPM based > > distributions. > > ctl_mboxlist properly checks the running user and attempts to switch to the > configured cyrus user, erroring out if it's not able to. All of the tools > are intended to have this behavior: running many of the tools as root tends > to corrupt (at least) permissions on their databases. If a tool is not > checking and switching, that is a bug which ought to be reported & fixed. > Many of those flaws have been fixed in the past few releases. > > Regarding a universal tool: supporting the needs of distributions should be a > high priority. By the same token, we don't want to break all the scripts > what are currently relying on the non-universal tools. As such, I wouldn't > put much functionality into such a universal tool, beyond locating the > wrapped non-universal tools.
As much as possible I'm moving towards making what the non-universal tools do be a thin wrapper around the core functionality (check out reconstruct.c vs mailbox_reconstruct() for how the functionality is now split) - so it wouldn't matter too much - the "universal tool" would just be a wrapper around all those same APIs. Bron.