]> code.citadel.org Git - citadel.git/blobdiff - webcit/auth.c
* Rewrote the HTTP engine and application coupling to run in a worker thread
[citadel.git] / webcit / auth.c
index 28d89efba3319e3e89520b954307fb8c47002afc..64147f1a1917de166230a53a6a156c3ddc9d5928 100644 (file)
@@ -6,16 +6,28 @@
  * $Id$
  */
 
+
+#include <ctype.h>
 #include <stdlib.h>
-#ifdef HAVE_UNISTD_H
 #include <unistd.h>
-#endif
 #include <stdio.h>
-#include <ctype.h>
+#include <fcntl.h>
+#include <signal.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <sys/socket.h>
+#include <sys/time.h>
+#include <limits.h>
+#include <netinet/in.h>
+#include <netdb.h>
 #include <string.h>
+#include <pwd.h>
 #include <errno.h>
+#include <stdarg.h>
+#include <pthread.h>
+#include <signal.h>
 #include "webcit.h"
-#include "child.h"
+
 
 char *axdefs[] =
 {
@@ -35,7 +47,7 @@ void display_login(char *mesg)
 {
        char buf[256];
 
-       printf("HTTP/1.0 200 OK\n");
+       wprintf("HTTP/1.0 200 OK\n");
        output_headers(3);
 
        /* Da banner */
@@ -172,7 +184,7 @@ void do_logout(void)
        strcpy(WC->wc_password, "");
        strcpy(WC->wc_roomname, "");
 
-       printf("HTTP/1.0 200 OK\n");
+       wprintf("HTTP/1.0 200 OK\n");
        output_headers(2);      /* note "2" causes cookies to be unset */
 
        wprintf("<CENTER>");
@@ -204,7 +216,7 @@ void validate(void)
        char buf[256];
        int a;
 
-       printf("HTTP/1.0 200 OK\n");
+       wprintf("HTTP/1.0 200 OK\n");
        output_headers(1);
 
        strcpy(buf, bstr("user"));
@@ -283,7 +295,7 @@ void display_reg(int during_login)
        char buf[256];
        int a;
 
-       printf("HTTP/1.0 200 OK\n");
+       wprintf("HTTP/1.0 200 OK\n");
        output_headers(1);
 
        wprintf("<TABLE WIDTH=100% BORDER=0 BGCOLOR=007700><TR><TD>");
@@ -387,7 +399,7 @@ void display_changepw(void)
 {
        char buf[256];
 
-       printf("HTTP/1.0 200 OK\n");
+       wprintf("HTTP/1.0 200 OK\n");
        output_headers(1);
 
        wprintf("<TABLE WIDTH=100% BORDER=0 BGCOLOR=770000><TR><TD>");