diff options
author | June McEnroe <june@causal.agency> | 2020-08-27 18:23:58 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2020-08-27 18:23:58 -0400 |
commit | 76f1d0775b52e7a8a1c322214836cde530117512 (patch) | |
tree | 5b0850d4cb7eabaa2c927e02c3bb4055d5237c47 /client.c | |
parent | Remove rc scripts (diff) | |
download | pounce-76f1d0775b52e7a8a1c322214836cde530117512.tar.gz pounce-76f1d0775b52e7a8a1c322214836cde530117512.zip |
Add support for OpenBSD
Diffstat (limited to '')
-rw-r--r-- | client.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/client.c b/client.c index 06efeb8..dcfc835 100644 --- a/client.c +++ b/client.c @@ -166,11 +166,16 @@ static void handlePass(struct Client *client, struct Message *msg) { client->error = true; return; } - if (!strcmp(crypt(msg->params[0], clientPass), clientPass)) { +#ifdef __OpenBSD__ + int error = crypt_checkpass(msg->params[0], clientPass); +#else + int error = strcmp(crypt(msg->params[0], clientPass), clientPass); +#endif + if (error) { + passRequired(client); + } else { client->need &= ~NeedPass; maybeSync(client); - } else { - passRequired(client); } explicit_bzero(msg->params[0], strlen(msg->params[0])); } |