dovecot: If base_dir is set, use it as the default auth-master s...
dovecot at dovecot.org
dovecot at dovecot.org
Sun Jan 20 14:07:28 EET 2008
details: http://hg.dovecot.org/dovecot/rev/e1a45bbd63d9
changeset: 7179:e1a45bbd63d9
user: Timo Sirainen <tss at iki.fi>
date: Sun Jan 20 14:07:25 2008 +0200
description:
If base_dir is set, use it as the default auth-master socket directory.
diffstat:
1 file changed, 7 insertions(+), 3 deletions(-)
src/deliver/deliver.c | 10 +++++++---
diffs (27 lines):
diff -r d8f8b5ab2b8f -r e1a45bbd63d9 src/deliver/deliver.c
--- a/src/deliver/deliver.c Sun Jan 20 14:05:26 2008 +0200
+++ b/src/deliver/deliver.c Sun Jan 20 14:07:25 2008 +0200
@@ -41,7 +41,6 @@
#include <syslog.h>
#define DEFAULT_CONFIG_FILE SYSCONFDIR"/dovecot.conf"
-#define DEFAULT_AUTH_SOCKET_PATH PKG_RUNDIR"/auth-master"
#define DEFAULT_SENDMAIL_PATH "/usr/lib/sendmail"
#define DEFAULT_ENVELOPE_SENDER "MAILER-DAEMON"
@@ -844,8 +843,13 @@ int main(int argc, char *argv[])
t_array_init(&extra_fields, 64);
if (user_auth) {
auth_socket = getenv("AUTH_SOCKET_PATH");
- if (auth_socket == NULL)
- auth_socket = DEFAULT_AUTH_SOCKET_PATH;
+ if (auth_socket == NULL) {
+ const char *base_dir = getenv("BASE_DIR");
+ if (base_dir == NULL)
+ base_dir = PKG_RUNDIR;
+ auth_socket = t_strconcat(base_dir, "/auth-master",
+ NULL);
+ }
ret = auth_client_lookup_and_restrict(ioloop, auth_socket,
user, process_euid,
More information about the dovecot-cvs
mailing list