Skip permissions check on named pipes

Fixes #7680

Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
This commit is contained in:
Alexandr Morozov 2014-08-22 18:37:37 +04:00
parent c87d9a1de6
commit 07f2e79486
No known key found for this signature in database
GPG key ID: 59BF89FA47378873

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() {