-/*
- * 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 */
#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.
*/
*/
#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
}
-/*
- * 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);
-/*
- * 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"
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;
-/*
- * 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);
-/*
- * 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;
};
-
-
void initialize_config_system(void);
void shutdown_config_system(void);
void put_config(void);
char cmd[20];
char roomname[ROOMNAMELEN];
char emailaddr[1024];
- char options[256];
char url[1024];
char token[128];
-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,
-/*
- * 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"
/*