From 7657d349adae01f0fa31b277f06778f23632ecd1 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Mon, 29 Oct 2007 09:23:08 +0000 Subject: [PATCH] Fixed bug #1820: Omitted password crashes Zebra in some cases. --- util/passwddb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/util/passwddb.c b/util/passwddb.c index f1e9f26..0c57801 100644 --- a/util/passwddb.c +++ b/util/passwddb.c @@ -1,4 +1,4 @@ -/* $Id: passwddb.c,v 1.17 2007-10-29 08:19:39 adam Exp $ +/* $Id: passwddb.c,v 1.18 2007-10-29 09:23:08 adam Exp $ Copyright (C) 1995-2007 Index Data ApS @@ -135,6 +135,8 @@ int passwd_db_auth(Passwd_db db, const char *user, const char *pass) break; if (!pe) return -1; + if (!pass) + return -2; if (pe->encrypt_flag) { #if HAVE_CRYPT_H @@ -142,8 +144,6 @@ int passwd_db_auth(Passwd_db db, const char *user, const char *pass) assert(pe->des); if (strlen (pe->des) < 3) return -3; - if (!pass) - return -2; if (pe->des[0] != '$') /* Not MD5? (assume DES) */ { -- 1.7.10.4