| … | |
… | |
| 666 | exit(1); |
666 | exit(1); |
| 667 | } |
667 | } |
| 668 | |
668 | |
| 669 | setenv(ENV_SANDBOX_DIR, sandbox_dir, 1); |
669 | setenv(ENV_SANDBOX_DIR, sandbox_dir, 1); |
| 670 | setenv(ENV_SANDBOX_LIB, sandbox_lib, 1); |
670 | setenv(ENV_SANDBOX_LIB, sandbox_lib, 1); |
|
|
671 | setenv(ENV_SANDBOX_BASHRC, sandbox_rc, 1); |
| 671 | setenv("LD_PRELOAD", sandbox_lib, 1); |
672 | setenv("LD_PRELOAD", sandbox_lib, 1); |
| 672 | |
673 | |
| 673 | if (!getenv(ENV_SANDBOX_DENY)) |
674 | if (!getenv(ENV_SANDBOX_DENY)) |
| 674 | setenv(ENV_SANDBOX_DENY, LD_PRELOAD_FILE, 1); |
675 | setenv(ENV_SANDBOX_DENY, LD_PRELOAD_FILE, 1); |
| 675 | |
676 | |