summaryrefslogtreecommitdiffabout
path: root/src
Side-by-side diff
Diffstat (limited to 'src') (more/less context) (ignore whitespace changes)
-rw-r--r--src/comp.c18
-rw-r--r--src/meta1parse.c6
2 files changed, 16 insertions, 8 deletions
diff --git a/src/comp.c b/src/comp.c
index 52913ac..851ce5b 100644
--- a/src/comp.c
+++ b/src/comp.c
@@ -663,13 +663,19 @@ component_verify (struct component *comp, grecs_locus_t *locus)
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)
{
- COMPERR (grecs_error,
- "%s", _("stdout redirection invalid in this mode"));
- comp->redir[RETR_OUT].type = redir_null;
+ 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++)
diff --git a/src/meta1parse.c b/src/meta1parse.c
index 4b2fccb..528a80a 100644
--- a/src/meta1parse.c
+++ b/src/meta1parse.c
@@ -295,7 +295,9 @@ meta1_translate_node (struct grecs_node *node)
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)
{
@@ -309,7 +311,7 @@ meta1_translate_node (struct grecs_node *node)
}
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;

Return to:

Send suggestions and report system problems to the System administrator.