mirror of
https://github.com/radareorg/radare2.git
synced 2024-12-11 15:04:23 +00:00
Do not exit if pledge fails, just return with disabled sandbox
This commit is contained in:
parent
765fc56ec5
commit
94ec966936
@ -53,7 +53,8 @@
|
||||
#undef MAXCOMLEN /* redefined in zipint.h */
|
||||
#endif
|
||||
|
||||
#if (OpenBSD >= 201605) /* release >= 5.9 */
|
||||
/* release >= 5.9 */
|
||||
#if __OpenBSD__ && OpenBSD >= 201605
|
||||
#define LIBC_HAVE_PLEDGE 1
|
||||
#else
|
||||
#define LIBC_HAVE_PLEDGE 0
|
||||
|
@ -106,7 +106,7 @@ R_API bool r_sandbox_enable (bool e) {
|
||||
#if LIBC_HAVE_PLEDGE
|
||||
if (enabled && pledge ("stdio rpath tty prot_exec", NULL) == -1) {
|
||||
eprintf ("sandbox: pledge call failed\n");
|
||||
exit (1);
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
return enabled;
|
||||
|
Loading…
Reference in New Issue
Block a user