Merge pull request #600 from swick/wip/get-newroot-path
utils: Move get_newroot_path to utils
This commit is contained in:
commit
97468426be
|
@ -946,14 +946,6 @@ drop_privs (bool keep_requested_caps,
|
|||
die_with_error ("can't set dumpable");
|
||||
}
|
||||
|
||||
static char *
|
||||
get_newroot_path (const char *path)
|
||||
{
|
||||
while (*path == '/')
|
||||
path++;
|
||||
return strconcat ("/newroot/", path);
|
||||
}
|
||||
|
||||
static void
|
||||
write_uid_gid_map (uid_t sandbox_uid,
|
||||
uid_t parent_uid,
|
||||
|
|
8
utils.c
8
utils.c
|
@ -823,6 +823,14 @@ get_oldroot_path (const char *path)
|
|||
return strconcat ("/oldroot/", path);
|
||||
}
|
||||
|
||||
char *
|
||||
get_newroot_path (const char *path)
|
||||
{
|
||||
while (*path == '/')
|
||||
path++;
|
||||
return strconcat ("/newroot/", path);
|
||||
}
|
||||
|
||||
int
|
||||
raw_clone (unsigned long flags,
|
||||
void *child_stack)
|
||||
|
|
1
utils.h
1
utils.h
|
@ -121,6 +121,7 @@ void create_pid_socketpair (int sockets[2]);
|
|||
void send_pid_on_socket (int socket);
|
||||
int read_pid_from_socket (int socket);
|
||||
char *get_oldroot_path (const char *path);
|
||||
char *get_newroot_path (const char *path);
|
||||
char *readlink_malloc (const char *pathname);
|
||||
|
||||
/* syscall wrappers */
|
||||
|
|
Loading…
Reference in New Issue
Block a user