Andrew Geissler | 87f5cff | 2022-09-30 13:13:31 -0500 | [diff] [blame] | 1 | Calling openat() on a fifo causes a pseudo hang for us (e.g. the fifo in psplash). |
| 2 | Avoid calling openat for fifos. |
| 3 | |
| 4 | Introduced upstream with: |
| 5 | |
| 6 | https://github.com/rpm-software-management/rpm/commit/96ec957e281220f8e137a2d5eb23b83a6377d556 |
| 7 | |
| 8 | Upstream-Status: Submitted [https://github.com/rpm-software-management/rpm/issues/2195] |
| 9 | |
| 10 | Index: git/lib/fsm.c |
| 11 | =================================================================== |
| 12 | --- git.orig/lib/fsm.c |
| 13 | +++ git/lib/fsm.c |
| 14 | @@ -1010,7 +1010,7 @@ int rpmPackageFilesInstall(rpmts ts, rpm |
| 15 | rc = RPMERR_UNKNOWN_FILETYPE; |
| 16 | } |
| 17 | |
| 18 | - if (!rc && fd == -1 && !S_ISLNK(fp->sb.st_mode)) { |
| 19 | + if (!rc && fd == -1 && !S_ISLNK(fp->sb.st_mode) && !S_ISFIFO(fp->sb.st_mode)) { |
| 20 | /* Only follow safe symlinks, and never on temporary files */ |
| 21 | fd = fsmOpenat(di.dirfd, fp->fpath, |
| 22 | fp->suffix ? AT_SYMLINK_NOFOLLOW : 0, 0); |