diff options
Diffstat (limited to 'src/master')
-rw-r--r-- | src/master/master.c | 12 | ||||
-rw-r--r-- | src/master/master_ent.c | 8 |
2 files changed, 12 insertions, 8 deletions
diff --git a/src/master/master.c b/src/master/master.c index 1fc3fe9..b6afe3f 100644 --- a/src/master/master.c +++ b/src/master/master.c @@ -135,13 +135,13 @@ /* The external command to execute when a Postfix daemon program is /* invoked with the -D option. /* .IP "\fBinet_interfaces (all)\fR" -/* The network interface addresses that this mail system receives -/* mail on. -/* .IP "\fBinet_protocols (see 'postconf -d output')\fR" +/* The local network interface addresses that this mail system +/* receives mail on. +/* .IP "\fBinet_protocols (see 'postconf -d' output)\fR" /* The Internet protocols Postfix will attempt to use when making /* or accepting connections. /* .IP "\fBimport_environment (see 'postconf -d' output)\fR" -/* The list of environment parameters that a privileged Postfix +/* The list of environment variables that a privileged Postfix /* process will import from a non-Postfix parent process, or name=value /* environment overrides. /* .IP "\fBmail_owner (postfix)\fR" @@ -495,7 +495,7 @@ int main(int argc, char **argv) vstring_sprintf(lock_path, "%s/%s.pid", DEF_PID_DIR, var_procname); if (test_lock && access(vstring_str(lock_path), F_OK) < 0) exit(0); - lock_fp = open_lock(vstring_str(lock_path), O_RDWR | O_CREAT, 0644, why); + lock_fp = open_lock(vstring_str(lock_path), O_RDWR | O_CREAT, 0600, why); if (test_lock) exit(lock_fp ? 0 : 1); if (lock_fp == 0) @@ -513,7 +513,7 @@ int main(int argc, char **argv) vstring_sprintf(data_lock_path, "%s/%s.lock", var_data_dir, var_procname); set_eugid(var_owner_uid, var_owner_gid); data_lock_fp = - open_lock(vstring_str(data_lock_path), O_RDWR | O_CREAT, 0644, why); + open_lock(vstring_str(data_lock_path), O_RDWR | O_CREAT, 0600, why); set_ugid(getuid(), getgid()); if (data_lock_fp == 0) msg_fatal("open lock file %s: %s", diff --git a/src/master/master_ent.c b/src/master/master_ent.c index 5edc308..98f8404 100644 --- a/src/master/master_ent.c +++ b/src/master/master_ent.c @@ -369,8 +369,12 @@ MASTER_SERV *get_master_ent() } else { MASTER_INET_ADDRLIST(serv) = strcasecmp(saved_interfaces, INET_INTERFACES_ALL) ? - own_inet_addr_list() : /* virtual */ - wildcard_inet_addr_list(); /* wild-card */ + own_inet_addr_list() : /* result can be empty */ + wildcard_inet_addr_list(); /* result can't be empty */ + if (MASTER_INET_ADDRLIST(serv)->used == 0) + fatal_with_context("service definition requires valid" + " host name or address, or non-empty" + " %s setting", VAR_INET_INTERFACES); inet_addr_list_uniq(MASTER_INET_ADDRLIST(serv)); serv->listen_fd_count = MASTER_INET_ADDRLIST(serv)->used; } |