* move policy.c into modules/expire/expire_policy.c, since it just controls this.
[citadel.git] / citadel / citserver.c
index 4a86604ad7509f7a5fd073331f43ed37e3b78fa3..cd13b3e3c297c2e5fd6f8be04c25ed0e55ed5627 100644 (file)
@@ -3,21 +3,21 @@
  *
  * Main source module for the Citadel server
  *
- * Copyright (c) 1987-2009 by the citadel.org team
+ * Copyright (c) 1987-2010 by the citadel.org team
  *
- *  This program is free software; you can redistribute it and/or modify
- *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 3 of the License, or
- *  (at your option) any later version.
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
  *
- *  This program is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *  GNU General Public License for more details.
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
  *
- *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */
 
 #include "sysdep.h"
@@ -29,7 +29,6 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 
-
 #if TIME_WITH_SYS_TIME
 # include <sys/time.h>
 # include <time.h>
@@ -70,7 +69,6 @@
 #include "locate_host.h"
 #include "room_ops.h"
 #include "file_ops.h"
-#include "policy.h"
 #include "control.h"
 #include "euidindex.h"
 #include "context.h"
@@ -82,7 +80,6 @@
 
 #include "ctdl_module.h"
 
-
 char *unique_session_numbers;
 int ScheduledShutdown = 0;
 time_t server_startup_time;
@@ -243,7 +240,7 @@ void master_cleanup(int exitcode) {
        
        if (restart_server != 0)
                exit(1);
-       if ((running_as_daemon != 0) && (exitcode == 0))
+       if ((running_as_daemon != 0) && ((exitcode == 0) ))
                exitcode = CTDLEXIT_SHUTDOWN;
        exit(exitcode);
 }
@@ -680,7 +677,7 @@ int CtdlAccessCheck(int required_level) {
                return(-1);
        }
 
-       if (CC->user.axlevel >= 6) return(0);
+       if (CC->user.axlevel >= AxAideU) return(0);
        if (required_level >= ac_aide) {
                cprintf("%d This command requires Aide access.\n",
                        ERROR + HIGHER_ACCESS_REQUIRED);
@@ -1043,12 +1040,11 @@ void do_command_loop(void) {
        }
 
        /* Log the server command, but don't show passwords... */
-       if ( (strncasecmp(cmdbuf, "PASS", 4))
-          && (strncasecmp(cmdbuf, "SETP", 4)) ) {
+       if ( (strncasecmp(cmdbuf, "PASS", 4)) && (strncasecmp(cmdbuf, "SETP", 4)) ) {
                CtdlLogPrintf(CTDL_INFO, "%s\n", cmdbuf);
        }
        else {
-               CtdlLogPrintf(CTDL_INFO, "<password command sent>\n");
+               CtdlLogPrintf(CTDL_INFO, "<password command hidden from log>\n");
        }
 
        buffer_output();