Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #16347: o+ sets maps as writable like oo+ #16381

Merged
merged 3 commits into from
Apr 2, 2020

Conversation

kazarmy
Copy link
Contributor

@kazarmy kazarmy commented Mar 31, 2020

Your checklist for this pull request

  • I've read the guidelines for contributing to this repository
  • I made sure to follow the project's coding style
  • I've added tests that prove my fix is effective or that my feature works (if possible)
  • I've updated the documentation and the radare2 book with the relevant information (if needed)

Detailed description

o+ now sets maps as writable like oo+ (dee13ed#diff-9423a86a7236062c0e9fbbf805a079cc). Code is from oo+.

Test plan

Travis and AppVeyor are green with attached test.

Closing issues

Closes #16347.

@github-actions github-actions bot added the command New commands requests, behaviour changes, removal label Mar 31, 2020
@radare radare added this to the 4.4.0 - pangolin milestone Mar 31, 2020
RIOMap *map;
ls_foreach_prev (core->io->maps, iter, map) {
if (map->fd == fd) {
map->perm |= R_PERM_WX;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if the underlying fd doesnt permit W this will not be correct

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok bcbec03 ... btw, tried this with a chmod -w bin and the error actually happened in r_core_file_open(), but the extra check appears harmless

Copy link
Collaborator

@radare radare left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.

@radare radare merged commit 85b11a1 into radareorg:master Apr 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
command New commands requests, behaviour changes, removal
Projects
None yet
Development

Successfully merging this pull request may close these issues.

o+ does not set maps writeable
2 participants