* cosmetic fixes

--HG--
extra : convert_revision : svn%3Aeebe1cee-a9af-4fe4-bd26-ad572b19c5ab/trunk%4051
This commit is contained in:
mathias 2006-09-19 20:00:49 +00:00
parent 8bfd77fa13
commit 3ae04902d2
3 changed files with 9 additions and 11 deletions

View file

@ -32,7 +32,6 @@
/* ---------------------------------------------------------------- *\
includes
\* ---------------------------------------------------------------- */
#include <sys/types.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@ -50,7 +49,6 @@ enum {
MD5_DIGEST_STRING_LENGTH = (MD5_DIGEST_LENGTH * 2 + 1)
};
#include <sys/cdefs.h>
typedef struct {
u_int32_t state[4]; /* state */

View file

@ -158,7 +158,7 @@ static int alock_auth_pam_auth(const char* pass) {
pam_handle_t* pam_handle = NULL;
if (!pass || !pwd_entry)
if (!pass || strlen(pass) < 1 || !pwd_entry)
return 0;
PAM_username = pwd_entry->pw_name;

View file

@ -991,7 +991,7 @@ static int alock_auth_sha2_deinit() {
static int alock_auth_sha2_auth(const char* pass) {
if (!pass || !userhash || !method)
if (!pass || strlen(pass) < 1 || !userhash || !method)
return 0;
switch (method) {