[Dovecot] patch: list shared namespace
bh at intevation.de
Tue Nov 4 19:54:50 EET 2008
On 31.10.2008, Timo Sirainen wrote:
> v1.2 code supports multiple users per process. That means you can't
> really use getenv("USER") and you can't store per-user objects as static
> variables. Rather you should hook into hook_mail_user_created and add
> the per-user variables to the mail_user structure. See for example
> lazy-expunge plugin (struct lazy_expunge_mail_user) or quota plugin how
> that works.
I have done that for the metadata plugin now, which actually does use per-user
dicts if private metadata is enabled. However, the only reason my ACL plugin
changes use getenv("USER") is that dict_init requires a username. That
username is not actually needed for what the code does with the dict, though.
All entries are public entries and it doesn't matter which user reads or
modifies the dict. Maybe the dict API should have the concept of a purely
public dict which doesn't require a username.
> i_info("no acl_shared_dict specified; shared namespaces will not be
> listed") could be written only if getenv("DEBUG") != NULL.
I did that now.
> Is acl_shared_debug stuff only a temporary developer debugging thing, or
> will it be useful also for sysadmins?
I put that in because it was useful for me while developing. I'm not sure
it's useful for admins later on. So maybe I should remove them.
Bernhard Herzog | ++49-541-335 08 30 | http://www.intevation.de/
Intevation GmbH, Neuer Graben 17, 49074 Osnabrück | AG Osnabrück, HR B 18998
Geschäftsführer: Frank Koormann, Bernhard Reiter, Dr. Jan-Oliver Wagner
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://dovecot.org/pipermail/dovecot/attachments/20081104/4b15ab08/attachment.bin
More information about the dovecot