mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-01-23 02:14:37 +00:00
util: add ability to execute programs in a specified userns
It's required for dumping tmpfs, where we use tar to save content. If we need to execute tar from a proper userns to get right uid-s and gid-s for files. Signed-off-by: Andrey Vagin <avagin@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
parent
9a8ca1cfff
commit
011231af3b
2 changed files with 18 additions and 0 deletions
|
|
@ -170,6 +170,8 @@ extern void *shmalloc(size_t bytes);
|
|||
extern void shfree_last(void *ptr);
|
||||
|
||||
extern int cr_system(int in, int out, int err, char *cmd, char *const argv[]);
|
||||
extern int cr_system_userns(int in, int out, int err, char *cmd,
|
||||
char *const argv[], int userns_pid);
|
||||
extern int cr_daemon(int nochdir, int noclose, int *keep_fd, int close_fd);
|
||||
extern int is_root_user(void);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue