Skip to content

Conversation

@Riolku
Copy link
Contributor

@Riolku Riolku commented Feb 28, 2022

We should compare projected with real instead of normalized. This is because if our file is /proc/self/maps, the projected will be /proc/getpid()/maps, and the real path is /proc/getpid()/maps. We do a useless os.samefile call in this case.

We should compare `projected` with `real` instead of `normalized`. This 
is because if our file is `/proc/self/maps`, the projected will be 
`/proc/getpid()/maps`, and the real path is `/proc/getpid()/maps`. We do 
a useless `os.samefile` call in this case.
@dmoj-build
Copy link
Collaborator

Can one of the admins verify this patch?

@kiritofeng
Copy link
Member

ok to test

Copy link
Member

@Xyene Xyene left a comment

Choose a reason for hiding this comment

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

This makes the normalized computation dead code.

@Riolku
Copy link
Contributor Author

Riolku commented Mar 1, 2022

Not true. The jail still needs to check normalized and not projected.

@Xyene Xyene requested a review from quantum5 March 11, 2022 05:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants