Subject: Work around /dev/fd/ no longer being created by systemd Author: Christoph Biedl Date: 2020-05-21 Bug: https://github.com/latchset/clevis/issues/262 Bug-Debian: https://bugs.debian.org/968518 --- a/src/clevis-decrypt +++ b/src/clevis-decrypt @@ -46,7 +46,8 @@ exit 1 fi - exec "$cmd" < <(echo -n "$hdr."; /bin/cat) + (echo -n "$hdr."; /bin/cat) | "$cmd" + exit $? fi exec >&2 --- a/src/pins/tang/clevis-decrypt-tang +++ b/src/pins/tang/clevis-decrypt-tang @@ -88,4 +88,5 @@ tmp="$(jose jwk exc -i '{"alg":"ECMR"}' -l- -r- <<< "$eph$srv")" rep="$(jose jwk pub -i- <<< "$rep")" jwk="$(jose jwk exc -l- -r- <<< "$rep$tmp")" -exec jose jwe dec -k- -i- < <(echo -n "$jwk$hdr."; /bin/cat) +(echo -n "$jwk$hdr."; /bin/cat) | jose jwe dec -k- -i- +exit $? --- a/src/pins/tpm2/clevis-decrypt-tpm2 +++ b/src/pins/tpm2/clevis-decrypt-tpm2 @@ -169,4 +169,5 @@ # directory at this point. [ -d "${TMP}" ] && rm -rf "${TMP}" -exec jose jwe dec -k- -i- < <(echo -n "$jwk$hdr."; /bin/cat) +(echo -n "$jwk$hdr."; /bin/cat) | jose jwe dec -k- -i- +exit $?