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, char *serv_response) {
22 extract(wc_username, &serv_response[4], 0);
23 strcpy(wc_password, pass);
24 axlevel = extract_int(&serv_response[4], 1);
25 if (axlevel >=6) is_aide = 1;
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 become_logged_in(bstr("name"),
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");
62 printf("HTTP/1.0 200 OK\n");
64 wprintf("<HTML><BODY>\n");
65 wprintf("<CENTER><H1>");
68 /* other stuff here */
69 wprintf("</BODY></HTML>\n");