Fixed bugs related to last three commits
authorArt Cancro <ajc@citadel.org>
Mon, 17 Jan 2011 17:48:20 +0000 (12:48 -0500)
committerArt Cancro <ajc@citadel.org>
Mon, 17 Jan 2011 17:48:20 +0000 (12:48 -0500)
citadel/textclient/citadel.c
webcit/auth.c
webcit/openid.c
webcit/sysdep.c
webcit/tcp_sockets.c

index 94ca65341bd8b62e59fecc0d1556e0815b597762..ef2685edadd7d0a15f7b7128cb36a73300821cfd 100644 (file)
@@ -127,21 +127,6 @@ CtdlIPC *ipc_for_signal_handlers;  /* KLUDGE cover your eyes */
 int enable_syslog = 0;
 
 
-/*
- * syslog()  ...   Write logging information; 
- *                  simple here to have the same 
- *                  symbols in the client.
- */
-
-void syslog(enum LogLevel loglevel, const char *format, ...) {   
-       va_list arg_ptr;
-
-       va_start(arg_ptr, format);
-       vfprintf(stderr, format, arg_ptr);   
-       va_end(arg_ptr);   
-       fflush(stderr);
-}   
-
 /*
  * here is our 'clean up gracefully and exit' routine
  */
index 4327f3b3c08516f826d5dd05a6d64788b60c7e6a..74ab667385cfdce1ada3dd4a30330839a6d54544 100644 (file)
@@ -333,7 +333,7 @@ void do_openid_login(void)
                serv_puts(buf);
                serv_getln(buf, sizeof buf);
                if (buf[0] == '2') {
-                       syslog(CTDL_DEBUG, "OpenID server contacted; redirecting to %s\n", &buf[4]);
+                       syslog(LOG_DEBUG, "OpenID server contacted; redirecting to %s\n", &buf[4]);
                        http_redirect(&buf[4]);
                        return;
                }
index 44fc532e4a02164c24d6dace83b2bc6ce33be8ed..8ab2cb4ced73fe0f28d83569a228c47363e8e530 100644 (file)
@@ -64,7 +64,7 @@ void openid_attach(void) {
 
        if (havebstr("attach_button")) {
 
-               syslog(CTDL_DEBUG, "Attempting to attach %s\n", bstr("openid_url"));
+               syslog(LOG_DEBUG, "Attempting to attach %s\n", bstr("openid_url"));
 
                snprintf(buf, sizeof buf,
                        "OIDS %s|%s/finalize_openid_login|%s",
@@ -76,12 +76,12 @@ void openid_attach(void) {
                serv_puts(buf);
                serv_getln(buf, sizeof buf);
                if (buf[0] == '2') {
-                       syslog(CTDL_DEBUG, "OpenID server contacted; redirecting to %s\n", &buf[4]);
+                       syslog(LOG_DEBUG, "OpenID server contacted; redirecting to %s\n", &buf[4]);
                        http_redirect(&buf[4]);
                        return;
                }
                else {
-                       syslog(CTDL_DEBUG, "OpenID attach failed: %s\n", &buf[4]);
+                       syslog(LOG_DEBUG, "OpenID attach failed: %s\n", &buf[4]);
                }
        }
 
index f266c45fe252148f62b446038f415b494c0cf73d..101c3647a06b551ef8157acd59323cf0c5c4707f 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * WebCit "system dependent" code.
  *
- * Copyright (c) 1996-2010 by the citadel.org team
+ * Copyright (c) 1996-2011 by the citadel.org team
  *
  * This program is open source software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -503,18 +503,18 @@ void drop_root(uid_t UID)
 #endif // HAVE_GETPWUID_R
 
                if (pwp == NULL)
-                       syslog(CTDL_CRIT, "WARNING: getpwuid(%ld): %s\n"
+                       syslog(LOG_CRIT, "WARNING: getpwuid(%ld): %s\n"
                                "Group IDs will be incorrect.\n", UID,
                                strerror(errno));
                else {
                        initgroups(pw.pw_name, pw.pw_gid);
                        if (setgid(pw.pw_gid))
-                               syslog(CTDL_CRIT, "setgid(%ld): %s\n", (long)pw.pw_gid,
+                               syslog(LOG_CRIT, "setgid(%ld): %s\n", (long)pw.pw_gid,
                                        strerror(errno));
                }
-               syslog(CTDL_INFO, "Changing uid to %ld\n", (long)UID);
+               syslog(LOG_INFO, "Changing uid to %ld\n", (long)UID);
                if (setuid(UID) != 0) {
-                       syslog(CTDL_CRIT, "setuid() failed: %s\n", strerror(errno));
+                       syslog(LOG_CRIT, "setuid() failed: %s\n", strerror(errno));
                }
 #if defined (HAVE_SYS_PRCTL_H) && defined (PR_SET_DUMPABLE)
                prctl(PR_SET_DUMPABLE, 1);
index 628a004d2ce6715ae80adf8f34994332b64abb58..767c20a4ced602ba1473527704416423519dd85f 100644 (file)
@@ -738,7 +738,7 @@ long end_burst(void)
                if (CompressBuffer(WCC->WBuf) > 0)
                        hprintf("Content-encoding: gzip\r\n");
                else {
-                       syslog(CTDL_ALERT, "Compression failed: %d [%s] sending uncompressed\n", errno, strerror(errno));
+                       syslog(LOG_ALERT, "Compression failed: %d [%s] sending uncompressed\n", errno, strerror(errno));
                        wc_backtrace();
                }
        }