summaryrefslogtreecommitdiffabout
path: root/src
Side-by-side diff
Diffstat (limited to 'src') (more/less context) (show whitespace changes)
-rw-r--r--src/comp.c10
-rw-r--r--src/meta1parse.c4
2 files changed, 11 insertions, 3 deletions
diff --git a/src/comp.c b/src/comp.c
index 52913ac..851ce5b 100644
--- a/src/comp.c
+++ b/src/comp.c
@@ -661,19 +661,25 @@ component_verify (struct component *comp, grecs_locus_t *locus)
{
/* TRANSLATORS: `wait' is a keywords, do not translate. */
COMPERR (grecs_error, "%s", _("wait is useless in this mode"));
comp->flags &= ~CF_WAIT;
}
- if (comp->mode != pies_comp_exec
- && comp->redir[RETR_OUT].type != redir_null)
+ switch (comp->mode)
+ {
+ case pies_comp_accept:
+ case pies_comp_inetd:
+ if (comp->redir[RETR_OUT].type != redir_null)
{
COMPERR (grecs_error,
"%s", _("stdout redirection invalid in this mode"));
comp->redir[RETR_OUT].type = redir_null;
}
+ default:
+ break;
+ }
for (i = RETR_OUT; i <= RETR_ERR; i++)
{
if (comp->redir[i].type == redir_file
&& comp->redir[i].v.file[0] != '/')
{
diff --git a/src/meta1parse.c b/src/meta1parse.c
index 4b2fccb..528a80a 100644
--- a/src/meta1parse.c
+++ b/src/meta1parse.c
@@ -293,12 +293,14 @@ meta1_translate_node (struct grecs_node *node)
{
struct component *comp;
struct grecs_node *stmt;
size_t len;
int err = 0;
+ if (node->type != grecs_node_block)
+ return 0;
comp = component_create (node->ident);
for (stmt = node->down; stmt; stmt = stmt->next)
{
if (meta1_translate_stmt (stmt, comp))
++err;
}
@@ -306,13 +308,13 @@ meta1_translate_node (struct grecs_node *node)
{
component_free (comp);
return -1;
}
comp->privs.allgroups = 1;
- comp->dir = META1_QUEUE_DIR ();
+ comp->dir = grecs_strdup (META1_QUEUE_DIR ());
comp->redir[RETR_ERR].type = redir_file;
comp->redir[RETR_ERR].v.file = NULL;
len = 0;
grecs_asprintf (&comp->redir[RETR_ERR].v.file, &len,
"%s/%s.log", META1_QUEUE_DIR (), comp->tag);
component_finish (comp, &node->locus);

Return to:

Send suggestions and report system problems to the System administrator.