shared/{user,group}-record-nss: adjust filtering of "valid" passwords
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 28 Aug 2020 14:23:16 +0000 (16:23 +0200)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 2 Sep 2020 08:58:34 +0000 (10:58 +0200)
commitaee20dfbd8e286b1e20290ef070cf1061d79f8c7
tree8ed714227094ab12b109cc5911df6c20e41002ff
parent5933d77afe2c15283f696ad2a7a44a2643cd8c69
shared/{user,group}-record-nss: adjust filtering of "valid" passwords

We would reject various passwords that glibc accepts, for example ""
or any descrypted password. Accounts with empty password are definitely
useful, for example for testing or in scenarios where a password is not
needed. Also, using weak encryption methods is probably not a good idea,
it's not the job of our nss helpers to decide that: they should just
faithfully forward whatever data is there.

Also rename the function to make it more obvious that the returned answer
is not in any way certain.

(cherry picked from commit 8f796e40a561bd9200fde3c8885e6255a2dd4250)
src/shared/group-record-nss.c
src/shared/libcrypt-util.c
src/shared/libcrypt-util.h
src/shared/user-record-nss.c