[hackers] [ubase] util/passwd.c: check errno only if spw is NULL || Hiltjo Posthuma

From: <git_AT_suckless.org>
Date: Wed, 09 Jul 2014 16:07:24 +0200

commit 528f10be6c3f38fdb99193e8fff1e810c5ccb1c5
Author: Hiltjo Posthuma <hiltjo_AT_codemadness.org>
Date: Wed Jul 9 14:08:09 2014 +0000

    util/passwd.c: check errno only if spw is NULL
    
    this is more reliable. there is a difference between glibc and musl
    errno if /etc/tcb/<name>/shadow doesn't exist.

diff --git a/util/passwd.c b/util/passwd.c
index 2d91763..d805955 100644
--- a/util/passwd.c
+++ b/util/passwd.c
_AT_@ -38,11 +38,11 @@ pw_check(struct passwd *pw, const char *pass)
         if (pw->pw_passwd[0] == 'x' && pw->pw_passwd[1] == '
Received on Wed Jul 09 2014 - 16:07:24 CEST

This archive was generated by hypermail 2.3.0 : Wed Jul 09 2014 - 16:12:07 CEST