[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Bug#839278: oathtool: has no secure way to provide a key
From: |
Ian Jackson |
Subject: |
Bug#839278: oathtool: has no secure way to provide a key |
Date: |
Sun, 27 Dec 2020 10:54:50 +0000 |
Simon Josefsson writes ("Re: Bug#839278: oathtool: has no secure way to provide
a key"):
> 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.
In a typical terminal session, stdin, stdin and stderr (fds 0-2) all
refer to the same open-file. Ie, the tty was opened O_RDWR and then
the result was dup'd. The O_* flags are properties of the open-file,
not of the descriptor.
Ian.
--
Ian Jackson <ijackson@chiark.greenend.org.uk> These opinions are my own.
Pronouns: they/he. If I emailed you from @fyvzl.net or @evade.org.uk,
that is a private address which bypasses my fierce spamfilter.