aboutsummaryrefslogtreecommitdiffstats
path: root/FICS
diff options
context:
space:
mode:
Diffstat (limited to 'FICS')
-rw-r--r--FICS/command.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/FICS/command.c b/FICS/command.c
index 5ee2f46..84f79c2 100644
--- a/FICS/command.c
+++ b/FICS/command.c
@@ -660,7 +660,7 @@ check_news(int p, int admin)
PRIVATE int
process_password(int p, char *password)
{
- char salt[3];
+ char salt[6];
int dummy; // to hold a return value
int fd;
int messnum;
@@ -670,9 +670,12 @@ process_password(int p, char *password)
turn_echo_on(parray[p].socket);
if (parray[p].passwd && parray[p].registered) {
- salt[0] = parray[p].passwd[0];
- salt[1] = parray[p].passwd[1];
- salt[2] = '\0';
+ salt[0] = '$';
+ salt[1] = '1';
+ salt[2] = '$';
+ salt[3] = parray[p].passwd[0];
+ salt[4] = parray[p].passwd[1];
+ salt[5] = '\0';
if (strcmp(crypt(password, salt), parray[p].passwd)) {
fd = parray[p].socket;