From 1392bc5ca0021821aa5838b6624d6246a3e6f26c Mon Sep 17 00:00:00 2001 From: David Gibson Date: Fri, 26 Aug 2022 14:58:39 +1000 Subject: Allow pasta to take a command to execute When not given an existing PID or network namspace to attach to, pasta spawns a shell. Most commands which can spawn a shell in an altered environment can also run other commands in that same environment, which can be useful in automation. Allow pasta to do the same thing; it can be given an arbitrary command to run in the network and user namespace which pasta creates. If neither a command nor an existing PID or netns to attach to is given, continue to spawn a default shell, as before. Signed-off-by: David Gibson --- pasta.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pasta.h') diff --git a/pasta.h b/pasta.h index 8c80006..19b2e54 100644 --- a/pasta.h +++ b/pasta.h @@ -6,7 +6,7 @@ #ifndef PASTA_H #define PASTA_H -void pasta_start_ns(struct ctx *c); +void pasta_start_ns(struct ctx *c, int argc, char *argv[]); void pasta_ns_conf(struct ctx *c); void pasta_child_handler(int signal); int pasta_netns_quit_init(struct ctx *c); -- cgit v1.2.3