openbsd-ports/net/icecast/patches/patch-src_utility_c
fgsch 836b1485e4 Remove icepass; use encrypt(1) instead.
Regen patches and bump version.
2001-03-06 06:52:40 +00:00

32 lines
857 B
Plaintext

$OpenBSD: patch-src_utility_c,v 1.1 2001/03/06 06:52:42 fgsch Exp $
--- src/utility.c.orig Wed Jul 5 16:52:40 2000
+++ src/utility.c Tue Mar 6 03:23:41 2001
@@ -102,7 +102,6 @@ int password_match(const char *crypted,
return 0;
#else
- char salt[3];
char *test_crypted;
extern char *crypt(const char *, const char *);
@@ -111,18 +110,8 @@ int password_match(const char *crypted,
return 0;
}
- if (ice_strncmp(crypted, "$1$", 3)) {
- salt[0] = crypted[0];
- salt[1] = crypted[1];
- } else {
- salt[0] = crypted[3];
- salt[1] = crypted[4];
- }
-
- salt[2] = '\0';
-
thread_mutex_lock(&info.misc_mutex);
- test_crypted = crypt(uncrypted, salt);
+ test_crypted = crypt(uncrypted, crypted);
if (test_crypted == NULL) {
write_log(LOG_DEFAULT, "WARNING - crypt() failed, refusing access");
thread_mutex_unlock(&info.misc_mutex);