mirror of
https://gitlab.com/openconnect/ocserv.git
synced 2026-02-10 08:46:58 +08:00
ocpasswd: attempt to use sha2crypt only in glibc
uclibc's crypt(3) is so dumb it will not error if $5$ is specified as salt, but not supported.
This commit is contained in:
@@ -69,7 +69,11 @@ crypt_int(const char *fpasswd, const char *username, const char *groupname,
|
||||
exit(1);
|
||||
}
|
||||
|
||||
#ifdef TRY_SHA2_CRYPT
|
||||
strcpy(salt, "$5$");
|
||||
#else
|
||||
strcpy(salt, "$1$");
|
||||
#endif
|
||||
p = salt + 3;
|
||||
|
||||
for (i = 0; i < sizeof(_salt); i++) {
|
||||
|
||||
Reference in New Issue
Block a user