dovecot-1.2: expire-tool: If auth_socket_path isn't set, default...
dovecot at dovecot.org
dovecot at dovecot.org
Mon Jun 22 06:09:25 EEST 2009
details: http://hg.dovecot.org/dovecot-1.2/rev/de64bd431b80
changeset: 9146:de64bd431b80
user: Timo Sirainen <tss at iki.fi>
date: Sun Jun 21 23:09:19 2009 -0400
description:
expire-tool: If auth_socket_path isn't set, default to base_dir/auth-master.
diffstat:
1 file changed, 9 insertions(+), 4 deletions(-)
src/plugins/expire/expire-tool.c | 13 +++++++++----
diffs (38 lines):
diff -r c4ac007d4e0b -r de64bd431b80 src/plugins/expire/expire-tool.c
--- a/src/plugins/expire/expire-tool.c Sun Jun 21 22:48:50 2009 -0400
+++ b/src/plugins/expire/expire-tool.c Sun Jun 21 23:09:19 2009 -0400
@@ -25,7 +25,7 @@
dynamic object.. */
#include "expire-env.c"
-#define DEFAULT_AUTH_SOCKET_PATH PKG_RUNDIR"/auth-master"
+#define DEFAULT_AUTH_SOCKET_FNAME "auth-master"
struct expire_context {
struct auth_master_connection *auth_conn;
@@ -229,7 +229,7 @@ static void expire_run(bool testrun)
time_t oldest, expire_time;
unsigned int expunge_secs, altmove_secs;
const char *auth_socket, *p, *key, *value;
- const char *userp, *mailbox, *expire, *expire_altmove;
+ const char *userp, *mailbox, *expire, *expire_altmove, *base_dir;
int ret;
expire = t_strdup(getenv("EXPIRE"));
@@ -268,9 +268,14 @@ static void expire_run(bool testrun)
expire_get_global_mail_ids();
+ base_dir = getenv("BASE_DIR");
+ if (base_dir == NULL)
+ base_dir = PKG_RUNDIR;
auth_socket = getenv("AUTH_SOCKET_PATH");
- if (auth_socket == NULL)
- auth_socket = DEFAULT_AUTH_SOCKET_PATH;
+ if (auth_socket == NULL) {
+ auth_socket = t_strconcat(base_dir, "/",
+ DEFAULT_AUTH_SOCKET_FNAME, NULL);
+ }
memset(&ctx, 0, sizeof(ctx));
ctx.testrun = testrun;
More information about the dovecot-cvs
mailing list