#endif
{ "pid_file_path", opt_stringptr, &pid_file_path },
{ "pipelining_advertise_hosts", opt_stringptr, &pipelining_advertise_hosts },
-#ifdef SUPPORT_PIPE_CONNECT
+#ifndef DISABLE_PIPE_CONNECT
{ "pipelining_connect_advertise_hosts", opt_stringptr,
&pipe_connect_advertise_hosts },
#endif
{ "smtp_ratelimit_hosts", opt_stringptr, &smtp_ratelimit_hosts },
{ "smtp_ratelimit_mail", opt_stringptr, &smtp_ratelimit_mail },
{ "smtp_ratelimit_rcpt", opt_stringptr, &smtp_ratelimit_rcpt },
- { "smtp_receive_timeout", opt_func, (void *) &fn_smtp_receive_timeout },
+ { "smtp_receive_timeout", opt_func, {.fn = &fn_smtp_receive_timeout} },
{ "smtp_reserve_hosts", opt_stringptr, &smtp_reserve_hosts },
{ "smtp_return_error_details",opt_bool, &smtp_return_error_details },
#ifdef SUPPORT_I18N
spf(buf, sizeof(buf), US"_DRIVER_AUTHENTICATOR_%T", ai->driver_name);
builtin_macro_create(buf);
options_from_list(ai->options, (unsigned)*ai->options_count, US"AUTHENTICATOR", ai->driver_name);
+
+ if (ai->macros_create) (ai->macros_create)();
}
}
} syslog_fac_item;
/* constants */
-static const char * const hidden = "<value not displayable>";
+static const uschar * const hidden = US"<value not displayable>";
/* Static variables */
readconf_find_option(void *p)
{
for (int i = 0; i < nelem(optionlist_config); i++)
- if (p == optionlist_config[i].value) return US optionlist_config[i].name;
+ if (p == optionlist_config[i].v.value) return US optionlist_config[i].name;
for (router_instance * r = routers; r; r = r->next)
{
for (int i = 0; i < *ri->options_count; i++)
{
if ((ri->options[i].type & opt_mask) != opt_stringptr) continue;
- if (p == CS (r->options_block) + (long int)(ri->options[i].value))
+ if (p == CS (r->options_block) + ri->options[i].v.offset)
return US ri->options[i].name;
}
}
? CS t
: CS t->options_block
)
- + (long int)op->value)
+ + op->v.offset)
return US op->name;
}
}
optionlist *ol;
uschar name2[64];
sprintf(CS name2, "*set_%.50s", name);
-ol = find_option(name2, oltop, last);
-if (ol == NULL) log_write(0, LOG_MAIN|LOG_PANIC_DIE,
- "Exim internal error: missing set flag for %s", name);
-return (data_block == NULL)? (BOOL *)(ol->value) :
- (BOOL *)(US data_block + (long int)(ol->value));
+if (!(ol = find_option(name2, oltop, last)))
+ log_write(0, LOG_MAIN|LOG_PANIC_DIE,
+ "Exim internal error: missing set flag for %s", name);
+return data_block
+ ? (BOOL *)(US data_block + ol->v.offset) : (BOOL *)ol->v.value;
}
if (!(ol = find_option(name + offset, oltop, last)))
{
- if (unknown_txt == NULL) return FALSE;
+ if (!unknown_txt) return FALSE;
log_write(0, LOG_PANIC_DIE|LOG_CONFIG_IN, CS unknown_txt, name);
}
if (offset != 0)
log_write(0, LOG_PANIC_DIE|LOG_CONFIG_IN,
"negation prefix applied to a non-boolean option");
- if (*s == 0)
+ if (!*s)
log_write(0, LOG_PANIC_DIE|LOG_CONFIG_IN,
"unexpected end of line (data missing) after %s", name);
if (*s != '=')
true/false/yes/no, or, in the case of opt_expand_bool, a general string that
ultimately expands to one of those values. */
-else if (*s != 0 && (offset != 0 || *s != '='))
+else if (*s && (offset != 0 || *s != '='))
extra_chars_error(s, US"boolean option ", name, US"");
/* Skip white space after = */
/* If there is a data block and the opt_public flag is not set, change
the data block pointer to the private options block. */
-if (data_block != NULL && (ol->type & opt_public) == 0)
+if (data_block && !(ol->type & opt_public))
data_block = (void *)(((driver_instance *)data_block)->options_block);
/* Now get the data according to the type. */
control block and flags word. */
case opt_stringptr:
- str_target = data_block ? USS (US data_block + (long int)(ol->value))
- : USS (ol->value);
+ str_target = data_block ? USS (US data_block + ol->v.offset)
+ : USS ol->v.value;
if (ol->type & opt_rep_con)
{
uschar * saved_condition;
case opt_rewrite:
if (data_block)
- *USS (US data_block + (long int)(ol->value)) = sptr;
+ *USS (US data_block + ol->v.offset) = sptr;
else
- *USS (ol->value) = sptr;
+ *USS ol->v.value = sptr;
freesptr = FALSE;
if (type == opt_rewrite)
{
sprintf(CS name2, "*%.50s_flags", name);
ol3 = find_option(name2, oltop, last);
- if (ol2 == NULL || ol3 == NULL)
+ if (!ol2 || !ol3)
log_write(0, LOG_PANIC_DIE|LOG_CONFIG_IN,
"rewrite rules not available for driver");
- if (data_block == NULL)
+ if (data_block)
{
- chain = (rewrite_rule **)(ol2->value);
- flagptr = (int *)(ol3->value);
+ chain = (rewrite_rule **)(US data_block + ol2->v.offset);
+ flagptr = (int *)(US data_block + ol3->v.offset);
}
else
{
- chain = (rewrite_rule **)(US data_block + (long int)(ol2->value));
- flagptr = (int *)(US data_block + (long int)(ol3->value));
+ chain = (rewrite_rule **)ol2->v.value;
+ flagptr = (int *)ol3->v.value;
}
while ((p = string_nextinlist(CUSS &sptr, &sep, big_buffer, BIG_BUFFER_SIZE)))
case opt_expand_uid:
sprintf(CS name2, "*expand_%.50s", name);
- ol2 = find_option(name2, oltop, last);
- if (ol2 != NULL)
+ if ((ol2 = find_option(name2, oltop, last)))
{
- uschar *ss = (Ustrchr(sptr, '$') != NULL)? sptr : NULL;
+ uschar *ss = (Ustrchr(sptr, '$') != NULL) ? sptr : NULL;
- if (data_block == NULL)
- *((uschar **)(ol2->value)) = ss;
+ if (data_block)
+ *(USS(US data_block + ol2->v.offset)) = ss;
else
- *((uschar **)(US data_block + (long int)(ol2->value))) = ss;
+ *(USS ol2->v.value) = ss;
- if (ss != NULL)
+ if (ss)
{
*(get_set_flag(name, oltop, last, data_block)) = FALSE;
freesptr = FALSE;
case opt_uid:
if (!route_finduser(sptr, &pw, &uid))
log_write(0, LOG_PANIC_DIE|LOG_CONFIG_IN, "user %s was not found", sptr);
- if (data_block == NULL)
- *((uid_t *)(ol->value)) = uid;
+ if (data_block)
+ *(uid_t *)(US data_block + ol->v.offset) = uid;
else
- *((uid_t *)(US data_block + (long int)(ol->value))) = uid;
+ *(uid_t *)ol->v.value = uid;
/* Set the flag indicating a fixed value is set */
if (pw == NULL) break;
Ustrcpy(name+Ustrlen(name)-4, US"group");
ol2 = find_option(name, oltop, last);
- if (ol2 != NULL && ((ol2->type & opt_mask) == opt_gid ||
+ if (ol2 && ((ol2->type & opt_mask) == opt_gid ||
(ol2->type & opt_mask) == opt_expand_gid))
{
BOOL *set_flag = get_set_flag(name, oltop, last, data_block);
- if (! *set_flag)
+ if (!*set_flag)
{
- if (data_block == NULL)
- *((gid_t *)(ol2->value)) = pw->pw_gid;
+ if (data_block)
+ *((gid_t *)(US data_block + ol2->v.offset)) = pw->pw_gid;
else
- *((gid_t *)(US data_block + (long int)(ol2->value))) = pw->pw_gid;
+ *((gid_t *)ol2->v.value) = pw->pw_gid;
*set_flag = TRUE;
}
}
case opt_expand_gid:
sprintf(CS name2, "*expand_%.50s", name);
- ol2 = find_option(name2, oltop, last);
- if (ol2 != NULL)
+ if ((ol2 = find_option(name2, oltop, last)))
{
- uschar *ss = (Ustrchr(sptr, '$') != NULL)? sptr : NULL;
+ uschar *ss = (Ustrchr(sptr, '$') != NULL) ? sptr : NULL;
- if (data_block == NULL)
- *((uschar **)(ol2->value)) = ss;
+ if (data_block)
+ *(USS(US data_block + ol2->v.offset)) = ss;
else
- *((uschar **)(US data_block + (long int)(ol2->value))) = ss;
+ *(USS ol2->v.value) = ss;
- if (ss != NULL)
+ if (ss)
{
*(get_set_flag(name, oltop, last, data_block)) = FALSE;
freesptr = FALSE;
case opt_gid:
if (!route_findgroup(sptr, &gid))
log_write(0, LOG_PANIC_DIE|LOG_CONFIG_IN, "group %s was not found", sptr);
- if (data_block == NULL)
- *((gid_t *)(ol->value)) = gid;
+ if (data_block)
+ *((gid_t *)(US data_block + ol->v.offset)) = gid;
else
- *((gid_t *)(US data_block + (long int)(ol->value))) = gid;
+ *((gid_t *)ol->v.value) = gid;
*(get_set_flag(name, oltop, last, data_block)) = TRUE;
break;
list = store_malloc(count*sizeof(uid_t));
list[ptr++] = (uid_t)(count - 1);
- if (data_block == NULL)
- *((uid_t **)(ol->value)) = list;
+ if (data_block)
+ *((uid_t **)(US data_block + ol->v.offset)) = list;
else
- *((uid_t **)(US data_block + (long int)(ol->value))) = list;
+ *((uid_t **)ol->v.value) = list;
p = op;
while (count-- > 1)
const uschar *p;
const uschar *op = expand_string (sptr);
- if (op == NULL)
+ if (!op)
log_write(0, LOG_PANIC_DIE|LOG_CONFIG_IN, "failed to expand %s: %s",
name, expand_string_message);
list = store_malloc(count*sizeof(gid_t));
list[ptr++] = (gid_t)(count - 1);
- if (data_block == NULL)
- *((gid_t **)(ol->value)) = list;
+ if (data_block)
+ *((gid_t **)(US data_block + ol->v.offset)) = list;
else
- *((gid_t **)(US data_block + (long int)(ol->value))) = list;
+ *((gid_t **)ol->v.value) = list;
p = op;
while (count-- > 1)
save the string for later expansion in the alternate place. */
case opt_expand_bool:
- if (*s != 0 && Ustrchr(s, '$') != 0)
+ if (*s && Ustrchr(s, '$') != 0)
{
sprintf(CS name2, "*expand_%.50s", name);
if ((ol2 = find_option(name2, oltop, last)))
{
reset_point = store_mark();
sptr = read_string(s, name);
- if (data_block == NULL)
- *((uschar **)(ol2->value)) = sptr;
+ if (data_block)
+ *(USS(US data_block + ol2->v.offset)) = sptr;
else
- *((uschar **)(US data_block + (long int)(ol2->value))) = sptr;
+ *(USS ol2->v.value) = sptr;
freesptr = FALSE;
break;
}
if (type == opt_bit)
{
int bit = 1 << ((ol->type >> 16) & 31);
- int *ptr = (data_block == NULL)?
- (int *)(ol->value) :
- (int *)(US data_block + (long int)ol->value);
+ int * ptr = data_block
+ ? (int *)(US data_block + ol->v.offset)
+ : (int *)ol->v.value;
if (boolvalue) *ptr |= bit; else *ptr &= ~bit;
break;
}
/* Handle full BOOL types */
- if (data_block == NULL)
- *((BOOL *)(ol->value)) = boolvalue;
+ if (data_block)
+ *((BOOL *)(US data_block + ol->v.offset)) = boolvalue;
else
- *((BOOL *)(US data_block + (long int)(ol->value))) = boolvalue;
+ *((BOOL *)ol->v.value) = boolvalue;
/* Verify fudge */
if (type == opt_bool_verify)
{
sprintf(CS name2, "%.50s_recipient", name + offset);
- ol2 = find_option(name2, oltop, last);
- if (ol2 != NULL)
- {
- if (data_block == NULL)
- *((BOOL *)(ol2->value)) = boolvalue;
+ if ((ol2 = find_option(name2, oltop, last)))
+ if (data_block)
+ *((BOOL *)(US data_block + ol2->v.offset)) = boolvalue;
else
- *((BOOL *)(US data_block + (long int)(ol2->value))) = boolvalue;
- }
+ *((BOOL *)ol2->v.value) = boolvalue;
}
/* Note that opt_bool_set type is set, if there is somewhere to do so */
else if (type == opt_bool_set)
{
sprintf(CS name2, "*set_%.50s", name + offset);
- ol2 = find_option(name2, oltop, last);
- if (ol2 != NULL)
- {
- if (data_block == NULL)
- *((BOOL *)(ol2->value)) = TRUE;
+ if ((ol2 = find_option(name2, oltop, last)))
+ if (data_block)
+ *((BOOL *)(US data_block + ol2->v.offset)) = TRUE;
else
- *((BOOL *)(US data_block + (long int)(ol2->value))) = TRUE;
- }
+ *((BOOL *)ol2->v.value) = TRUE;
}
break;
}
if (data_block)
- *(int *)(US data_block + (long int)ol->value) = value;
+ *(int *)(US data_block + ol->v.offset) = value;
else
- *(int *)ol->value = value;
+ *(int *)ol->v.value = value;
break;
/* Integer held in K: again, allow formats and suffixes as above. */
extra_chars_error(endptr, inttype, US"integer value for ", name);
if (data_block)
- *(int_eximarith_t *)(US data_block + (long int)ol->value) = lvalue;
+ *(int_eximarith_t *)(US data_block + ol->v.offset) = lvalue;
else
- *(int_eximarith_t *)ol->value = lvalue;
+ *(int_eximarith_t *)ol->v.value = lvalue;
break;
}
if (s[count] != 0)
extra_chars_error(s+count, US"fixed-point value for ", name, US"");
- if (data_block == NULL)
- *((int *)(ol->value)) = value;
+ if (data_block)
+ *((int *)(US data_block + ol->v.offset)) = value;
else
- *((int *)(US data_block + (long int)(ol->value))) = value;
+ *((int *)ol->v.value) = value;
break;
/* There's a special routine to read time values. */
if (value < 0)
log_write(0, LOG_PANIC_DIE|LOG_CONFIG_IN, "invalid time value for %s",
name);
- if (data_block == NULL)
- *((int *)(ol->value)) = value;
+ if (data_block)
+ *((int *)(US data_block + ol->v.offset)) = value;
else
- *((int *)(US data_block + (long int)(ol->value))) = value;
+ *((int *)ol->v.value) = value;
break;
/* A time list is a list of colon-separated times, with the first
case opt_timelist:
{
int count = 0;
- int *list = (data_block == NULL)?
- (int *)(ol->value) :
- (int *)(US data_block + (long int)(ol->value));
+ int * list = data_block
+ ? (int *)(US data_block + ol->v.offset)
+ : (int *)ol->v.value;
if (*s != 0) for (count = 1; count <= list[0] - 2; count++)
{
case opt_func:
{
- void (*fn)() = ol->value;
+ void (*fn)() = ol->v.fn;
fn(name, s, 0);
break;
}
if (!f.admin_user && ol->type & opt_secure)
{
if (no_labels)
- printf("%s\n", hidden);
+ printf("%s\n", CCS hidden);
else
- printf("%s = %s\n", name, hidden);
+ printf("%s = %s\n", name, CCS hidden);
return TRUE;
}
/* Else show the value of the option */
-value = ol->value;
+value = ol->v.value;
if (options_block)
{
if (!(ol->type & opt_public))
sprintf(CS name2, "*expand_%.50s", name);
if ((ol2 = find_option(name2, oltop, last)))
{
- void *value2 = ol2->value;
if (options_block)
- value2 = (void *)(US options_block + (long int)value2);
- s = *(USS value2);
+ s = *USS (US options_block + ol2->v.offset);
+ else
+ s = *USS ol2->v.value;
if (!no_labels) printf("%s = ", name);
printf("%s\n", s ? string_printing(s) : US"");
break;
if ( (ol2 = find_option(name2, oltop, last))
&& (ol2->type & opt_mask) == opt_stringptr)
{
- void *value2 = ol2->value;
if (options_block)
- value2 = (void *)(US options_block + (long int)value2);
- s = *(USS value2);
+ s = *USS (US options_block + ol2->v.offset);
+ else
+ s = *USS ol2->v.value;
if (!no_labels) printf("%s = ", name);
printf("%s\n", s ? string_printing(s) : US"");
break;
case opt_expand_bool:
sprintf(CS name2, "*expand_%.50s", name);
- if ((ol2 = find_option(name2, oltop, last)) && ol2->value)
+ if ((ol2 = find_option(name2, oltop, last)) && ol2->v.value)
{
- void *value2 = ol2->value;
if (options_block)
- value2 = (void *)(US options_block + (long int)value2);
- s = *(USS value2);
+ s = *USS (US options_block + ol2->v.offset);
+ else
+ s = *USS ol2->v.value;
if (s)
{
if (!no_labels) printf("%s = ", name);
break;
case opt_func:
- {
- void (*fn)() = ol->value;
- fn(name, NULL, no_labels ? opt_fn_print : opt_fn_print|opt_fn_print_label);
+ ol->v.fn(name, NULL, no_labels ? opt_fn_print : opt_fn_print|opt_fn_print_label);
break;
- }
}
return TRUE;
}
for (int i = 0; i < 4; i++)
if ((t = tree_search(*(anchors[i]), name+1)))
{
+ namedlist_block * nb = t->data.ptr;
+ const uschar * s = nb->hide ? hidden : nb->string;
found = TRUE;
if (no_labels)
- printf("%s\n", ((namedlist_block *)(t->data.ptr))->string);
+ printf("%s\n", CCS s);
else
- printf("%slist %s = %s\n", types[i], name+1,
- ((namedlist_block *)(t->data.ptr))->string);
+ printf("%slist %s = %s\n", types[i], name+1, CCS s);
}
if (!found)
s the text of the option line, starting immediately after the name
of the list type
tname the name of the list type, for messages
+ hide do not output value on "-bP"
Returns: nothing
*/
static void
read_named_list(tree_node **anchorp, int *numberp, int max, uschar *s,
- uschar *tname)
+ uschar *tname, BOOL hide)
{
BOOL forcecache = FALSE;
uschar *ss;
tree_node *t;
-namedlist_block *nb = store_get(sizeof(namedlist_block), FALSE);
+namedlist_block * nb = store_get(sizeof(namedlist_block), FALSE);
if (Ustrncmp(s, "_cache", 6) == 0)
{
t->data.ptr = nb;
nb->number = *numberp;
*numberp += 1;
+nb->hide = hide;
if (*s++ != '=') log_write(0, LOG_PANIC_DIE|LOG_CONFIG_IN,
"missing '=' after \"%s\"", t->name);
-/*************************************************
-* Drop privs for checking TLS config *
-*************************************************/
-
-/* We want to validate TLS options during readconf, but do not want to be
-root when we call into the TLS library, in case of library linkage errors
-which cause segfaults; before this check, those were always done as the Exim
-runtime user and it makes sense to continue with that.
-
-Assumes: tls_require_ciphers has been set, if it will be
- exim_user has been set, if it will be
- exim_group has been set, if it will be
-
-Returns: bool for "okay"; false will cause caller to immediately exit.
-*/
-
-#ifndef DISABLE_TLS
-static BOOL
-tls_dropprivs_validate_require_cipher(BOOL nowarn)
-{
-const uschar *errmsg;
-pid_t pid;
-int rc, status;
-void (*oldsignal)(int);
-
-/* If TLS will never be used, no point checking ciphers */
-
-if ( !tls_advertise_hosts
- || !*tls_advertise_hosts
- || Ustrcmp(tls_advertise_hosts, ":") == 0
- )
- return TRUE;
-else if (!nowarn && !tls_certificate)
- log_write(0, LOG_MAIN,
- "Warning: No server certificate defined; will use a selfsigned one.\n"
- " Suggested action: either install a certificate or change tls_advertise_hosts option");
-
-oldsignal = signal(SIGCHLD, SIG_DFL);
-
-fflush(NULL);
-if ((pid = fork()) < 0)
- log_write(0, LOG_MAIN|LOG_PANIC_DIE, "fork failed for TLS check");
-
-if (pid == 0)
- {
- /* in some modes, will have dropped privilege already */
- if (!geteuid())
- exim_setugid(exim_uid, exim_gid, FALSE,
- US"calling tls_validate_require_cipher");
-
- if ((errmsg = tls_validate_require_cipher()))
- log_write(0, LOG_PANIC_DIE|LOG_CONFIG,
- "tls_require_ciphers invalid: %s", errmsg);
- fflush(NULL);
- exim_underbar_exit(0);
- }
-
-do {
- rc = waitpid(pid, &status, 0);
-} while (rc < 0 && errno == EINTR);
-
-DEBUG(D_tls)
- debug_printf("tls_validate_require_cipher child %d ended: status=0x%x\n",
- (int)pid, status);
-
-signal(SIGCHLD, oldsignal);
-
-return status == 0;
-}
-#endif /*DISABLE_TLS*/
-
-
-
-
/*************************************************
* Read main configuration options *
*************************************************/
while ((s = get_config_line()))
{
+ BOOL hide;
+ uschar * t;
+
if (config_lineno == 1 && Ustrstr(s, "\xef\xbb\xbf") == s)
log_write(0, LOG_PANIC_DIE|LOG_CONFIG_IN,
"found unexpected BOM (Byte Order Mark)");
- if (isupper(s[0]))
- { if (!macro_read_assignment(s)) exim_exit(EXIT_FAILURE, US""); }
+ if (isupper(*s))
+ {
+ if (!macro_read_assignment(s)) exim_exit(EXIT_FAILURE, US"");
+ continue;
+ }
+
+ t = (hide = Ustrncmp(s, "hide", 4) == 0 && isspace(s[4])) ? s + 5 : s;
- else if (Ustrncmp(s, "domainlist", 10) == 0)
+ if (Ustrncmp(t, "domainlist", 10) == 0)
read_named_list(&domainlist_anchor, &domainlist_count,
- MAX_NAMED_LIST, s+10, US"domain list");
+ MAX_NAMED_LIST, t+10, US"domain list", hide);
- else if (Ustrncmp(s, "hostlist", 8) == 0)
+ else if (Ustrncmp(t, "hostlist", 8) == 0)
read_named_list(&hostlist_anchor, &hostlist_count,
- MAX_NAMED_LIST, s+8, US"host list");
+ MAX_NAMED_LIST, t+8, US"host list", hide);
- else if (Ustrncmp(s, US"addresslist", 11) == 0)
+ else if (Ustrncmp(t, US"addresslist", 11) == 0)
read_named_list(&addresslist_anchor, &addresslist_count,
- MAX_NAMED_LIST, s+11, US"address list");
+ MAX_NAMED_LIST, t+11, US"address list", hide);
- else if (Ustrncmp(s, US"localpartlist", 13) == 0)
+ else if (Ustrncmp(t, US"localpartlist", 13) == 0)
read_named_list(&localpartlist_anchor, &localpartlist_count,
- MAX_NAMED_LIST, s+13, US"local part list");
+ MAX_NAMED_LIST, t+13, US"local part list", hide);
else
(void) readconf_handle_option(s, optionlist_config, optionlist_config_size,
"tls_%sverify_hosts is set, but tls_verify_certificates is not set",
tls_verify_hosts ? "" : "try_");
-/* This also checks that the library linkage is working and we can call
-routines in it, so call even if tls_require_ciphers is unset */
-if (!tls_dropprivs_validate_require_cipher(nowarn))
- exit(1);
-
/* Magic number: at time of writing, 1024 has been the long-standing value
used by so many clients, and what Exim used to use always, that it makes
sense to just min-clamp this max-clamp at that. */
driver_instance *d = NULL;
uschar *buffer;
-while ((buffer = get_config_line()) != NULL)
+while ((buffer = get_config_line()))
{
uschar name[64];
uschar *s;
if (!d->driver_name)
log_write(0, LOG_PANIC_DIE|LOG_CONFIG,
"no driver defined for %s \"%s\"", class, d->name);
+ /* s is using big_buffer, so this call had better not */
(d->info->init)(d);
d = NULL;
}
/* Check nothing more on this line, then do the next loop iteration. */
while (isspace(*s)) s++;
- if (*s != 0) extra_chars_error(s, US"driver name ", name, US"");
+ if (*s) extra_chars_error(s, US"driver name ", name, US"");
continue;
}
uschar *ss;
for (optionlist * ol = d->info->options; ol < d->info->options + count; ol++)
- {
- void *options_block;
- uschar *value;
- int type = ol->type & opt_mask;
- if (type != opt_stringptr) continue;
- options_block = ((ol->type & opt_public) == 0)? d->options_block : (void *)d;
- value = *(uschar **)(US options_block + (long int)(ol->value));
- if (value != NULL && (ss = Ustrstr(value, s)) != NULL)
+ if ((ol->type & opt_mask) == opt_stringptr)
{
- if (ss <= value || (ss[-1] != '$' && ss[-1] != '{') ||
- isalnum(ss[Ustrlen(s)])) continue;
- DEBUG(D_transport) debug_printf("driver %s: \"%s\" option depends on %s\n",
- d->name, ol->name, s);
- return TRUE;
+ void * options_block = ol->type & opt_public ? (void *)d : d->options_block;
+ uschar * value = *USS(US options_block + ol->v.offset);
+
+ if (value && (ss = Ustrstr(value, s)) != NULL)
+ {
+ if (ss <= value || (ss[-1] != '$' && ss[-1] != '{') ||
+ isalnum(ss[Ustrlen(s)])) continue;
+ DEBUG(D_transport) debug_printf("driver %s: \"%s\" option depends on %s\n",
+ d->name, ol->name, s);
+ return TRUE;
+ }
}
- }
DEBUG(D_transport) debug_printf("driver %s does not depend on %s\n", d->name, s);
return FALSE;
static void
auths_init(void)
{
-#ifdef SUPPORT_PIPE_CONNECT
+#ifndef DISABLE_PIPE_CONNECT
int nauths = 0;
#endif
"(%s and %s) have the same public name (%s)",
au->client ? US"client" : US"server", au->name, bu->name,
au->public_name);
-#ifdef SUPPORT_PIPE_CONNECT
+#ifndef DISABLE_PIPE_CONNECT
nauths++;
#endif
}
-#ifdef SUPPORT_PIPE_CONNECT
+#ifndef DISABLE_PIPE_CONNECT
f.smtp_in_early_pipe_no_auth = nauths > 16;
#endif
}
uschar *p;
while ((p = get_config_line()))
- {
(void) readconf_handle_option(p, local_scan_options, local_scan_options_count,
NULL, US"local_scan option \"%s\" unknown");
- }
#endif
}
if ((p = Ustrchr(current, '=')))
{
*p = '\0';
- printf("%*s%s= %s\n", indent, "", current, hidden);
+ printf("%*s%s= %s\n", indent, "", current, CCS hidden);
}
/* e.g.: hide split_spool_directory */
else
- printf("%*s\n", indent, hidden);
+ printf("%*s\n", indent, CCS hidden);
}
else