mirror of git://git.suckless.org/sbase
Add password cipher type in config.def.h - default to SHA-512
This commit is contained in:
parent
ed5167e2c1
commit
5eeef920f0
|
@ -2,3 +2,4 @@
|
|||
|
||||
#define ENV_SUPATH "/bin"
|
||||
#define ENV_PATH "/bin"
|
||||
#define PW_CIPHER "$6$"
|
||||
|
|
5
passwd.c
5
passwd.c
|
@ -9,6 +9,7 @@
|
|||
#include <sys/stat.h>
|
||||
#include <sys/types.h>
|
||||
#include <unistd.h>
|
||||
#include "config.h"
|
||||
#include "passwd.h"
|
||||
#include "util.h"
|
||||
|
||||
|
@ -53,14 +54,14 @@ main(int argc, char *argv[])
|
|||
if (pw->pw_passwd[0] == '!' ||
|
||||
pw->pw_passwd[0] == '*' ||
|
||||
pw->pw_passwd[0] == '\0')
|
||||
pw->pw_passwd = "$6$";
|
||||
pw->pw_passwd = PW_CIPHER;
|
||||
goto newpass;
|
||||
} else {
|
||||
if (pw->pw_passwd[0] == '!' ||
|
||||
pw->pw_passwd[0] == '*')
|
||||
eprintf("denied\n");
|
||||
if (pw->pw_passwd[0] == '\0') {
|
||||
pw->pw_passwd = "$6$";
|
||||
pw->pw_passwd = PW_CIPHER;
|
||||
goto newpass;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue