tags 839278 +upstream tags 839278 +fixed-upstream tags 839278 +confirmed thanks
Ian Jackson <[email protected]> writes: >> If someone wants to add support for reading from a numbered file >> descriptor, I'm happy to merge that -- how about '*42'? Just don't pick >> a character that is in the base64 alphabet (right now only hex and >> base32 are supported, but maybe base64 support will be added in the >> future). The '*' character would work. Is this useful though? > > On many operating systems @/dev/fd/N would work nicely. Indeed! This appears to work: jas@latte:~/src/oath-toolkit$ echo 00 | oathtool/oathtool @/dev/stdin 328482 jas@latte:~/src/oath-toolkit$ echo 00 | oathtool/oathtool @/dev/fd/0 328482 jas@latte:~/src/oath-toolkit$ I am confused why this works though: jas@latte:~/src/oath-toolkit$ oathtool/oathtool @/dev/fd/1 00 <-- I type `00 RET' in the terminal 328482 jas@latte:~/src/oath-toolkit$ oathtool/oathtool @/dev/fd/2 00 <-- I type `00 RET' in the terminal 328482 jas@latte:~/src/oath-toolkit$ Thoughts? Reading from stdout or stderr seems weird, but I don't know what to expect. For what it's worth, `cat' behaves the same. As expected non-open file descriptors yield an error: jas@latte:~/src/oath-toolkit$ oathtool/oathtool @/dev/fd/3 oathtool: open file for KEY/OTP: No such file or directory jas@latte:~/src/oath-toolkit$ /Simon
signature.asc
Description: PGP signature
