]> git.ipfire.org Git - thirdparty/systemd.git/commit
[import] fix stdin/stdout pipe behavior in import/export tar/raw
authorAnita Zhang <the.anitazha@gmail.com>
Tue, 17 Dec 2019 09:08:04 +0000 (01:08 -0800)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 17 Dec 2019 14:14:53 +0000 (23:14 +0900)
commit1209ef94bd09bdc67a7b51f084910a5982f2f010
tree394c941daef8aba42d761cd622ec84a0871208f2
parent4d92039fceed9645abdd1dc1b4e4d9aa47429b4d
[import] fix stdin/stdout pipe behavior in import/export tar/raw

The code existed in machinectl to use stdin/stdout if the path for
import/export tar/raw was empty or dash (-) but a check to
`fd_verify_regular` in importd prevented it from working.

Update the check instead to explicitly check for regular file or
pipe/fifo.

Fixes #14346
src/import/importd.c
test/TEST-25-IMPORT/testsuite.sh