mirror of
https://passt.top/passt
synced 2025-06-17 04:35:35 +02:00
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 <david@gibson.dropbear.id.au>
This commit is contained in:
parent
c188736cd8
commit
1392bc5ca0
4 changed files with 51 additions and 25 deletions
2
pasta.h
2
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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue