Skip permissions check on named pipes

Fixes #7680

Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
Upstream-commit: 07f2e794867030c755901ae5479df03e3c4ce189
Component: engine
This commit is contained in:
Alexandr Morozov
2014-08-25 22:59:53 +04:00
parent b6a88dc489
commit cb2b33e883
+3 -2
View File
@@ -642,9 +642,10 @@ func ValidateContextDirectory(srcPath string, excludes []string) error {
return err
}
// skip checking if symlinks point to non-existing files, such symlinks can be useful
// also skip named pipes, because they hanging on open
lstat, _ := os.Lstat(filePath)
if lstat.Mode()&os.ModeSymlink == os.ModeSymlink {
return err
if lstat.Mode()&(os.ModeSymlink|os.ModeNamedPipe) != 0 {
return nil
}
if !f.IsDir() {