Skip to content

Commit

Permalink
sandbox fix path
Browse files Browse the repository at this point in the history
  • Loading branch information
sulincix committed Aug 14, 2024
1 parent 2c819b1 commit 0f66311
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/ccode/sandbox.c
Original file line number Diff line number Diff line change
Expand Up @@ -138,9 +138,14 @@ gint sandbox(const gchar* type, gchar** args, gint length){
token = strtok(NULL,":");
}
token = strtok(sandbox_tmpfs,":");
char* target = NULL;
while(token != NULL){
sandbox_create_tmpfs(token);
target = calloc((strlen(token)+15), sizeof(char));
strcpy(target,"/tmp/ymp-root/");
strcat(target,token);
sandbox_create_tmpfs(target);
token = strtok(NULL,":");
free(target);
}
write_to_file("/tmp/ymp-root/.sandbox", "%d",getpid());
if (0 == chroot("/tmp/ymp-root")){
Expand Down

0 comments on commit 0f66311

Please sign in to comment.