forked from security/hakurei
internal/app/spcontainer: check fs init behaviour
This covers every statement. Some of them are unreachable unless the kernel returns garbage. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -252,14 +252,7 @@ func (s *spFilesystemOp) toSystem(state *outcomeStateSys) error {
|
||||
for i, ok := range hidePathMatch {
|
||||
if ok {
|
||||
if a, err := check.NewAbs(hidePaths[i]); err != nil {
|
||||
var absoluteError *check.AbsoluteError
|
||||
if !errors.As(err, &absoluteError) {
|
||||
return newWithMessageError(absoluteError.Error(), absoluteError)
|
||||
}
|
||||
if absoluteError == nil {
|
||||
return newWithMessage("impossible path checking state reached")
|
||||
}
|
||||
return newWithMessage("invalid path hiding candidate " + strconv.Quote(absoluteError.Pathname))
|
||||
return newWithMessage("invalid path hiding candidate " + strconv.Quote(hidePaths[i]))
|
||||
} else {
|
||||
s.HidePaths = append(s.HidePaths, a)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user