Selaa lähdekoodia

Skip permissions check on named pipes

Fixes #7680

Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com>
Alexandr Morozov 11 vuotta sitten
vanhempi
commit
07f2e79486
1 muutettua tiedostoa jossa 3 lisäystä ja 2 poistoa
  1. 3 2
      utils/utils.go

+ 3 - 2
utils/utils.go

@@ -642,9 +642,10 @@ func ValidateContextDirectory(srcPath string, excludes []string) error {
 			return err
 			return err
 		}
 		}
 		// skip checking if symlinks point to non-existing files, such symlinks can be useful
 		// 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)
 		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() {
 		if !f.IsDir() {