4 * This file contains code which relates to authentication of users to Citadel.
18 * This function needs to get called whenever a PASS or NEWU succeeds
20 void become_logged_in(char *user, char *pass) {
23 strcpy(wc_username, user);
24 strcpy(wc_password, pass);
31 char actual_username[256];
33 if (!strcasecmp(bstr("action"), "Login")) {
34 serv_printf("USER %s", bstr("name"));
37 serv_printf("PASS %s", bstr("pass"));
40 extract(actual_username, &buf[4], 0);
41 become_logged_in(actual_username, bstr("pass"));
47 output_static("frameset.html");
50 printf("HTTP/1.0 200 OK\n");
52 wprintf("<HTML><HEAD><TITLE>Nope</TITLE></HEAD><BODY>\n");
53 wprintf("Your password was not accepted.\n");
54 wprintf("<HR><A HREF=\"/\">Try again</A>\n");
55 wprintf("</BODY></HTML>\n");