dovecot-2.0: master: If mail_debug=yes, set DEBUG=1 environment ...
dovecot at dovecot.org
dovecot at dovecot.org
Wed May 6 22:08:21 EEST 2009
details: http://hg.dovecot.org/dovecot-2.0/rev/3e5c6e2367db
changeset: 9240:3e5c6e2367db
user: Timo Sirainen <tss at iki.fi>
date: Wed May 06 15:08:16 2009 -0400
description:
master: If mail_debug=yes, set DEBUG=1 environment to auth-destination processes.
diffstat:
3 files changed, 6 insertions(+)
src/master/master-settings.c | 2 ++
src/master/master-settings.h | 1 +
src/master/service-process.c | 3 +++
diffs (43 lines):
diff -r 1cb45d4389d4 -r 3e5c6e2367db src/master/master-settings.c
--- a/src/master/master-settings.c Wed May 06 15:01:49 2009 -0400
+++ b/src/master/master-settings.c Wed May 06 15:08:16 2009 -0400
@@ -190,6 +190,7 @@ static struct setting_define master_sett
DEF(SET_UINT, default_client_limit),
DEF(SET_BOOL, version_ignore),
+ DEF(SET_BOOL, mail_debug),
DEF(SET_UINT, first_valid_uid),
DEF(SET_UINT, last_valid_uid),
@@ -209,6 +210,7 @@ static struct master_settings master_def
MEMBER(default_client_limit) 1000,
MEMBER(version_ignore) FALSE,
+ MEMBER(mail_debug) FALSE,
MEMBER(first_valid_uid) 500,
MEMBER(last_valid_uid) 0,
diff -r 1cb45d4389d4 -r 3e5c6e2367db src/master/master-settings.h
--- a/src/master/master-settings.h Wed May 06 15:01:49 2009 -0400
+++ b/src/master/master-settings.h Wed May 06 15:08:16 2009 -0400
@@ -50,6 +50,7 @@ struct master_settings {
unsigned int default_client_limit;
bool version_ignore;
+ bool mail_debug;
unsigned int first_valid_uid, last_valid_uid;
unsigned int first_valid_gid, last_valid_gid;
diff -r 1cb45d4389d4 -r 3e5c6e2367db src/master/service-process.c
--- a/src/master/service-process.c Wed May 06 15:01:49 2009 -0400
+++ b/src/master/service-process.c Wed May 06 15:08:16 2009 -0400
@@ -243,6 +243,9 @@ static void drop_privileges(struct servi
const char *user, *home = NULL;
bool disallow_root;
+ if (auth_args != NULL && service->set->master_set->mail_debug)
+ env_put("DEBUG=1");
+
restrict_access_init(&rset);
rset.uid = service->uid;
rset.gid = service->gid;
More information about the dovecot-cvs
mailing list