|
@@ -526,6 +526,17 @@ kexec_t *ksession_parse_for_exec(ksession_t *session, const char *raw_line,
|
|
|
// Components after pipe "|"
|
|
|
} else {
|
|
|
|
|
|
+ // Only the first component can be non-filter
|
|
|
+ if (!kentry_filter(kpargv_command(pargv))) {
|
|
|
+ faux_error_sprintf(error, "The non-filter command \"%s\" "
|
|
|
+ "can't be destination of pipe",
|
|
|
+ kentry_name(kpargv_command(pargv)));
|
|
|
+ kpargv_free(pargv);
|
|
|
+ kexec_free(exec);
|
|
|
+ faux_list_free(split);
|
|
|
+ return NULL;
|
|
|
+ }
|
|
|
+
|
|
|
// Only the first component can have 'restore=true' attribute
|
|
|
if (kentry_restore(kpargv_command(pargv))) {
|
|
|
faux_error_sprintf(error, "The command \"%s\" "
|