]> git.ipfire.org Git - thirdparty/shadow.git/commit
chpasswd: fix function problem with -R parameter
authorjuyin <zhuyan34@huawei.com>
Thu, 31 Mar 2022 08:48:52 +0000 (16:48 +0800)
committerSerge Hallyn <serge@hallyn.com>
Mon, 4 Apr 2022 02:07:09 +0000 (21:07 -0500)
commit3732cf72d6f05fcd9d9f301eac84c1a61443e379
tree6dc30e3b9b38295df7b832656985cb649eb83984
parenta026154c6fca7c7e5d6d0723e0cc29d6cd9fa00a
chpasswd: fix function problem with -R parameter

Generating salt value depends on /dev/urandom. But after the
function process_root_flag changed the root directory, It does
not exist.

So, generate salt value before changeing the directory.

Fixes: #514
src/chpasswd.c