Commit 1fe0412
committed
initrd/gpg: fix passphrase fd leaks and review issues
Replace --passphrase-file with --passphrase-fd 3 3< <(...)
to avoid leaking the PIN value through /proc/<pid>/cmdline
of the child echo/printf process in factory reset, card
identity, and key import commands.
Also fix 6 instances of $? clobbered by intervening
TRACE_FUNC/DEBUG calls. Fix algo_code extraction to
use head -1 against multi-key outputs. Fix STATUS_OK
on public partition mount (only on success). Return
actual hotp_verification error code.
Signed-off-by: Thierry Laurion <insurgo@riseup.net>1 parent b906dc2 commit 1fe0412
1 file changed
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
192 | 192 | | |
193 | 193 | | |
194 | 194 | | |
195 | | - | |
| 195 | + | |
196 | 196 | | |
197 | 197 | | |
198 | 198 | | |
| |||
339 | 339 | | |
340 | 340 | | |
341 | 341 | | |
342 | | - | |
| 342 | + | |
343 | 343 | | |
344 | 344 | | |
345 | 345 | | |
| |||
511 | 511 | | |
512 | 512 | | |
513 | 513 | | |
514 | | - | |
| 514 | + | |
515 | 515 | | |
516 | 516 | | |
517 | 517 | | |
| |||
0 commit comments