Commit Graph

101 Commits

Author SHA1 Message Date
pancake
d2b9ba276f RFile.path() returns NULL if not found ##util
* This helps to simplify the caller's code and reduce logic
2023-06-08 18:44:52 +02:00
Lazula
7528553d16
Return NULL on miss in r_file_path ##util (#21461)
* Lots of R2_590 guards
2023-03-10 21:56:42 +01:00
pancake
c809882f38
Move the bpf plugins ##arch 2023-02-20 12:48:25 +01:00
pancake
699f9d8651 Add lint for ==' to improve code readability 2023-01-16 13:43:38 +01:00
pancake
b8e6b52aac Also replace __UNIX__ with R2__UNIX__ 2022-12-10 20:32:10 +01:00
pancake
97a6439055 Do the same for __WINDOWS__ -> R2__WINDOWS__ 2022-12-10 20:32:10 +01:00
pancake
0b90768931 Rename RStr.home() to RFile.home() as part of the Plan ##api 2022-10-27 16:28:33 +02:00
pancake
c2851a6f46 Use XDG instead of R2_HOME_CACHEDIR and R2_HOME_HISTORY ##core
* Implement and use the new `r_xdg` apis
* Remove R2_HOME_RC, R2_HOME_RC_DIR and R2_HOME_CONFIGDIR
* R2_HOME_THEMES, R2_HOME_ZIGNS R2_HOME_PDB R2_HOME_HUD R2_HOME_BINRC and R2_HOME_BIN
* Disable the bin-specific user scripts
* Massage the help messages and reduce and review all the env vars used
2022-09-29 17:33:21 +02:00
pancake
16cb83a19c Use more tabs and add a (disabled for now) linter for it ##lint 2022-09-23 22:07:49 +02:00
pancake
b6e7292019 Enable linting for trailing tabs ##lint 2022-08-22 23:25:40 +02:00
pancake
41cf0bcf39 Add the 'i<' lint 2022-08-18 10:27:00 +02:00
Richard Patel
b78855c38d Refactor a few eprintf 'Cannot …' to R_LOG_ERROR 2022-08-01 16:46:46 +02:00
pancake
7e84240719 Fix r2pm.sh path resolution issue ##r2pm 2022-07-19 17:30:58 +02:00
pancake
e3c09aa9c6
Build r2 with muon+samu ##ci
* Remove asm.arc leftovers
* Fix r2pm -r return value
2022-07-08 22:44:46 +02:00
pancake
ad1add71cb
Fix a new linting to remove the double error message in RLOG calls ##lint 2022-07-07 20:25:26 +02:00
Richard Patel
363df75c06
Replace some instances of eprintf with R_LOG_ 2022-06-28 02:49:42 +02:00
pancake
4bed905d8a
Fix msvc warnings (#19827) 2022-03-15 19:27:34 +01:00
pancake
d3d0e8f3ec Mark all globals (or most of them) as TLS variables ##core 2022-01-21 17:04:56 +01:00
pancake
a3c4bc388b Add prj.sandbox to enable experimental sandboxed project loading ##projects 2021-12-20 23:20:50 +01:00
pancake
b531513e96
Implement fine grained sandbox control ##security 2021-12-20 14:58:51 +01:00
pancake
2fa1fba5ee Fix system regression 2021-12-17 11:28:03 +01:00
pancake
3aef52cae0 Fix issues in r2pm -i acr and the new compiler checks 2021-12-17 10:26:41 +01:00
pancake
3ad5693518
Initial implementation of r2pm.c ##r2pm 2021-12-16 12:47:40 +01:00
pancake
b545c72017
Better handling of HAVE_SYSTEM, PTY, FORK, DYLINK and THREADS ##build 2021-06-10 13:52:29 +02:00
pancake
8bef6818fd Minor leak fix 2021-03-02 12:36:32 +01:00
pancake
03a096e593
Add r_file_binsh() and avoid hardcoding /bin/sh for Termux ##android (#18409)
Inspired by https://github.com/termux/termux-packages/blob/master/packages/radare2/libr-util-sandbox.c.patch
2021-03-02 11:44:21 +01:00
pancake
1184610971
Fix the CI badge and fully rewrite all the workflows to make sense ##build
* Windows, Linux, Static, macOS, Android, iOS builds published for every commit
* Kept coverage, coverity, fuzzing tests, lgtm and -Werror jobs
* Kill the continuos, the over-engineered matrix and other empty or unnecessary tasks (250 vs 900LOC)
* Jobs TODO: fatmac, termux and rpm (centos) packages
2021-01-12 13:41:21 +01:00
GustavoLCR
f46b1749b3
Fix #17581 - Fix append to file on Windows (#17584)
* Fix append to file on Windows

* Test from @ret2libc
2020-09-03 19:13:42 -03:00
pancake
8efd721dba
Fix Cydia/iOS packaging and compilation issues ##build (#17342) 2020-08-14 13:17:32 +08:00
GustavoLCR
bb3e80c040
Implement pde to disassemble following code execution ##disasm (#17410)
* Implement `pde` to disassemble following code execution
* Fix `asm.filter=1` with `scr.color=0`
* Fix cache not being used
* Share read and write file permissions on Windows
* Use CreateFileW in r_sandbox_open on Windows and fix file permissions
* Fix opening nul and O_RDWR
* File creation flags cannot be combined on Windows
* Share write in r_file_mmap_windows
2020-08-13 10:05:38 +08:00
David CARLIER
ff89101dec
Solaris/Illumos sandbox support ##port (#17407)
Use priv api to remove few privileges to the current process.
2020-08-07 13:01:14 +08:00
pancake
d47aed440a
Fix covs from 2020-06-29 (#17184)
* Fix covs from 2020-06-29

* CIDs: 1293553 1408695 1430058 1430059 1430060
1430061 1430062 1430063 1430064 1430065 1430067

* More fixes

Co-authored-by: pancake <pancake@nopcode.org>
2020-07-01 09:33:38 +08:00
pancake
c706d0b69f
Improve code quality of file and sandbox ##util (#17136)
* Improve code quality of file and sandbox ##util
* Use `r_return_*`
* Read procfiles once

Co-authored-by: pancake <pancake@nopcode.org>
2020-06-29 13:23:02 +08:00
pancake
160fc95e66
Use (void) instead of () in function signatures (#17026) ##refactoring
* Use (void) instead of () in function signatures
* Add test to avoid further contributions to commit the same mistake
2020-06-14 16:08:32 +02:00
Khairul Azhar Kasmiran
1fef151d37
r_cons: Save and restore the active code page on Windows (#16998)
* r_cons: Save and restore the active code page on Windows
* Use r_sys_cmdf() instead
2020-06-03 18:54:55 +08:00
GustavoLCR
2bf97bf570
Fix #16531 - Fix binary file opening permisson in sandbox ##windows (#16722) 2020-04-27 13:28:39 +08:00
pancake
adfaf1aa25 Fix issue in r_file_dump() when appending on unexistent files 2020-04-14 19:19:32 +02:00
radare
bbe6c0e184
Fix #10851 - Solve slurp messages on http/sandbox/pipe ##remote 2019-09-16 14:25:37 +02:00
radare
67fbd0e0d8
Better use of perm/mode names in R_IO ##io (#14615)
* Aim to fix O_BINARY issue in rahash2 on windows
2019-07-23 10:03:33 +02:00
David CARLIER
567d664c8a Expand on FreeBSD>=10 sandbox handling ##core 2019-07-09 10:49:05 +02:00
Anton Kochkov
20e19d6023 More spelling fixes in the code 2019-06-20 13:36:02 +08:00
Riccardo Schirone
66f7403245 Rewrite the RBuffer API to make it safer and adjust the codebase ##refactor (#13656)
* Reimplement r_buf_fread/fwrite
* Add slice buffer and introduce readonly field
* Do nothing if size is 0
* Prevents an overflow when 8 is subtracted from size.
* Fix ragg2 when patching outside currently existing buffer
* Implement r_mem_mmap_resize for systems where mremap is not defined
* r_buf_buffer can be called with no size arg as well
* Use size_t instead of ut64
2019-05-15 15:34:06 +02:00
Anton Kochkov
b858e7e10e Fix #13430 - Kill MinGW remnants ##deprecate 2019-03-31 12:03:07 +02:00
Anton Kochkov
bb67b54f74
Remove CYGWIN & MINGW remnants (#13377) 2019-03-15 12:55:08 +08:00
radare
fa3385d9d6
Alias /dev/null to NUL in Windows ##windows 2019-03-11 22:29:32 +01:00
a1ext
4e8e7de7b4 Fix unicode path issues in Windows ##windows 2018-10-30 01:04:47 +01:00
Neven Sajko
4a722e80d8 Add braces to if, else, for, while ... (#11504) 2018-09-13 10:17:26 +02:00
David CARLIER
fbccf163ac in HTTP server mode, pledge needs to enable inet family function as well in order to function (#10988) 2018-08-08 14:26:22 +08:00
David CARLIER
2fcbb3f562 FreeBSD sandboxing. circumspecting the kernel version (#10335)
in the needed code instead of utils header which
would provoke issue with ptrace and MAXCOMLEN definition.
2018-06-13 13:16:58 +02:00
Paul I
cc90ec6be5 [WIP] Move hardcoded paths to r_userconf.h (#9959)
* Move hardcoded paths to r_userconf.h

* Add R2_HOME_* macros

* Some cleanup
2018-04-28 10:02:55 +02:00