logo

checkpassword-ng

Uniform password checking interface for applications
commit: a45df24710e06c515a3d1aef0654e22655d55063
parent c1e6fa9b123d814f881e08b7acea5efdc45e6771
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Mon, 10 May 2021 08:48:09 +0200

Rename chkpw/3 to chkpw_shadow/3

Diffstat:

Mcheckpassword.c4++--
Mchkpw.36+++---
Mchkpw.c2+-
3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/checkpassword.c b/checkpassword.c @@ -64,7 +64,7 @@ main(int argc, char *argv[]) return ERR_MISUSED; } - char *res = chkpw(username, password, NULL); + char *res = chkpw_shadow(username, password, NULL); explicit_bzero(password, sizeof(password)); if(res == CHKPW_VALID) @@ -74,7 +74,7 @@ main(int argc, char *argv[]) } else { - fprintf(stderr, "chkpw: %s\n", res); + fprintf(stderr, "chkpw_shadow: %s\n", res); return ERR_INVALID; } diff --git a/chkpw.3 b/chkpw.3 @@ -10,13 +10,13 @@ .In chkpw.h .Vt extern struct chkpw_extra; .Ft char * -.Fo chkpw +.Fo chkpw_shadow .Fa "const char *username" .Fa "const char *password" .Fa "struct chkpw_extra" .Fc .Sh DESCRIPTION -.Fn chkpw +.Fn chkpw_shadow will verify .Va password against @@ -32,7 +32,7 @@ for others they should consider using .Xr checkpassword 8 which doesn't requires your application to be running with special privileges. .Sh RETURN VALUES -.Fn chkpw +.Fn chkpw_shadow returns .Aq NULL on success, on failure it returns an error message to be passed to the user. diff --git a/chkpw.c b/chkpw.c @@ -37,7 +37,7 @@ safe_strerror(char *desc, int errnum) } char * -chkpw(const char *username, const char *password, struct chkpw_extra *chkpw_extra) +chkpw_shadow(const char *username, const char *password, struct chkpw_extra *chkpw_extra) { (void)chkpw_extra; char *pw_hash = "";