X-Git-Url: http://git.indexdata.com/?p=idzebra-moved-to-github.git;a=blobdiff_plain;f=util%2Fpasswddb.c;h=1f1792c67534c84c0ef13d4161382c2e197953e0;hp=f3113be09c5026933b89f6ae79960c5328d32238;hb=36b87ab1076744bf0438799bb375705f535bcb6b;hpb=ac13dceecd5f75669820819575daf88e0add5c8d diff --git a/util/passwddb.c b/util/passwddb.c index f3113be..1f1792c 100644 --- a/util/passwddb.c +++ b/util/passwddb.c @@ -1,5 +1,5 @@ /* This file is part of the Zebra server. - Copyright (C) 1994-2011 Index Data + Copyright (C) Index Data Zebra is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free @@ -57,7 +57,7 @@ Passwd_db passwd_db_open (void) } static int get_entry (const char **p, char *dst, int max) -{ +{ int i = 0; while ((*p)[i] != ':' && (*p)[i]) i++; @@ -109,7 +109,7 @@ void passwd_db_close(Passwd_db db) while (pe) { struct passwd_entry *pe_next = pe->next; - + xfree (pe->name); xfree (pe->des); xfree (pe); @@ -166,7 +166,7 @@ int passwd_db_auth(Passwd_db db, const char *user, const char *pass) if (strcmp (pe->des, pass)) return -2; } - return 0; + return 0; } int passwd_db_file_crypt(Passwd_db db, const char *fname)