| 123456789101112131415161718192021222324252627 |
- #include "sandbox.h"
- #include <stdlib.h>
- #include <string.h>
- void sandbox_apply(struct s_sandboxenv *env)
- {
- apply_fs(env);
- }
- void prompt_sandbox(struct s_sandboxenv *env)
- {
- char *c = NULL;
- size_t size;
- do
- {
- if (c)
- free(c);
- c = NULL;
- printf("Apply (a) / Cancel (c) changes ?\n");
- getline(&c, &size, stdin);
- } while (strcmp("a\n", c) && strcmp("c\n", c));
- if (*c == 'c')
- return;
- sandbox_apply(env);
- }
|