You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// using unsafeHostProcRoot() then an attaker could change this after we
364
364
// did this check.)
365
365
ifexpectedMountID!=gotMountID {
366
-
returnfmt.Errorf("%w: symlink %s/%s has an overmount obscuring the real link (mount ids do not match %d != %d)", errUnsafeProcfs, dir.Name(), path, expectedMountID, gotMountID)
366
+
returnfmt.Errorf("%w: subpath %s/%s has an overmount obscuring the real link (mount ids do not match %d != %d)", errUnsafeProcfs, dir.Name(), path, expectedMountID, gotMountID)
deferprocExe.Close() //nolint:errcheck // test code
161
161
162
162
// no overmount
163
-
err=checkSymlinkOvermount(procRoot, procCwd, "")
163
+
err=checkSubpathOvermount(procRoot, procCwd, "")
164
164
assert.NoError(t, err, "checking /proc/self/cwd with no overmount should succeed") //nolint:testifylint // this is an isolated operation so we can continue despite an error
assert.NoError(t, err, "checking /proc/self/cwd with no overmount should succeed") //nolint:testifylint // this is an isolated operation so we can continue despite an error
167
167
// basic overmount
168
-
err=checkSymlinkOvermount(procRoot, procExe, "")
168
+
err=checkSubpathOvermount(procRoot, procExe, "")
169
169
assert.ErrorIs(t, err, symlinkOvermountErr, "unexpected /proc/self/exe overmount result") //nolint:testifylint // this is an isolated operation so we can continue despite an error
assert.ErrorIs(t, err, symlinkOvermountErr, "unexpected /proc/self/exe overmount result") //nolint:testifylint // this is an isolated operation so we can continue despite an error
0 commit comments