[release/1.2 backport] Fix parseInfoFile does not handle spaces in filenames#3161
Conversation
`/proc/self/mountinfo` uses `\040` for spaces, however, `parseInfoFile()`
did not decode those spaces in paths, therefore attempting to use `\040`
as a literal part of the path.
This patch un-quotes the `root` and `mount point` fields to fix
situations where paths contain spaces.
Note that the `mount source` field is not modified, given that
this field is documented (man `PROC(5)`) as:
filesystem-specific information or "none"
Which I interpreted as "the format in this field is undefined".
Reported-by: Daniil Yaroslavtsev <[email protected]>
Reported-by: Nathan Ringo <[email protected]>
Based-on-patch-by: Diego Becciolini <[email protected]>
Based-on-patch-by: Sergei Utinski <[email protected]>
Signed-off-by: Sebastiaan van Stijn <[email protected]>
(cherry picked from commit c22effb)
Signed-off-by: Sebastiaan van Stijn <[email protected]>
Signed-off-by: Sebastiaan van Stijn <[email protected]> (cherry picked from commit adc4fa2) Signed-off-by: Sebastiaan van Stijn <[email protected]>
|
didn't backport this (yet) to the 1.1 branch, as it depends on (among others) #2324. Wasn't sure how badly we want this for 1.1, with 1.3 already being worked on |
Codecov Report
@@ Coverage Diff @@
## release/1.2 #3161 +/- ##
===============================================
- Coverage 43.76% 43.74% -0.02%
===============================================
Files 101 101
Lines 10738 10743 +5
===============================================
+ Hits 4699 4700 +1
- Misses 5309 5311 +2
- Partials 730 732 +2
Continue to review full report at Codecov.
|
1 similar comment
Codecov Report
@@ Coverage Diff @@
## release/1.2 #3161 +/- ##
===============================================
- Coverage 43.76% 43.74% -0.02%
===============================================
Files 101 101
Lines 10738 10743 +5
===============================================
+ Hits 4699 4700 +1
- Misses 5309 5311 +2
- Partials 730 732 +2
Continue to review full report at Codecov.
|
|
LGTM |
backport of #3159 for the 1.2 branch
equivalent to moby/moby#38977, for containerd
relates to moby/moby#38458
relates to kubernetes/kubernetes#35062
/proc/self/mountinfouses\040for spaces, however,parseInfoFile()did not decode those spaces in paths, therefore attempting to use
\040as a literal part of the path.
This patch un-quotes the
rootandmount pointfields to fixsituations where paths contain spaces.
Note that the
mount sourcefield is not modified, given thatthis field is documented (man
PROC(5)) as:Which I interpreted as "the format in this field is undefined".
Thanks to @remexre for reporting, and @itizir, @sergei-utinski for suggesting the patch.