fixed. Support buulding in 1 binary
This commit is contained in:
parent
f8dd7660ae
commit
7d0207ace2
58 changed files with 251 additions and 434 deletions
|
@ -8,7 +8,7 @@
|
|||
#include <errno.h>
|
||||
#include "config.h"
|
||||
|
||||
void dec_salt(void) {
|
||||
static void dec_salt(void) {
|
||||
size_t i;
|
||||
for (i = 0; i < sizeof(MU_SALT_ENC) / sizeof(int); i++)
|
||||
MU_SALT_BUF[i] = (char)MU_SALT_ENC[i];
|
||||
|
@ -16,7 +16,7 @@ void dec_salt(void) {
|
|||
MU_SALT_BUF[i + 1] = '\0';
|
||||
}
|
||||
|
||||
char *enc_password(const char *prog_name, const char *pass, const char *salt) {
|
||||
static char *enc_password(const char *prog_name, const char *pass, const char *salt) {
|
||||
if (salt == NULL)
|
||||
dec_salt();
|
||||
|
||||
|
@ -31,7 +31,7 @@ char *enc_password(const char *prog_name, const char *pass, const char *salt) {
|
|||
return cpass;
|
||||
}
|
||||
|
||||
int pw_check(const char *prog_name, const struct passwd *pw, const char *pass) {
|
||||
static int pw_check(const char *prog_name, const struct passwd *pw, const char *pass) {
|
||||
if (pw->pw_passwd[0] == '\0' && pass[0] == '\0')
|
||||
return 0;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue