dovecot-2.2: lib-storage: Store pointer to mail_storage_service_...
dovecot at dovecot.org
dovecot at dovecot.org
Sun Sep 6 19:29:28 UTC 2015
details: http://hg.dovecot.org/dovecot-2.2/rev/e5527c5bee2f
changeset: 19094:e5527c5bee2f
user: Timo Sirainen <tss at iki.fi>
date: Sun Sep 06 22:28:07 2015 +0300
description:
lib-storage: Store pointer to mail_storage_service_user to mail_user if it exists.
diffstat:
src/lib-storage/index/shared/shared-storage.c | 1 +
src/lib-storage/mail-storage-service.c | 1 +
src/lib-storage/mail-user.c | 1 +
src/lib-storage/mail-user.h | 2 ++
4 files changed, 5 insertions(+), 0 deletions(-)
diffs (45 lines):
diff -r 5d583816b7c9 -r e5527c5bee2f src/lib-storage/index/shared/shared-storage.c
--- a/src/lib-storage/index/shared/shared-storage.c Sun Sep 06 22:27:29 2015 +0300
+++ b/src/lib-storage/index/shared/shared-storage.c Sun Sep 06 22:28:07 2015 +0300
@@ -255,6 +255,7 @@
owner = mail_user_alloc(userdomain, user->set_info,
user->unexpanded_set);
+ owner->_service_user = user->_service_user;
owner->creator = user;
owner->autocreated = TRUE;
owner->session_id = p_strdup(owner->pool, user->session_id);
diff -r 5d583816b7c9 -r e5527c5bee2f src/lib-storage/mail-storage-service.c
--- a/src/lib-storage/mail-storage-service.c Sun Sep 06 22:27:29 2015 +0300
+++ b/src/lib-storage/mail-storage-service.c Sun Sep 06 22:28:07 2015 +0300
@@ -642,6 +642,7 @@
mail_user_dup() */
mail_user = mail_user_alloc(user->input.username, user->user_info,
user->user_set);
+ mail_user->_service_user = user;
mail_user_set_home(mail_user, *home == '\0' ? NULL : home);
mail_user_set_vars(mail_user, ctx->service->name,
&user->input.local_ip, &user->input.remote_ip);
diff -r 5d583816b7c9 -r e5527c5bee2f src/lib-storage/mail-user.c
--- a/src/lib-storage/mail-user.c Sun Sep 06 22:27:29 2015 +0300
+++ b/src/lib-storage/mail-user.c Sun Sep 06 22:28:07 2015 +0300
@@ -521,6 +521,7 @@
user2 = mail_user_alloc(user->username, user->set_info,
user->unexpanded_set);
+ user2->_service_user = user->_service_user;
if (user->_home != NULL)
mail_user_set_home(user2, user->_home);
mail_user_set_vars(user2, user->service,
diff -r 5d583816b7c9 -r e5527c5bee2f src/lib-storage/mail-user.h
--- a/src/lib-storage/mail-user.h Sun Sep 06 22:27:29 2015 +0300
+++ b/src/lib-storage/mail-user.h Sun Sep 06 22:28:07 2015 +0300
@@ -23,6 +23,8 @@
/* User's creator if such exists. For example for autocreated shared
mailbox users their creator is the logged in user. */
struct mail_user *creator;
+ /* Set if user was created via mail_storage_service. */
+ struct mail_storage_service_user *_service_user;
const char *username;
/* don't access the home directly. It may be set lazily. */
More information about the dovecot-cvs
mailing list