Skip to content

cptbox: compare projected with real instead of normalized - #1002

Open
Riolku wants to merge 1 commit into
DMOJ:masterfrom
Riolku:projected-not-real
Open

cptbox: compare projected with real instead of normalized#1002
Riolku wants to merge 1 commit into
DMOJ:masterfrom
Riolku:projected-not-real

Conversation

@Riolku

@Riolku Riolku commented Feb 28, 2022

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Collaborator

Can one of the admins verify this patch?

@kiritofeng

Copy link
Copy Markdown
Member

ok to test

@Xyene Xyene left a comment

Copy link
Copy Markdown
Member

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

Riolku commented Mar 1, 2022

Copy link
Copy Markdown
Contributor Author

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