]> git.ipfire.org Git - thirdparty/grub.git/commit
unix: do not close stdin in grub_passwd_get
authorAndrei Borzenkov <arvidjaar@gmail.com>
Wed, 18 Nov 2015 19:23:58 +0000 (22:23 +0300)
committerAndrei Borzenkov <arvidjaar@gmail.com>
Wed, 18 Nov 2015 19:23:58 +0000 (22:23 +0300)
commit6a46cbcc5c1c746562fd7181bf0f2337db065201
tree21f85b497c430402c2199493bd7a2785c6f6945e
parent50d6f38febe80d4d3088dae1ee639b341787ab71
unix: do not close stdin in grub_passwd_get

This makes it impossible to read from stdin without controlling tty:

10:/mnt # echo -e passwd\\npasswd | setsid ./grub-mkpasswd-pbkdf2
Enter password:
Reenter password: ./grub-mkpasswd-pbkdf2: error: failure to read password.
10:/mnt
grub-core/osdep/unix/password.c