36 |
int tls_done; |
int tls_done; |
37 |
#endif /* WITH_TLS */ |
#endif /* WITH_TLS */ |
38 |
|
|
39 |
|
int login_disabled; |
40 |
|
|
41 |
/* Number of child processes. */ |
/* Number of child processes. */ |
42 |
volatile size_t children; |
volatile size_t children; |
43 |
|
|
44 |
const char *argp_program_version = "imap4d (" PACKAGE_STRING ")"; |
const char *argp_program_version = "imap4d (" PACKAGE_STRING ")"; |
45 |
static char doc[] = N_("GNU imap4d -- the IMAP4D daemon"); |
static char doc[] = N_("GNU imap4d -- the IMAP4D daemon"); |
46 |
|
|
47 |
|
#define ARG_LOGIN_DISABLED 1 |
48 |
static struct argp_option options[] = { |
static struct argp_option options[] = { |
49 |
{"other-namespace", 'O', N_("PATHLIST"), 0, |
{"other-namespace", 'O', N_("PATHLIST"), 0, |
50 |
N_("set the `other' namespace"), 0}, |
N_("set the `other' namespace"), 0}, |
51 |
{"shared-namespace", 'S', N_("PATHLIST"), 0, |
{"shared-namespace", 'S', N_("PATHLIST"), 0, |
52 |
N_("set the `shared' namespace"), 0}, |
N_("set the `shared' namespace"), 0}, |
53 |
|
{"login-disabled", ARG_LOGIN_DISABLED, NULL, 0, |
54 |
|
N_("Disable LOGIN command")}, |
55 |
{NULL, 0, NULL, 0, NULL, 0} |
{NULL, 0, NULL, 0, NULL, 0} |
56 |
}; |
}; |
57 |
|
|
101 |
set_namespace (NS_SHARED, arg); |
set_namespace (NS_SHARED, arg); |
102 |
break; |
break; |
103 |
|
|
104 |
|
case ARG_LOGIN_DISABLED: |
105 |
|
login_disabled = 1; |
106 |
|
imap4d_capability_add ("LOGINDISABLED"); |
107 |
|
break; |
108 |
|
|
109 |
default: |
default: |
110 |
return ARGP_ERR_UNKNOWN; |
return ARGP_ERR_UNKNOWN; |
111 |
} |
} |
124 |
state = STATE_NONAUTH; /* Starting state in non-auth. */ |
state = STATE_NONAUTH; /* Starting state in non-auth. */ |
125 |
|
|
126 |
MU_AUTH_REGISTER_ALL_MODULES (); |
MU_AUTH_REGISTER_ALL_MODULES (); |
127 |
|
imap4d_capability_init (); |
128 |
|
|
129 |
#ifdef WITH_TLS |
#ifdef WITH_TLS |
130 |
mu_tls_init_argp (); |
mu_tls_init_argp (); |
131 |
#endif /* WITH_TLS */ |
#endif /* WITH_TLS */ |
202 |
tls_available = mu_check_tls_environment (); |
tls_available = mu_check_tls_environment (); |
203 |
if (tls_available) |
if (tls_available) |
204 |
tls_available = mu_init_tls_libs (); |
tls_available = mu_init_tls_libs (); |
205 |
|
if (tls_available) |
206 |
|
imap4d_capability_add ("STARTTLS"); |
207 |
#endif /* WITH_TLS */ |
#endif /* WITH_TLS */ |
208 |
|
|
209 |
/* Actually run the daemon. */ |
/* Actually run the daemon. */ |