misc cleanup
authorArt Cancro <ajc@citadel.org>
Sat, 31 Jul 2021 19:06:10 +0000 (15:06 -0400)
committerArt Cancro <ajc@citadel.org>
Sat, 31 Jul 2021 19:06:10 +0000 (15:06 -0400)
citadel/citadel.h
citadel/citadel_ldap.h
citadel/citserver.h
citadel/clientsocket.h
citadel/config.h
citadel/modules/listsub/serv_listsub.c
citadel/room_ops.h
citadel/sysconfig.h

index 35237621bd41837fbf6851f10883bb2552ceae20..6561315b9dfd0f89dec0171f374911f713b77af5 100644 (file)
@@ -1,16 +1,14 @@
-/*
- * Main Citadel header file
- *
- * Copyright (c) 1987-2021 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 version 3.
- *
- * 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.
- */
+// Main Citadel header file
+//
+// Copyright (c) 1987-2021 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 version 3.
+//
+// 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.
 
 /* system customizations are in sysconfig.h */
 
@@ -74,23 +72,6 @@ struct ExpirePolicy {
 #define EXPIRE_AGE             3       // Expire messages after n days
 
 
-/*
- * This struct stores a list of rooms with new messages which the client
- * fetches from the server.  This allows the client to "march" through
- * relevant rooms without having to ask the server each time where to go next.
- */
-typedef struct march march;
-struct march {
-       struct march *next;
-       char march_name[ROOMNAMELEN];
-       unsigned int march_flags;
-       char march_floor;
-       char march_order;
-       unsigned int march_flags2;
-       int march_access;
-};
-
-
 /*
  * User records.
  */
@@ -191,8 +172,8 @@ struct floor {
  */
 #define AUTHMODE_NATIVE                0       // Native (self-contained or "black box")
 #define AUTHMODE_HOST          1       // Authenticate against the host OS user database
-#define AUTHMODE_LDAP          2       // Authenticate against an LDAP server with RFC 2307 schema
-#define AUTHMODE_LDAP_AD       3       // Authenticate against non-standard MS Active Directory LDAP
+#define AUTHMODE_LDAP          2       // Authenticate using LDAP server with RFC 2307 schema
+#define AUTHMODE_LDAP_AD       3       // Authenticate using LDAP server with Active Directory schema
 
 #ifdef __cplusplus
 }
index b1305b83c5f383c5ebd581c1d0cc80694c0327a9..926fbde565b84b75b2e934d93836b344cb9f4f24 100644 (file)
@@ -1,16 +1,14 @@
-/*
- * Configuration for LDAP authentication.  Most of this stuff gets pulled out of our site config file.
- *
- * Copyright (c) 1987-2017 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 version 3.
- *
- *  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.
- */
+// Configuration for LDAP authentication.  Most of this stuff gets pulled out of our site config file.
+//
+// Copyright (c) 1987-2017 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 version 3.
+//
+//  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.
 
 int CtdlTryUserLDAP(char *username, char *found_dn, int found_dn_size, char *fullname, int fullname_size, uid_t *found_uid);
 int CtdlTryPasswordLDAP(char *user_dn, const char *password);
index adfe476c1866afcd8658947fe7c93923c70eda7c..effe9557a155a91de096b69c4dc754889f46e0b0 100644 (file)
@@ -1,14 +1,12 @@
-/*
- * Copyright (c) 1987-2019 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 version 3.
- *
- * 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.
- */
+// Copyright (c) 1987-2019 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 version 3.
+//
+// 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.
 
 /* I fucking hate const and want it to die. */
 #pragma GCC diagnostic ignored "-Wcast-qual"
@@ -44,10 +42,9 @@ void do_async_loop(void);
 void begin_session(struct CitContext *con);
 void citproto_begin_session(void);
 void citproto_begin_admin_session(void);
-
 void help_subst (char *strbuf, char *source, char *dest);
+char CtdlCheckExpress(void);
 
 extern int panic_fd;
-char CtdlCheckExpress(void);
 extern time_t server_startup_time;
 extern int openid_level_supported;
index f0d7c6a32591c2e99f5252588ff1178b03ca2ec5..cc275e1a53083dd16047b2c2add12ad42e079805 100644 (file)
@@ -1,16 +1,14 @@
-/*
- * Header file for TCP client socket library
- *
- * Copyright (c) 1987-2012 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 version 3.
- *
- *  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.
- */
+// Header file for TCP client socket library
+//
+// Copyright (c) 1987-2012 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 version 3.
+//
+//  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.
 
 int sock_connect(char *host, char *service);
 int sock_write(int *sock, const char *buf, int nbytes);
index 4c6d050ab5e51848fd9d523d71cd72c2b15e7366..23f144a482ba4eb4c147a998070e35ce5a71e43f 100644 (file)
@@ -1,50 +1,45 @@
-/*
- * Copyright (c) 1987-2016 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 version 3.
- *
- * 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.
- */
+// Copyright (c) 1987-2016 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 version 3.
+//
+// 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.
 
 #include "serv_extensions.h"
 #include "citadel_dirs.h"
 
-
-
-/*
- * This is the format of the legacy config file.  Do not attempt to do anything with it other
- * than migrate it into the new format.    DO NOT EDIT -- EVER.
- */
+// This is the format of the legacy config file.  Do not attempt to do anything with it other
+// than migrate it into the new format.  Seriously -- DO NOT CHANGE IT.  The only purpose of this
+// struct is to represent the OLD configuration format.
 struct legacy_config {
-       char c_nodename[16];            /* short name of this node on a Citadel network */
-       char c_fqdn[64];                /* this site's fully qualified domain name */
-       char c_humannode[21];           /* human-readable site name */
+       char c_nodename[16];            // short name of this node on a Citadel network
+       char c_fqdn[64];                // this site's fully qualified domain name
+       char c_humannode[21];           // human-readable site name
        char c_niu_7[16];
        uid_t c_niu_6;
-       char c_creataide;               /* 1 = creating a room auto-grants room aide privileges */
-       int c_sleeping;                 /* watchdog timer (seconds) */
-       char c_initax;                  /* initial access level for new users */
-       char c_regiscall;               /* after c_regiscall logins user will be asked to register */
-       char c_twitdetect;              /* automatically move messages from problem users to trashcan */
-       char c_twitroom[ROOMNAMELEN];   /* name of trashcan */
-       char c_moreprompt[80];          /* paginator prompt */
-       char c_restrict;                /* require per-user permission to send Internet mail */
+       char c_creataide;               // 1 = creating a room auto-grants room aide privileges
+       int c_sleeping;                 // watchdog timer (seconds)
+       char c_initax;                  // initial access level for new users
+       char c_regiscall;               // after c_regiscall logins user will be asked to register
+       char c_twitdetect;              // automatically move messages from problem users to trashcan
+       char c_twitroom[ROOMNAMELEN];   // name of trashcan
+       char c_moreprompt[80];          // paginator prompt
+       char c_restrict;                // require per-user permission to send Internet mail
        long c_niu_1;
-       char c_site_location[32];       /* geographic location of this Citadel site */
-       char c_sysadm[26];              /* name of system administrator */
+       char c_site_location[32];       // geographic location of this Citadel site
+       char c_sysadm[26];              // name of system administrator
        char c_niu_2[15];
        int c_niu_3;
-       int c_maxsessions;              /* maximum number of concurrent sessions allowed */
-       char c_ip_addr[20];             /* bind address for listening sockets */
-       int c_port_number;              /* port number for Citadel protocol (usually 504) */
+       int c_maxsessions;              // maximum number of concurrent sessions allowed
+       char c_ip_addr[20];             // bind address for listening sockets
+       int c_port_number;              // port number for Citadel protocol (usually 504)
        int c_niu_4;
-       struct ExpirePolicy c_ep;       /* default expire policy for the entire site */
-       int c_userpurge;                /* user purge time (in days) */
-       int c_roompurge;                /* room purge time (in days) */
+       struct ExpirePolicy c_ep;       // default expire policy for the entire site
+       int c_userpurge;                // user purge time (in days)
+       int c_roompurge;                // room purge time (in days)
        char c_logpages[ROOMNAMELEN];
        char c_createax;
        long c_maxmsglen;
@@ -101,8 +96,6 @@ struct legacy_config {
 };
 
 
-
-
 void initialize_config_system(void);
 void shutdown_config_system(void);
 void put_config(void);
index 34939eb15cdc060c3719417307815d100ba85cdb..073ddafaee01c7cd8b0e771968db1fd76df6a8e7 100644 (file)
@@ -351,7 +351,6 @@ void cmd_lsub(char *cmdbuf) {
        char cmd[20];
        char roomname[ROOMNAMELEN];
        char emailaddr[1024];
-       char options[256];
        char url[1024];
        char token[128];
 
index 20a8436541e6b2a752466ad86126cd0a1b02a145..a9a77f9e7203058b738af6efe20510c15537cd94 100644 (file)
@@ -1,25 +1,20 @@
-int is_known (struct ctdlroom *roombuf, int roomnum,
-             struct ctdluser *userbuf);
-int has_newmsgs (struct ctdlroom *roombuf, int roomnum,
-                struct ctdluser *userbuf);
-int is_zapped (struct ctdlroom *roombuf, int roomnum,
-              struct ctdluser *userbuf);
+int is_known (struct ctdlroom *roombuf, int roomnum, struct ctdluser *userbuf);
+int has_newmsgs (struct ctdlroom *roombuf, int roomnum, struct ctdluser *userbuf);
+int is_zapped (struct ctdlroom *roombuf, int roomnum, struct ctdluser *userbuf);
 void b_putroom(struct ctdlroom *qrbuf, char *room_name);
 void b_deleteroom(char *);
 void lgetfloor (struct floor *flbuf, int floor_num);
 void lputfloor (struct floor *flbuf, int floor_num);
 int sort_msglist (long int *listptrs, int oldcount);
 void list_roomname(struct ctdlroom *qrbuf, int ra, int current_view, int default_view);
-
 void convert_room_name_macros(char *towhere, size_t maxlen);
 
-
 typedef enum _POST_TYPE{
        POST_LOGGED_IN,
        POST_EXTERNAL,
        CHECK_EXISTANCE,
        POST_LMTP
-}PostType;
+} PostType;
 
 int CtdlDoIHavePermissionToPostInThisRoom(char *errmsgbuf, 
        size_t n, 
index 068ad88da6011e3a750ba2756bd000f3840dd511..99947bc0cd37f58751faa99637f19c225ac9640e 100644 (file)
@@ -1,17 +1,15 @@
-/*
- * Tuning of various parameters of the system.
- * Normally you don't want to mess with any of this.
- *
- * Copyright (c) 1987-2018 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 version 3.
- *
- * 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.
- */
+// Tuning of various parameters of the system.
+// Normally you don't want to mess with any of this.
+//
+// Copyright (c) 1987-2021 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 version 3.
+//
+// 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.
 
 /*
  * NLI is the string that shows up in a <W>ho's online listing for sessions
 #define PAGELOGROOM            "Sent/Received Pages"
 #define SYSCONFIGROOM          "Local System Configuration"
 #define SMTP_SPOOLOUT_ROOM     "__CitadelSMTPspoolout__"
-
-/*
- * Where we keep messages containing the vCards that source our directory.  It
- * makes no sense to change this, because you'd have to change it on every
- * system on the network.  That would be stupid.
- */
 #define ADDRESS_BOOK_ROOM      "Global Address Book"
 
 /*