I added an auto-login 'guest' account to webcit a while back for my own
use. All I did was add two lines to webcit.c. Works
fine. I realize it's just in webcit and not citadel. I gave
the guest user a level of 3, so they could only post to local rooms but
could read most rooms:
* If this isn't a GroupDAV session, it's an ordinary browser
* connecting to the user interface. Only allow GET and POST
* methods.
*/
if ((strcasecmp(method, "GET")) && (strcasecmp(method, "POST"))) {
wprintf("HTTP/1.1 405 Method Not Allowed\r\n");
groupdav_common_headers();
wprintf("Content-Length: 0\r\n\r\n");
goto SKIP_ALL_THIS_CRAP;
}
/*
* If we're not logged in, but we have username and password cookies
* supplied by the browser, try using them to log in.
*/
/* ADDED BY RTM */
sprintf(c_username,"guest");
sprintf(c_password,"guest");
/* DONE ADDITION */
if ((!WC->logged_in)
&& (strlen(c_username) > 0)
&& (strlen(c_password) > 0)) {
serv_printf("USER %s", c_username);
serv_getln(buf, sizeof buf);
if (buf[0] == '3') {
serv_printf("PASS %s", c_password);
serv_getln(buf, sizeof buf);
if (buf[0] == '2') {
become_logged_in(c_username, c_password, buf);
}
}
}
/*
* If we don't have a current room, but a cookie specifying the
* current room is supplied, make an effort to go there.
*/
- [Citadel Development] (no subject) IO ERROR
- [Citadel Development] (no subject) Patriot
- [Citadel Development] (no subject) Patriot
- [Citadel Development] (no subject) Freakdog
- [Citadel Development] (no subject) IO ERROR
- [Citadel Development] (no subject) IGnatius T Foobar
- [Citadel Development] (no subject) IGnatius T Foobar
- [Citadel Development] (no subject) IO ERROR
- [Citadel Development] (no subject) IGnatius T Foobar
- [Citadel Development] (no subject) IO ERROR
- [Citadel Development] (no subject) thom
- [Citadel Development] (no subject) IO ERROR
- [Citadel Development] (no subject) Freakdog
- [Citadel Development] (no subject) IGnatius T Foobar
- [Citadel Development] (no subject) IGnatius T Foobar
- [Citadel Development] (no subject) IO ERROR
- [Citadel Development] (no subject) shayne
- [Citadel Development] (no subject) dothebart
- [Citadel Development] (no subject) IGnatius T Foobar
- [Citadel Development] (no subject) dothebart
- [Citadel Development] (no subject) fleeb