1
0
Fork 0
forked from soccera/rdo

Make the hashing failure error message more descriptive

This error occurs when the user we try to hash the password for doesn't
have a password, as seen in #8.

We now mention this, to avoid future confusion.
This commit is contained in:
sw1tchbl4d3 2022-02-12 08:07:48 +01:00
parent 8c0e7560ba
commit cfa1b3b10f

2
rdo.c
View file

@ -107,7 +107,7 @@ int main(int argc, char** argv) {
memset(password, 0, sizeof(password)); memset(password, 0, sizeof(password));
if (!hashed_pw) if (!hashed_pw)
err(1, "Could not hash password"); errx(1, "Could not hash password, does your user have a password?");
if (strcmp(shadowEntry->sp_pwdp, hashed_pw) == 0) { if (strcmp(shadowEntry->sp_pwdp, hashed_pw) == 0) {
setsession(getppid(), ts_ttl); setsession(getppid(), ts_ttl);