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

cptbox: compare projected with real instead of normalized #1002

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

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.

None yet

4 participants