git://git.exim.org
/
exim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tidying
[exim.git]
/
src
/
src
/
readconf.c
diff --git
a/src/src/readconf.c
b/src/src/readconf.c
index 875e032222f0ee435f8e5d13bada48673c539e84..a49d6c285ba456c530d143ecc9dcd6f26d3d9501 100644
(file)
--- a/
src/src/readconf.c
+++ b/
src/src/readconf.c
@@
-15,6
+15,9
@@
implementation of the conditional .ifdef etc. */
# include "macro_predef.h"
#endif
# include "macro_predef.h"
#endif
+#define READCONF_DEBUG if (FALSE) /* Change to TRUE to enable */
+
+
static uschar * syslog_facility_str;
static void fn_smtp_receive_timeout(const uschar *, const uschar *);
static uschar * syslog_facility_str;
static void fn_smtp_receive_timeout(const uschar *, const uschar *);
@@
-627,7
+630,7
@@
macro_create(const uschar * name, const uschar * val, BOOL command_line)
{
macro_item * m = store_get(sizeof(macro_item));
{
macro_item * m = store_get(sizeof(macro_item));
-/* fprintf(stderr, "%s: '%s' '%s'\n", __FUNCTION__, name, val); */
+READCONF_DEBUG fprintf(stderr, "%s: '%s' '%s'\n", __FUNCTION__, name, val);
m->next = NULL;
m->command_line = command_line;
m->namelen = Ustrlen(name);
m->next = NULL;
m->command_line = command_line;
m->namelen = Ustrlen(name);
@@
-820,7
+823,8
@@
if (*s) for (m = *s == '_' ? macros : macros_user; m; m = m->next)
{
int moveby;
{
int moveby;
-/* fprintf(stderr, "%s: matched '%s' in '%s'\n", __FUNCTION__, m->name, ss); */
+ READCONF_DEBUG fprintf(stderr, "%s: matched '%s' in '%.*s'\n", __FUNCTION__,
+ m->name, (int) Ustrlen(ss)-1, ss);
/* Expand the buffer if necessary */
while (*newlen - m->namelen + m->replen + 1 > big_buffer_size)
/* Expand the buffer if necessary */
while (*newlen - m->namelen + m->replen + 1 > big_buffer_size)
@@
-2423,7
+2427,7
@@
if (!ol)
/* Non-admin callers cannot see options that have been flagged secure by the
"hide" prefix. */
/* Non-admin callers cannot see options that have been flagged secure by the
"hide" prefix. */
-if (!admin_user && ol->type & opt_secure)
+if (!
f.
admin_user && ol->type & opt_secure)
{
if (no_labels)
printf("%s\n", hidden);
{
if (no_labels)
printf("%s\n", hidden);
@@
-2782,7
+2786,7
@@
if (!type)
if (Ustrcmp(name, "config") == 0)
{
if (Ustrcmp(name, "config") == 0)
{
- print_config(admin_user, no_labels);
+ print_config(
f.
admin_user, no_labels);
return TRUE;
}
return TRUE;
}
@@
-2883,7
+2887,7
@@
else if (Ustrcmp(type, "macro") == 0)
{
/* People store passwords in macros and they were previously not available
for printing. So we have an admin_users restriction. */
{
/* People store passwords in macros and they were previously not available
for printing. So we have an admin_users restriction. */
- if (!admin_user)
+ if (!
f.
admin_user)
{
fprintf(stderr, "exim: permission denied\n");
return FALSE;
{
fprintf(stderr, "exim: permission denied\n");
return FALSE;
@@
-3290,7
+3294,7
@@
if (Uchdir("/") < 0)
/* Check the status of the file we have opened, if we have retained root
privileges and the file isn't /dev/null (which *should* be 0666). */
/* Check the status of the file we have opened, if we have retained root
privileges and the file isn't /dev/null (which *should* be 0666). */
-if (trusted_config && Ustrcmp(filename, US"/dev/null"))
+if (
f.
trusted_config && Ustrcmp(filename, US"/dev/null"))
{
if (fstat(fileno(config_file), &statbuf) != 0)
log_write(0, LOG_MAIN|LOG_PANIC_DIE, "failed to stat configuration file %s",
{
if (fstat(fileno(config_file), &statbuf) != 0)
log_write(0, LOG_MAIN|LOG_PANIC_DIE, "failed to stat configuration file %s",
@@
-4416,7
+4420,7
@@
void
readconf_save_config(const uschar *s)
{
save_config_line(string_sprintf("# Exim Configuration (%s)",
readconf_save_config(const uschar *s)
{
save_config_line(string_sprintf("# Exim Configuration (%s)",
- running_in_test_harness ? US"X" : s));
+
f.
running_in_test_harness ? US"X" : s));
}
static void
}
static void