* Cleaned up some things that generated compiler warnings
authorArt Cancro <ajc@citadel.org>
Tue, 12 Oct 2004 02:17:51 +0000 (02:17 +0000)
committerArt Cancro <ajc@citadel.org>
Tue, 12 Oct 2004 02:17:51 +0000 (02:17 +0000)
* crypto keys directory is now relative to the server's working directory,
  not to the compiled-in BBSDIR
* Re-ordered the security checks in CtdlAccessCheck()

citadel/ChangeLog
citadel/citadel_ipc.c
citadel/citserver.c
citadel/sysconfig.h
citadel/sysdep.c

index a2371253a86b79ee5622e4213888dc2d07b6fcbc..468ba8b5efec06f2d0076488fc76dde7487bb8fd 100644 (file)
@@ -1,4 +1,10 @@
  $Log$
+ Revision 626.9  2004/10/12 02:17:49  ajc
+ * Cleaned up some things that generated compiler warnings
+ * crypto keys directory is now relative to the server's working directory,
+   not to the compiled-in BBSDIR
+ * Re-ordered the security checks in CtdlAccessCheck()
+
  Revision 626.8  2004/10/06 21:23:21  error
  * Fixup a few more compiler warnings from icc
 
@@ -6147,4 +6153,3 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant <bryant@cs.usm.maine.edu>
 
 Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
        * Initial CVS import
-
index cc79106dac326dcede156234783ee8b1fc1acb7f..d0d68b6fbd5714ebd297ed64497d1be6f6f01ef2 100644 (file)
@@ -2714,6 +2714,7 @@ static void CtdlIPC_init_OpenSSL(void)
        }
 
        /* Get started */
+       a = 0;
        ssl_ctx = NULL;
        dh = NULL;
        SSL_load_error_strings();
index f3a9ce04808513c59258696b1537217bb5798bbc..eda6a754efb9fd26597d5cbb0959fcf9e6dc8780 100644 (file)
@@ -669,6 +669,11 @@ int CtdlAccessCheck(int required_level) {
                return(-1);
        }
 
+       if ((required_level >= ac_logged_in) && (CC->logged_in == 0)) {
+               cprintf("%d Not logged in.\n", ERROR + NOT_LOGGED_IN);
+               return(-1);
+       }
+
        if (CC->user.axlevel >= 6) return(0);
        if (required_level >= ac_aide) {
                cprintf("%d This command requires Aide access.\n",
@@ -683,12 +688,6 @@ int CtdlAccessCheck(int required_level) {
                return(-1);
        }
 
-       if (CC->logged_in) return(0);
-       if (required_level >= ac_logged_in) {
-               cprintf("%d Not logged in.\n", ERROR + NOT_LOGGED_IN);
-               return(-1);
-       }
-
        /* shhh ... succeed quietly */
        return(0);
 }
index 76f2855dc8e56a9fceaddc40243c7fcdcbc9584c..bdb78502d763496e71a9d3a1677034342ef0fd49 100644 (file)
 /*
  * Pathnames for cryptographic goodness
  */
-#define        CTDL_CRYPTO_DIR         BBSDIR "/keys"
+#define        CTDL_CRYPTO_DIR         "./keys"
 #define CTDL_KEY_PATH          CTDL_CRYPTO_DIR "/citadel.key"
 #define CTDL_CSR_PATH          CTDL_CRYPTO_DIR "/citadel.csr"
 #define CTDL_CER_PATH          CTDL_CRYPTO_DIR "/citadel.cer"
index 21722e1736ca0d7b589fcfc2cf94175c82630b6b..d52b920bea8659ee4897e66950fedb766fe050d4 100644 (file)
@@ -896,7 +896,7 @@ void *worker_thread(void *arg) {
        struct CitContext *ptr;
        struct CitContext *bind_me = NULL;
        fd_set readfds;
-       int retval;
+       int retval = 0;
        struct CitContext *con= NULL;   /* Temporary context pointer */
        struct ServiceFunctionHook *serviceptr;
        int ssock;                      /* Descriptor for client socket */