* cosmetic fixes
--HG-- extra : convert_revision : svn%3Aeebe1cee-a9af-4fe4-bd26-ad572b19c5ab/trunk%4051
This commit is contained in:
parent
8bfd77fa13
commit
3ae04902d2
3 changed files with 9 additions and 11 deletions
|
@ -32,7 +32,6 @@
|
||||||
/* ---------------------------------------------------------------- *\
|
/* ---------------------------------------------------------------- *\
|
||||||
includes
|
includes
|
||||||
\* ---------------------------------------------------------------- */
|
\* ---------------------------------------------------------------- */
|
||||||
#include <sys/types.h>
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
@ -50,7 +49,6 @@ enum {
|
||||||
MD5_DIGEST_STRING_LENGTH = (MD5_DIGEST_LENGTH * 2 + 1)
|
MD5_DIGEST_STRING_LENGTH = (MD5_DIGEST_LENGTH * 2 + 1)
|
||||||
};
|
};
|
||||||
|
|
||||||
#include <sys/cdefs.h>
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
u_int32_t state[4]; /* state */
|
u_int32_t state[4]; /* state */
|
||||||
|
|
|
@ -158,7 +158,7 @@ static int alock_auth_pam_auth(const char* pass) {
|
||||||
|
|
||||||
pam_handle_t* pam_handle = NULL;
|
pam_handle_t* pam_handle = NULL;
|
||||||
|
|
||||||
if (!pass || !pwd_entry)
|
if (!pass || strlen(pass) < 1 || !pwd_entry)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
PAM_username = pwd_entry->pw_name;
|
PAM_username = pwd_entry->pw_name;
|
||||||
|
|
|
@ -991,7 +991,7 @@ static int alock_auth_sha2_deinit() {
|
||||||
|
|
||||||
static int alock_auth_sha2_auth(const char* pass) {
|
static int alock_auth_sha2_auth(const char* pass) {
|
||||||
|
|
||||||
if (!pass || !userhash || !method)
|
if (!pass || strlen(pass) < 1 || !userhash || !method)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
switch (method) {
|
switch (method) {
|
||||||
|
|
Reference in a new issue