bc4460e916
in ports is unsupported by the icecast folks
41 lines
1.0 KiB
Plaintext
41 lines
1.0 KiB
Plaintext
$OpenBSD: patch-src_utility_c,v 1.2 2003/04/15 18:49:56 avsm Exp $
|
|
--- src/utility.c.orig Wed Apr 10 23:37:34 2002
|
|
+++ src/utility.c Tue Apr 15 19:34:51 2003
|
|
@@ -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);
|
|
@@ -1509,7 +1498,7 @@ next_mount_point ()
|
|
count++;
|
|
}
|
|
|
|
- snprintf (apan, BUFSIZE, "icy_%d", count);
|
|
+ snprintf (apan, sizeof apan, "icy_%d", count);
|
|
|
|
return &apan[0];
|
|
}
|