session: deny access if password login is disabled
authorFabian Bläse <fabian@blaese.de>
Tue, 17 Mar 2020 15:55:57 +0000 (16:55 +0100)
committerJo-Philipp Wich <jo@mein.io>
Tue, 26 May 2020 14:17:12 +0000 (16:17 +0200)
commit53a0952a4b51408af8856d3a59106bc037ac35bd
tree511912c106392f088d54e4cc841927a1d9691b1b
parent662d0346caada9de6f76d8f2e1e527abae626a84
session: deny access if password login is disabled

The special characters '!' and '*' in /etc/shadow are
used to disable password login for a specific account.

The character 'x' has no special meaning, but should not
be interpreted as an empty password.

However, rpcd did treat these special characters like no
password was set, which allows access even though the account
is disabled.

By removing the additional checks for these characters, the
encrypted password string is passed to crypt, which returns NULL
if the salt has an invalid format and therefore access is denied.

Fixes: FS#2634
Signed-off-by: Fabian Bläse <fabian@blaese.de>
(cherry picked from commit 3df62bcebd2caff47506ccffb42df8d2d2123c06)
session.c