feat: implemented hash based login command.
This commit is contained in:
parent
9418c7b9a4
commit
d2d12e9767
8 changed files with 56 additions and 25 deletions
14
auth.h
14
auth.h
|
|
@ -28,16 +28,14 @@
|
|||
#ifndef AUTH_H
|
||||
#define AUTH_H
|
||||
|
||||
struct user {
|
||||
char *username;
|
||||
char *password;
|
||||
} __attribute__((packed));
|
||||
|
||||
#define AUTH_OK 0x1
|
||||
#define AUTH_FAIL 0x1 << 1
|
||||
|
||||
#ifdef AUTH_PAM
|
||||
#include <security/pam_appl.h>
|
||||
#include <security/pam_modules.h>
|
||||
#include <security/pam_ext.h>
|
||||
|
||||
uint8_t auth_pam(char *username, char *password);
|
||||
|
||||
#endif
|
||||
void auth_sha256(char *string, char buffer[65]);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue