$Log$
+ Revision 645.5 2005/04/14 15:53:55 ajc
+ * Variable names, comments, documentation, etc... removed the acronym 'BBS'
+ in places where functionality is not specific to the use of Citadel as
+ a BBS platform.
+
Revision 645.4 2005/04/13 20:42:44 ajc
* citmail.c: changes to citmail to make it usable as a /usr/sbin/sendmail
replacement; i.e. /bin/mail calls /usr/sbin/sendmail which sends mail
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
+ not to the compiled-in CTDLDIR
* Re-ordered the security checks in CtdlAccessCheck()
Revision 626.8 2004/10/06 21:23:21 error
Revision 607.10 2003/06/28 05:12:56 ajc
* Bump internal version number to 6.08
- * Use (-1) instead of BBSUID as the uid of user records which exist only
+ * Use (-1) instead of CTDLUID as the uid of user records which exist only
in Citadel and not in the system password database. serv_upgrade also
changes this setting for ALL such users, the first time the server is run
after upgrading to 6.08
Revision 601.115 2003/01/17 04:36:04 ajc
* whobbs.c: fix bad call to CtdlGetServInfo() so we can get our session ID
- and the name of the BBS
+ and the name of the Citadel site
Revision 601.114 2003/01/16 21:16:23 error
* CtdlIPCGetMessages(): Fix message read failing on first attempt to read
null string)
Revision 573.4 2000/09/28 10:27:38 error
- * commands.c: changed sttybbs() to support HP/UX termios VMIN and VTIME
+ * commands.c: changed stty_ctdl() to support HP/UX termios VMIN and VTIME
Revision 573.3 2000/09/24 22:01:45 ajc
- * ipc_c_tcp.c: don't hardcode BBSDIR path for unix domain sockets
+ * ipc_c_tcp.c: don't hardcode CTDLDIR path for unix domain sockets
Revision 573.2 2000/09/21 04:16:44 ajc
* Fixed logged_in_response() so it only displays responses during Citadel
* Fixed oopseth in control.c that might call fileno(NULL)
Revision 572.36 2000/09/01 13:37:16 ajc
- * control.c: chown citadel.control to bbsuid when opening/creating as root
+ * control.c: chown citadel.control to ctdluid when opening/creating as root
Revision 572.35 2000/09/01 03:55:44 ajc
* Fixed a few more references to the deprecated uncnsrd.mt-kisco.ny.us name
Revision 1.489 2000/03/16 17:58:54 smw
Created a docs directory.
Moved install.txt to docs.
- Added inetmailsetup.txt (BBS server side e-mail)
- Added inetmailsetupmx.txt (local mail AND bbs e-mail
+ Added inetmailsetup.txt (Citadel server side e-mail)
+ Added inetmailsetupmx.txt (local mail AND Citadel e-mail
Added inetsiteconfig.txt (describes the .asi command)
Added siteconfig.txt (describes .asg)
Added chat.txt (describes changes and new chat functionality)
Revision 1.415 1999/11/15 03:17:39 ajc
* Put lockfile in /tmp instead of in /var/lock. The latter is not guaranteed
- to exist, nor is it guaranteed to be writable by BBSUID
+ to exist, nor is it guaranteed to be writable by CTDLUID
(Resolves bug #11 from the Bugzilla repository)
Revision 1.414 1999/11/15 03:07:24 ajc
1999-05-11 Nathan Bryant <bryant@cs.usm.maine.edu>
* chkpwd.c: fixed excessive paranoia; it used to refuse to run when
- invoked by root and BBSUID != 0
+ invoked by root and CTDLUID != 0
* Makefile.in: ignore errors while installing /etc/pam.d/citadel
1999-04-27 Art Cancro <ajc@uncensored.citadel.org>
1999-03-04 Nathan Bryant <bryant@cs.usm.maine.edu>
* config.c: error checking in put_config()
- * setup.c: chgrp files to the login group associated with BBSUID
+ * setup.c: chgrp files to the login group associated with CTDLUID
* sysdep.c: copyright 1987-1999; drop root perms; load modules and call
master_startup() after dropping perms
Wed Jan 20 19:21:51 EST 1999 Art Cancro <ajc@uncensored.citadel.org>
* Added some more code to the unfinished MIME parser
* Changed module loading path to simply "modules" because after calling
- get_config(), the cwd is guaranteed to be the correct BBS directory.
+ get_config(), the cwd is guaranteed to be the correct Citadel directory.
Tue Jan 19 21:28:29 EST 1999 Art Cancro <ajc@uncensored.citadel.org>
* Fixed a bug in the user editing command (client side)
Fri Nov 6 20:22:20 EST 1998 Art Cancro <ajc@uncensored.citadel.org>
* citadel.h (and related files): removed defunct parameters,
- c_defent and c_msgbase (erase your test bbs)
+ c_defent and c_msgbase (erase your test system)
* Implemented CONF server command for site-global configs
* Shuffled yesno() and yesno_d() from routines.c to commands.c
* commands.c: implemented boolprompt()
Mon Nov 2 12:59:03 EST 1998 Art Cancro <ajc@uncensored.citadel.org>
* setup.c: looks for 'citadel', 'bbs', or 'guest' in /etc/passwd to
- try to get a default for bbsuid if it's currently set to 0
+ try to get a default for ctdluid if it's currently set to 0
* citmail.c: changed usersupp.eternal to usersupp.usernum (why didn't
it complain about this before?)
* serv_upgrade.c: began writing an "export" command to do sidegrades
Sun Aug 2 18:52:05 EDT 1998 Nathan Bryant <bryant@cs.usm.maine.edu>
* config_defs.h: new file, contains external declarations from config.c
* config.c: moved defs to config_defs.h, use PATH_MAX from <limits.h>
- for bbs_home_directory
+ for ctdl_home_directory
* mailinglist.c, support.c: include <string.h>
* sysoputil.c: include <string.h>, <limits.h>, "config_defs.h", remove
duplicated defs, replace gets() call with fgets()
-/* define this to the bbs home directory */
-#undef BBSDIR
+/* define this to the Citadel home directory */
+#undef CTDLDIR
/* define this to enable the autologin feature */
#undef ENABLE_AUTOLOGIN
get_config();
uid = getuid();
- if (uid != BBSUID && uid)
+ if (uid != CTDLUID && uid)
{
pw = getpwuid(uid);
openlog("chkpwd", LOG_CONS, LOG_AUTH);
kill(0 - getpgrp(), SIGKILL);
}
color(ORIGINAL_PAIR); /* Restore the old color settings */
- sttybbs(SB_RESTORE); /* return the old terminal settings */
+ stty_ctdl(SB_RESTORE); /* return the old terminal settings */
/*
* uncomment the following if you need to know why Citadel exited
printf("*** Exit code %d at %s:%d\n", code, file, line);
*/
void catch_sigcont(int signum)
{
- sttybbs(SB_LAST);
+ stty_ctdl(SB_LAST);
signal(SIGCONT, catch_sigcont);
}
system(rc_gotmail_cmd);
}
}
- status_line(ipc->ServInfo.humannode, ipc->ServInfo.bbs_city,
+ status_line(ipc->ServInfo.humannode, ipc->ServInfo.site_location,
room_name, secure, newmailcount);
}
logoff(NULL, 3);
}
- sttybbs(SB_SAVE); /* Store the old terminal parameters */
+ stty_ctdl(SB_SAVE); /* Store the old terminal parameters */
load_command_set(); /* parse the citadel.rc file */
- sttybbs(SB_NO_INTR); /* Install the new ones */
+ stty_ctdl(SB_NO_INTR); /* Install the new ones */
/* signal(SIGHUP, dropcarr);FIXME */ /* Cleanup gracefully if carrier is dropped */
signal(SIGPIPE, dropcarr); /* Cleanup gracefully if local conn. dropped */
signal(SIGTERM, dropcarr); /* Cleanup gracefully if terminated */
if (!strcmp(argv[a], "-p")) {
struct stat st;
- if (chdir(BBSDIR) < 0) {
- perror("can't change to " BBSDIR);
+ if (chdir(CTDLDIR) < 0) {
+ perror("can't change to " CTDLDIR);
logoff(NULL, 3);
}
* guaranteed to have the uid/gid we want.
*/
if (!getuid() || !getgid()) {
- if (stat(BBSDIR "/citadel.config", &st) < 0) {
+ if (stat(CTDLDIR "/citadel.config", &st) < 0) {
perror("couldn't stat citadel.config");
logoff(NULL, 3);
}
get_serv_info(ipc, telnet_client_host);
scr_printf("%-24s\n%s\n%s\n", ipc->ServInfo.software, ipc->ServInfo.humannode,
- ipc->ServInfo.bbs_city);
+ ipc->ServInfo.site_location);
scr_flush();
- status_line(ipc->ServInfo.humannode, ipc->ServInfo.bbs_city, NULL,
+ status_line(ipc->ServInfo.humannode, ipc->ServInfo.site_location, NULL,
secure, -1);
screenwidth = 80; /* default screen dimensions */
case 2:
if (ipc->isLocal) {
screen_reset();
- sttybbs(SB_RESTORE);
+ stty_ctdl(SB_RESTORE);
snprintf(aaa, sizeof aaa, "USERNAME=\042%s\042; export USERNAME;"
"exec ./subsystem %ld %d %d", fullname,
usernum, screenwidth, axlevel);
ka_system(aaa);
- sttybbs(SB_NO_INTR);
+ stty_ctdl(SB_NO_INTR);
screen_set();
} else {
scr_printf("*** Can't run doors when server is not local.\n");
CtdlIPCLogout(ipc);
if ((mcmd == 29) || (mcmd == 15)) {
screen_delete();
- sttybbs(SB_RESTORE);
+ stty_ctdl(SB_RESTORE);
formout(ipc, "goodbye");
logoff(ipc, 0);
}
char c_fqdn[64]; /* Fully Qualified Domain Name */
char c_humannode[21]; /* Long name of system */
char c_phonenum[16]; /* Dialup number of system */
- uid_t c_bbsuid; /* UID of the bbs-only user */
+ uid_t c_ctdluid; /* UID under which we run Citadel */
char c_creataide; /* room creator = room aide flag */
int c_sleeping; /* watchdog timer setting */
char c_initax; /* initial access level */
char c_moreprompt[80]; /* paginator prompt */
char c_restrict; /* restrict Internet mail flag */
long c_niu_1; /* (not in use) */
- char c_bbs_city[32]; /* physical location of server */
+ char c_site_location[32]; /* physical location of server */
char c_sysadm[26]; /* name of system administrator */
char c_niu_2[15]; /* (not in use) */
int c_setup_level; /* what rev level we've setup to */
#define FQDN config.c_fqdn
#define HUMANNODE config.c_humannode
#define PHONENUM config.c_phonenum
-#define BBSUID config.c_bbsuid
+#define CTDLUID config.c_ctdluid
#define CREATAIDE config.c_creataide
#define REGISCALL config.c_regiscall
#define TWITDETECT config.c_twitdetect
struct ctdluser { /* User record */
int version; /* Cit vers. which created this rec */
uid_t uid; /* Associate with a unix account? */
- char password[32]; /* password (for BBS-only users) */
+ char password[32]; /* password (for Citadel-only users)*/
unsigned flags; /* See US_ flags below */
long timescalled; /* Total number of logins */
long posted; /* Number of messages posted (ever) */
#define READ_HEADER 2
#define READ_MSGBODY 3
-/* commands we can send to the sttybbs() routine */
-#define SB_NO_INTR 0 /* set to bbs mode, i/q disabled */
-#define SB_YES_INTR 1 /* set to bbs mode, i/q enabled */
+/* commands we can send to the stty_ctdl() routine */
+#define SB_NO_INTR 0 /* set to Citadel client mode, i/q disabled */
+#define SB_YES_INTR 1 /* set to Citadel client mode, i/q enabled */
#define SB_SAVE 2 /* save settings */
#define SB_RESTORE 3 /* restore settings */
#define SB_LAST 4 /* redo the last command sent */
/*
* Views
*/
-#define VIEW_BBS 0 /* Traditional Citadel BBS view */
+#define VIEW_BBS 0 /* Bulletin board view */
#define VIEW_MAILBOX 1 /* Mailbox summary */
#define VIEW_ADDRESSBOOK 2 /* Address book view */
#define VIEW_CALENDAR 3 /* Calendar view */
messaging and groupware applications, including Internet e-mail
through SMTP, POP3 and IMAP, instant messaging, and caledaring
and scheduling.
-Keywords: citadel citadel/ux bbs ignet smtp pop3 imap calendar messaging mail
+Keywords: citadel citadel/ux groupware bbs ignet smtp pop3 imap calendar messaging mail
Author: Art Cancro <ajc@uncensored.citadel.org>
Maintained-by: Citadel Developers <devel@citadel.org>
Primary-site: http://www.citadel.org/
#
# The standard client looks for this file in:
# 1. $HOME/.citadelrc
-# 2. <compiled BBSDIR>/citadel.rc
+# 2. <compiled CTDLDIR>/citadel.rc
# 3. /etc/citadel.rc
# 4. <current directory>/citadel.rc
/usr/local/citadel/userlist
/usr/local/citadel/utilsmenu
%pre server
-# Add the "bbs" user
+# Add the Citadel user
/usr/sbin/useradd -c "Citadel" -s /bin/false -r -d /usr/local/citadel \
citadel 2> /dev/null || :
%post server
{"LKRA", "LKRN", "LKRO", "LZRM", "LRMS", "LPRM" };
char aaa[SIZ];
char *bbb = NULL;
- size_t bbbsize;
+ size_t bbb_len;
if (!listing) return -2;
if (*listing) return -2; /* Free the listing first */
if (floor < -1) return -2; /* Can't validate upper bound, sorry */
sprintf(aaa, "%s %d", proto[which], floor);
- ret = CtdlIPCGenericCommand(ipc, aaa, NULL, 0, &bbb, &bbbsize, cret);
+ ret = CtdlIPCGenericCommand(ipc, aaa, NULL, 0, &bbb, &bbb_len, cret);
if (ret / 100 == 1) {
struct march *mptr;
{ "ALL", "OLD", "NEW", "LAST", "FIRST", "GT", "LT" };
char aaa[33];
char *bbb = NULL;
- size_t bbbsize;
+ size_t bbb_len;
if (!cret) return -2;
if (!mret) return -2;
sprintf(aaa, "MSGS %s|%d|%d", proto[which], whicharg,
(mtemplate) ? 1 : 0);
if (mtemplate) count = strlen(mtemplate);
- ret = CtdlIPCGenericCommand(ipc, aaa, mtemplate, count, &bbb, &bbbsize, cret);
+ ret = CtdlIPCGenericCommand(ipc, aaa, mtemplate, count, &bbb, &bbb_len, cret);
if (ret / 100 != 1)
return ret;
count = 0;
register int ret;
char aaa[SIZ];
char *bbb = NULL;
- size_t bbbsize;
+ size_t bbb_len;
int multipart_hunting = 0;
char multipart_prefix[128];
strcpy(mret[0]->content_type, "");
sprintf(aaa, "MSG%d %ld|%d", as_mime, msgnum, headers);
- ret = CtdlIPCGenericCommand(ipc, aaa, NULL, 0, &bbb, &bbbsize, cret);
+ ret = CtdlIPCGenericCommand(ipc, aaa, NULL, 0, &bbb, &bbb_len, cret);
if (ret / 100 == 1) {
if (as_mime != 2) {
strcpy(mret[0]->mime_chosen, "1"); /* Default chosen-part is "1" */
break;
case 5: ipc->ServInfo.rev_level = atoi(buf);
break;
- case 6: strcpy(ipc->ServInfo.bbs_city,buf);
+ case 6: strcpy(ipc->ServInfo.site_location,buf);
break;
case 7: strcpy(ipc->ServInfo.sysadm,buf);
break;
if (!strcmp(cithost, UDS)) {
if (!strcasecmp(citport, DEFAULT_PORT)) {
snprintf(sockpath, sizeof sockpath, "%s%s",
- BBSDIR, "/citadel.socket");
+ CTDLDIR, "/citadel.socket");
}
else {
snprintf(sockpath, sizeof sockpath, "%s%s",
char fqdn[64];
char software[64];
int rev_level;
- char bbs_city[64];
+ char site_location[64];
char sysadm[64];
char moreprompt[256];
int ok_floors;
cprintf("%s\n", config.c_fqdn);
cprintf("%s\n", CITADEL);
cprintf("%d\n", REV_LEVEL);
- cprintf("%s\n", config.c_bbs_city);
+ cprintf("%s\n", config.c_site_location);
cprintf("%s\n", config.c_sysadm);
cprintf("%d\n", SERVER_TYPE);
cprintf("%s\n", config.c_moreprompt);
ccfile = fopen(buf, "r");
}
if (ccfile == NULL) {
- snprintf(buf, sizeof buf, "%s/citadel.rc", BBSDIR);
+ snprintf(buf, sizeof buf, "%s/citadel.rc", CTDLDIR);
ccfile = fopen(buf, "r");
}
if (ccfile == NULL) {
/*
* set tty modes. commands are:
*
- * 01- set to bbs mode
+ * 01- set to Citadel mode
* 2 - save current settings for later restoral
* 3 - restore saved settings
*/
#ifdef HAVE_TERMIOS_H
-void sttybbs(int cmd)
-{ /* SysV version of sttybbs() */
+void stty_ctdl(int cmd)
+{ /* SysV version of stty_ctdl() */
struct termios live;
static struct termios saved_settings;
static int last_cmd = 0;
}
#else
-void sttybbs(int cmd)
-{ /* BSD version of sttybbs() */
+void stty_ctdl(int cmd)
+{ /* BSD version of stty_ctdl() */
struct sgttyb live;
static struct sgttyb saved_settings;
static int last_cmd = 0;
* declarations
*/
void load_command_set(void);
-void sttybbs(int cmd);
+void stty_ctdl(int cmd);
void newprompt(char *prompt, char *str, int len);
void strprompt(char *prompt, char *str, int len);
int boolprompt(char *prompt, int prev_val);
#include "config.h"
struct config config;
-char bbs_home_directory[PATH_MAX] = BBSDIR;
+char ctdl_home_directory[PATH_MAX] = CTDLDIR;
int home_specified = 0;
/*
FILE *cfp;
struct stat st;
- if (chdir(home_specified ? bbs_home_directory : BBSDIR) != 0) {
+ if (chdir(home_specified ? ctdl_home_directory : CTDLDIR) != 0) {
fprintf(stderr,
"This program could not be started.\n"
"Unable to change directory to %s\n"
"Error: %s\n",
- (home_specified ? bbs_home_directory : BBSDIR),
+ (home_specified ? ctdl_home_directory : CTDLDIR),
strerror(errno));
exit(1);
}
fprintf(stderr, "This program could not be started.\n"
"Unable to open %s/citadel.config\n"
"Error: %s\n",
- (home_specified ? bbs_home_directory : BBSDIR),
+ (home_specified ? ctdl_home_directory : CTDLDIR),
strerror(errno));
exit(1);
}
exit(1);
}
#ifndef __CYGWIN__
- if (st.st_uid != BBSUID || st.st_mode != (S_IFREG | S_IRUSR | S_IWUSR)) {
+ if (st.st_uid != CTDLUID || st.st_mode != (S_IFREG | S_IRUSR | S_IWUSR)) {
fprintf(stderr, "check the permissions on citadel.config\n");
exit(1);
}
void get_config(void);
void put_config(void);
extern struct config config;
-extern char bbs_home_directory[PATH_MAX];
+extern char ctdl_home_directory[PATH_MAX];
extern int home_specified;
AC_CONFIG_SRCDIR([citserver.c])
AC_PREFIX_DEFAULT(/usr/local/citadel)
if test "$prefix" = NONE; then
- AC_DEFINE_UNQUOTED(BBSDIR, "$ac_default_prefix")
+ AC_DEFINE_UNQUOTED(CTDLDIR, "$ac_default_prefix")
else
- AC_DEFINE_UNQUOTED(BBSDIR, "$prefix")
+ AC_DEFINE_UNQUOTED(CTDLDIR, "$prefix")
fi
AC_ARG_ENABLE(autologin, [ --disable-autologin disable autologin (default is enabled if possible)])
if (control_fp == NULL) {
control_fp = fopen("citadel.control", "rb+");
if (control_fp != NULL) {
- fchown(fileno(control_fp), config.c_bbsuid, -1);
+ fchown(fileno(control_fp), config.c_ctdluid, -1);
}
}
if (control_fp == NULL) {
control_fp = fopen("citadel.control", "wb+");
if (control_fp != NULL) {
- fchown(fileno(control_fp), config.c_bbsuid, -1);
+ fchown(fileno(control_fp), config.c_ctdluid, -1);
memset(&CitControl, 0, sizeof(struct CitControl));
fwrite(&CitControl, sizeof(struct CitControl),
1, control_fp);
cprintf("%s\n", config.c_twitroom);
cprintf("%s\n", config.c_moreprompt);
cprintf("%d\n", config.c_restrict);
- cprintf("%s\n", config.c_bbs_city);
+ cprintf("%s\n", config.c_site_location);
cprintf("%s\n", config.c_sysadm);
cprintf("%d\n", config.c_maxsessions);
cprintf("xxx\n"); /* placeholder -- field no longer in use */
config.c_restrict = 1;
break;
case 12:
- safestrncpy(config.c_bbs_city, buf,
- sizeof config.c_bbs_city);
+ safestrncpy(config.c_site_location, buf,
+ sizeof config.c_site_location);
break;
case 13:
safestrncpy(config.c_sysadm, buf,
*/
mkdir(dbdirname, 0700);
chmod(dbdirname, 0700);
- chown(dbdirname, BBSUID, (-1) );
+ chown(dbdirname, CTDLUID, (-1) );
lprintf(CTDL_DEBUG, "cdb_*: Setting up DB environment\n");
db_env_set_func_yield(sched_yield);
snprintf(filename, sizeof filename, "%s/%s",
dbdirname, d->d_name);
chmod(filename, 0600);
- chown(filename, BBSUID, (-1) );
+ chown(filename, CTDLUID, (-1) );
}
}
closedir(dp);
}
snprintf(outfile, sizeof outfile,
"%s/network/spoolin/nsf.%04lx.%04x",
- BBSDIR, (long)getpid(), ++seq);
+ CTDLDIR, (long)getpid(), ++seq);
ofp = fopen(outfile, "a");
if (ofp == NULL) {
cprintf("%d internal error\n", ERROR + INTERNAL_ERROR);
if (CC->dl_is_net == 1) {
CC->dl_is_net = 0;
- snprintf(buf, sizeof buf, "%s/network/spoolout/%s", BBSDIR,
+ snprintf(buf, sizeof buf, "%s/network/spoolout/%s", CTDLDIR,
CC->net_node);
unlink(buf);
}
}
snprintf(pathname, sizeof pathname, "%s/network/spoolout/%s",
- BBSDIR, CC->net_node);
+ CTDLDIR, CC->net_node);
/* first open the file in append mode in order to create a
* zero-length file if it doesn't already exist
snprintf(CC->upl_path, sizeof CC->upl_path,
"%s/network/spoolin/%s.%04lx.%04x",
- BBSDIR, CC->net_node, (long)getpid(), ++seq);
+ CTDLDIR, CC->net_node, (long)getpid(), ++seq);
CC->upload_fp = fopen(CC->upl_path, "r");
if (CC->upload_fp != NULL) {
char text[MAXWORDBUF];
};
-void sttybbs(int cmd);
+void stty_ctdl(int cmd);
int haschar(const char *st, int ch);
void getline(char *string, int lim);
int file_checksum(char *filename);
has_images = 0;
sigcaught = 0;
- sttybbs(1);
+ stty_ctdl(1);
strcpy(reply_to, NO_REPLY_TO);
strcpy(reply_subject, "");
++lines_printed;
lines_printed =
checkpagin(lines_printed, pagin, screenheight);
- sttybbs(0);
+ stty_ctdl(0);
return (0);
}
}
}
pprintf("\n");
- sttybbs(0);
+ stty_ctdl(0);
return (0);
}
if (pagin == 1 && !dest)
color(DIM_WHITE);
- sttybbs(0);
+ stty_ctdl(0);
return (fr);
}
default: /* allow 2+ modes */
e_ex_code = 1; /* start with a failed exit code */
screen_reset();
- sttybbs(SB_RESTORE);
+ stty_ctdl(SB_RESTORE);
editor_pid = fork();
cksum = file_checksum(filename);
if (editor_pid == 0) {
b = ka_wait(&e_ex_code);
} while ((b != editor_pid) && (b >= 0));
editor_pid = (-1);
- sttybbs(0);
+ stty_ctdl(0);
screen_set();
break;
}
if (f == 0) {
freopen(prtfile, "r", stdin);
screen_reset();
- sttybbs(SB_RESTORE);
+ stty_ctdl(SB_RESTORE);
ka_system(printcmd);
- sttybbs(SB_NO_INTR);
+ stty_ctdl(SB_NO_INTR);
screen_set();
unlink(prtfile);
exit(0);
help_subst(buffer, "^variantname", CITADEL);
snprintf(buf2, sizeof buf2, "%d", config.c_maxsessions);
help_subst(buffer, "^maxsessions", buf2);
- help_subst(buffer, "^bbsdir", BBSDIR);
+ help_subst(buffer, "^bbsdir", CTDLDIR);
}
return;
}
cprintf("%d %s|%s/files/%s\n",
- LISTING_FOLLOWS, config.c_fqdn, BBSDIR, CC->room.QRdirname);
+ LISTING_FOLLOWS, config.c_fqdn, CTDLDIR, CC->room.QRdirname);
snprintf(buf, sizeof buf, "ls %s/files/%s >%s 2> /dev/null",
- BBSDIR, CC->room.QRdirname, CC->temp);
+ CTDLDIR, CC->room.QRdirname, CC->temp);
system(buf);
- snprintf(buf, sizeof buf, "%s/files/%s/filedir", BBSDIR, CC->room.QRdirname);
+ snprintf(buf, sizeof buf, "%s/files/%s/filedir", CTDLDIR, CC->room.QRdirname);
fd = fopen(buf, "r");
if (fd == NULL)
fd = fopen("/dev/null", "r");
flnm[strlen(flnm) - 1] = 0;
if (strcasecmp(flnm, "filedir")) {
snprintf(buf, sizeof buf, "%s/files/%s/%s",
- BBSDIR, CC->room.QRdirname, flnm);
+ CTDLDIR, CC->room.QRdirname, flnm);
stat(buf, &statbuf);
safestrncpy(comment, "", sizeof comment);
fseek(fd, 0L, 0);
#define IFNEXPERT if ((userflags&US_EXPERT)==0)
-void sttybbs(int cmd);
+void stty_ctdl(int cmd);
void dotgoto(CtdlIPC *ipc, char *towhere, int display_name, int fromungoto);
void progress(CtdlIPC* ipc, unsigned long curr, unsigned long cmax);
int pattern(char *search, char *patn);
snprintf(transmit_cmd, sizeof transmit_cmd, "exec cat %s", tempname);
screen_reset();
- sttybbs(SB_RESTORE);
+ stty_ctdl(SB_RESTORE);
system(transmit_cmd);
- sttybbs(SB_NO_INTR);
+ stty_ctdl(SB_NO_INTR);
screen_set();
/* clean up the temporary directory */
snprintf(tmp, sizeof tmp, "WINDOW_TITLE=%s", desc);
putenv(tmp);
screen_reset();
- sttybbs(SB_RESTORE);
+ stty_ctdl(SB_RESTORE);
editor_pid = fork();
if (editor_pid == 0) {
chmod(temp, 0600);
} while ((b != editor_pid) && (b >= 0));
editor_pid = (-1);
scr_printf("Executed %s\n", editor_paths[0]);
- sttybbs(0);
+ stty_ctdl(0);
screen_set();
} else {
scr_printf("Entering %s. "
color(DIM_RED);
scr_printf("%s\r", ipc->ServInfo.moreprompt);
color(COLOR_POP);
- sttybbs(0);
+ stty_ctdl(0);
b=inkey();
for (a=0; a<strlen(ipc->ServInfo.moreprompt); ++a)
scr_putc(' ');
scr_putc(13);
- sttybbs(1);
+ stty_ctdl(1);
if ( (rc_prompt_control == 1)
|| ((rc_prompt_control == 3) && (userflags & US_PROMPTCTL)) ) {
if (b == 'q' || b == 'Q' || b == 's' || b == 'S')
if (curr >= cmax) {
sln_printf("\r%79s\r","");
- status_line(ipc->ServInfo.humannode, ipc->ServInfo.bbs_city,
+ status_line(ipc->ServInfo.humannode, ipc->ServInfo.site_location,
room_name, secure, 0);
} else {
/* a will be range 0-50 rather than 0-100 */
chdir(tempdir);
switch (c) {
case 0:
- sttybbs(0);
+ stty_ctdl(0);
scr_printf("Receiving %s - press Ctrl-D to end.\n", flnm);
fp = fopen(flnm, "w");
do {
exit(0);
case 1:
screen_reset();
- sttybbs(3);
+ stty_ctdl(3);
execlp("rx", "rx", flnm, NULL);
exit(1);
case 2:
screen_reset();
- sttybbs(3);
+ stty_ctdl(3);
execlp("rb", "rb", NULL);
exit(1);
case 3:
screen_reset();
- sttybbs(3);
+ stty_ctdl(3);
execlp("rz", "rz", NULL);
exit(1);
}
do {
b = ka_wait(&a);
} while ((b != xfer_pid) && (b != (-1)));
- sttybbs(0);
+ stty_ctdl(0);
screen_set();
if (a != 0) {
int a, b;
screen_reset();
- sttybbs(SB_RESTORE);
+ stty_ctdl(SB_RESTORE);
a = fork();
if (a == 0) {
signal(SIGINT, SIG_DFL);
do {
b = ka_wait(NULL);
} while ((a != b) && (a != (-1)));
- sttybbs(0);
+ stty_ctdl(0);
screen_set();
}
e_ex_code = 1; /* start with a failed exit code */
screen_reset();
- sttybbs(SB_RESTORE);
+ stty_ctdl(SB_RESTORE);
editor_pid = fork();
cksum = file_checksum(filename);
if (editor_pid == 0) {
b = ka_wait(&e_ex_code);
} while ((b != editor_pid) && (b >= 0));
editor_pid = (-1);
- sttybbs(0);
+ stty_ctdl(0);
screen_set();
}
* status_line() is a convenience function for writing a "typical"
* status line to the window.
*/
-void status_line(const char *humannode, const char *bbs_city,
+void status_line(const char *humannode, const char *site_location,
const char *room_name, int secure, int newmailcount)
{
#if defined(HAVE_CURSES_H) && !defined(DISABLE_CURSES)
wresize(statuswindow, 1, screenwidth);
#endif
mvwin(statuswindow, screenheight, 0);
- status_line(ipc->ServInfo.humannode, ipc->ServInfo.bbs_city,
+ status_line(ipc->ServInfo.humannode, ipc->ServInfo.site_location,
room_name, secure, -1);
wnoutrefresh(mainwindow);
wnoutrefresh(statuswindow);
#endif
#endif
-void status_line(const char *humannode, const char *bbs_city,
+void status_line(const char *humannode, const char *site_location,
const char *room_name, int secure, int newmailcount);
void screen_new(void);
void screen_delete(void);
char cmd[SIZ];
char buf[SIZ];
- strcpy(bbs_home_directory, BBSDIR);
+ strcpy(ctdl_home_directory, CTDLDIR);
strcpy(cmd, "");
/*
*/
for (a = 1; a < argc; ++a) {
if (!strncmp(argv[a], "-h", 2)) {
- strcpy(bbs_home_directory, argv[a]);
- strcpy(bbs_home_directory, &bbs_home_directory[2]);
+ strcpy(ctdl_home_directory, argv[a]);
+ strcpy(ctdl_home_directory, &ctdl_home_directory[2]);
home_specified = 1;
} else {
if (strlen(cmd) > 0)
fprintf(stderr, "sendcommand: started (pid=%d) "
"running in %s\n",
(int) getpid(),
- bbs_home_directory);
+ ctdl_home_directory);
fflush(stderr);
np_attach_to_server();
fflush(stderr);
if (is_room_aide()) {
cprintf(":|/kick (kick another user out of this room) \n");
}
- cprintf(":|/quit (return to the BBS) \n");
+ cprintf(":|/quit (exit from this chat) \n");
cprintf(":|\n");
ok_cmd = 1;
}
#ifdef ENABLE_AUTOLOGIN
struct PurgeList *pptr;
- if ((us->uid != (-1)) && (us->uid != BBSUID)) {
+ if ((us->uid != (-1)) && (us->uid != CTDLUID)) {
if (getpwuid(us->uid) == NULL) {
pptr = (struct PurgeList *)
malloc(sizeof(struct PurgeList));
/*
- * Back end processing function for convert_bbsuid_to_minusone()
+ * Back end processing function for convert_ctdluid_to_minusone()
*/
void cbtm_backend(struct ctdluser *usbuf, void *data) {
static struct UserProcList *uplist = NULL;
if (lgetuser(&us, uplist->user) == 0) {
lprintf(CTDL_DEBUG, "Processing <%s>...\n", uplist->user);
- if (us.uid == BBSUID) {
+ if (us.uid == CTDLUID) {
us.uid = (-1);
}
lputuser(&us);
}
/*
- * quick fix to change all BBSUID users to (-1)
+ * quick fix to change all CTDLUID users to (-1)
*/
-void convert_bbsuid_to_minusone(void) {
+void convert_ctdluid_to_minusone(void) {
lprintf(CTDL_WARNING, "Applying uid changes\n");
ForEachUser(cbtm_backend, NULL);
cbtm_backend(NULL, NULL);
bump_mailbox_generation_numbers();
}
if ((CitControl.version > 000) && (CitControl.version < 608)) {
- convert_bbsuid_to_minusone();
+ convert_ctdluid_to_minusone();
}
CitControl.version = REV_LEVEL;
cprintf("%s\n", config.c_fqdn);
cprintf("%s\n", config.c_humannode);
cprintf("%s\n", config.c_phonenum);
- cprintf("%ld\n", (long)config.c_bbsuid);
+ cprintf("%ld\n", (long)config.c_ctdluid);
cprintf("%d\n", config.c_creataide);
cprintf("%d\n", config.c_sleeping);
cprintf("%d\n", config.c_initax);
cprintf("%s\n", config.c_twitroom);
cprintf("%s\n", config.c_moreprompt);
cprintf("%d\n", config.c_restrict);
- cprintf("%s\n", config.c_bbs_city);
+ cprintf("%s\n", config.c_site_location);
cprintf("%s\n", config.c_sysadm);
cprintf("%d\n", config.c_setup_level);
cprintf("%d\n", config.c_maxsessions);
client_getln(config.c_fqdn, sizeof config.c_fqdn);
client_getln(config.c_humannode, sizeof config.c_humannode);
client_getln(config.c_phonenum, sizeof config.c_phonenum);
- client_getln(buf, sizeof buf); config.c_bbsuid = atoi(buf);
+ client_getln(buf, sizeof buf); config.c_ctdluid = atoi(buf);
client_getln(buf, sizeof buf); config.c_creataide = atoi(buf);
client_getln(buf, sizeof buf); config.c_sleeping = atoi(buf);
client_getln(buf, sizeof buf); config.c_initax = atoi(buf);
client_getln(config.c_twitroom, sizeof config.c_twitroom);
client_getln(config.c_moreprompt, sizeof config.c_moreprompt);
client_getln(buf, sizeof buf); config.c_restrict = atoi(buf);
- client_getln(config.c_bbs_city, sizeof config.c_bbs_city);
+ client_getln(config.c_site_location, sizeof config.c_site_location);
client_getln(config.c_sysadm, sizeof config.c_sysadm);
client_getln(buf, sizeof buf); config.c_setup_level = atoi(buf);
client_getln(buf, sizeof buf); config.c_maxsessions = atoi(buf);
}
else if (!strncmp(argv[a], "-h", 2)) {
- safestrncpy(bbs_home_directory, &argv[a][2],
- sizeof bbs_home_directory);
+ safestrncpy(ctdl_home_directory, &argv[a][2],
+ sizeof ctdl_home_directory);
home_specified = 1;
}
* Load any server-side extensions available here.
*/
lprintf(CTDL_INFO, "Initializing server extensions\n");
- size = strlen(bbs_home_directory) + 9;
+ size = strlen(ctdl_home_directory) + 9;
initialize_server_extensions();
/*
- * Now that we've bound the sockets, change to the BBS user id and its
+ * Now that we've bound the sockets, change to the Citadel user id and its
* corresponding group ids
*/
if (drop_root_perms) {
- if ((pw = getpwuid(BBSUID)) == NULL)
+ if ((pw = getpwuid(CTDLUID)) == NULL)
lprintf(CTDL_CRIT, "WARNING: getpwuid(%ld): %s\n"
- "Group IDs will be incorrect.\n", (long)BBSUID,
+ "Group IDs will be incorrect.\n", (long)CTDLUID,
strerror(errno));
else {
initgroups(pw->pw_name, pw->pw_gid);
lprintf(CTDL_CRIT, "setgid(%ld): %s\n", (long)pw->pw_gid,
strerror(errno));
}
- lprintf(CTDL_INFO, "Changing uid to %ld\n", (long)BBSUID);
- if (setuid(BBSUID) != 0) {
+ lprintf(CTDL_INFO, "Changing uid to %ld\n", (long)CTDLUID);
+ if (setuid(CTDLUID) != 0) {
lprintf(CTDL_CRIT, "setuid() failed: %s\n", strerror(errno));
}
#if defined (HAVE_SYS_PRCTL_H) && defined (PR_SET_DUMPABLE)
{
int i;
struct passwd *pw;
- char bbsuidname[SIZ];
+ char ctdluidname[SIZ];
switch (curr) {
case 2:
#ifdef __CYGWIN__
- config.c_bbsuid = 0; /* XXX Windows hack, prob. insecure */
+ config.c_ctdluid = 0; /* XXX Windows hack, prob. insecure */
#else
- i = config.c_bbsuid;
+ i = config.c_ctdluid;
pw = getpwuid(i);
if (pw == NULL) {
set_int_val(curr, &i);
- config.c_bbsuid = i;
+ config.c_ctdluid = i;
}
else {
- strcpy(bbsuidname, pw->pw_name);
- set_str_val(curr, bbsuidname);
- pw = getpwnam(bbsuidname);
+ strcpy(ctdluidname, pw->pw_name);
+ set_str_val(curr, ctdluidname);
+ pw = getpwnam(ctdluidname);
if (pw != NULL) {
- config.c_bbsuid = pw->pw_uid;
+ config.c_ctdluid = pw->pw_uid;
}
- else if (atoi(bbsuidname) > 0) {
- config.c_bbsuid = atoi(bbsuidname);
+ else if (atoi(ctdluidname) > 0) {
+ config.c_ctdluid = atoi(ctdluidname);
}
}
#endif
}
/* Get started in a valid setup directory. */
- strcpy(setup_directory, BBSDIR);
+ strcpy(setup_directory, CTDLDIR);
if ( (using_web_installer) && (getenv("CITADEL") != NULL) ) {
strcpy(setup_directory, getenv("CITADEL"));
}
if (config.c_sleeping == 0) {
config.c_sleeping = 900;
}
- if (config.c_bbsuid == 0) {
+ if (config.c_ctdluid == 0) {
pw = getpwnam("citadel");
if (pw != NULL)
- config.c_bbsuid = pw->pw_uid;
+ config.c_ctdluid = pw->pw_uid;
}
- if (config.c_bbsuid == 0) {
+ if (config.c_ctdluid == 0) {
pw = getpwnam("bbs");
if (pw != NULL)
- config.c_bbsuid = pw->pw_uid;
+ config.c_ctdluid = pw->pw_uid;
}
- if (config.c_bbsuid == 0) {
+ if (config.c_ctdluid == 0) {
pw = getpwnam("guest");
if (pw != NULL)
- config.c_bbsuid = pw->pw_uid;
+ config.c_ctdluid = pw->pw_uid;
}
if (config.c_createax == 0) {
config.c_createax = 3;
}
/*
- if (setuid(config.c_bbsuid) != 0) {
+ if (setuid(config.c_ctdluid) != 0) {
important_message("Citadel Setup",
"Failed to change the user ID to your Citadel user.");
cleanup(errno);
disable_other_mta("hula");
#endif
- if ((pw = getpwuid(config.c_bbsuid)) == NULL)
+ if ((pw = getpwuid(config.c_ctdluid)) == NULL)
gid = getgid();
else
gid = pw->pw_gid;
progress("Setting file permissions", 0, 4);
- chown(".", config.c_bbsuid, gid);
+ chown(".", config.c_ctdluid, gid);
sleep(1);
progress("Setting file permissions", 1, 4);
- chown("citadel.config", config.c_bbsuid, gid);
+ chown("citadel.config", config.c_ctdluid, gid);
sleep(1);
progress("Setting file permissions", 2, 4);
snprintf(aaa, sizeof aaa,
"find . | grep -v chkpwd | xargs chown %ld:%ld 2>/dev/null",
- (long)config.c_bbsuid, (long)gid);
+ (long)config.c_ctdluid, (long)gid);
system(aaa);
sleep(1);
progress("Setting file permissions", 3, 4);
leader(s) can invite new people to the room, and kick & ban people out of
the room.
-Messages should be able to be sent to anyone on the bbs from the page system
+Messages should be able to be sent to any logged in user from the page system
to the chat system and vice versa.
This can be implemented with the current citadel clients. [I can't send a
struct ctdluser { /* User record */
int version; /* Cit vers. which created this rec */
uid_t uid; /* Associate with a unix account? */
- char password[32]; /* password (for BBS-only users) */
+ char password[32]; /* password (for Citadel-only users)*/
unsigned flags; /* See US_ flags below */
long timescalled; /* Total number of logins */
long posted; /* Number of messages posted (ever) */
Let <FF> be a 0xFF byte, and <0> be a null (0x00) byte. Then a message
which prints as...
-Apr 12, 1988 23:16 From Test User In Network Test> @lifesys (Life BBS)
+Apr 12, 1988 23:16 From Test User In Network Test> @lifesys (Life Central)
Have a nice day!
might be stored as...
<FF><40><0>I12345<0>Pneighbor!lifesys!test_user<0>T576918988<0> (continued)
-----------|Mesg ID#|--Message Path---------------|--Date------
-AThe Test User<0>ONetwork Test<0>Nlifesys<0>HLife BBS<0>MHave a nice day!<0>
+AThe Test User<0>ONetwork Test<0>Nlifesys<0>HLife Central<0>MHave a nice day!<0>
|-----Author-----|-Room name-----|-nodename-|Human Name-|--Message text-----
Weird things can happen if fields are missing, especially if you use the
Description of the files in the "netconfigs" directory
These files contain a set of network configurations for a room. They are
-stored in the directory $BBSDIR/netconfigs and are named according to each
+stored in the directory $CTDLDIR/netconfigs and are named according to each
room's internal ID number. When a room is deleted, its network configuration
file is deleted as well.
The protocols used below the application layer are beyond the scope of this
document, but we will briefly cover the methodology employed by Citadel.
- Citadel offers Citadel BBS service using TCP/IP. It does so via a
+ Citadel offers its client protocol using TCP/IP. It does so via a
multithreaded server listening on a TCP port. Local connections may also
be made using the same protocol using Unix domain sockets.
parts of the listing:
Line 1 - Your unique session ID on the server
- Line 2 - The node name of the server BBS
- Line 3 - Human-readable node name of the server BBS
+ Line 2 - The node name of the Citadel server
+ Line 3 - Human-readable node name of the Citadel server
Line 4 - The fully-qualified domain name (FQDN) of the server
Line 5 - The name of the server software, i.e. "Citadel 4.00"
Line 6 - (The revision level of the server code) * 100
- Line 7 - The geographical location of the BBS (city and state if in the US)
+ Line 7 - The geographical location of the site (city and state if in the US)
Line 8 - The name of the system administrator
Line 9 - A number identifying the server type (see below)
Line 10 - The text of the system's paginator prompt
compatibility in a scenario in which developers have added proprietary
features to their servers or clients. We are attempting to avoid a future
situation in which users need to keep different client software around for
-each BBS they use. *Please*, if you are a developer and plan to add
+each Citadel they use. *Please*, if you are a developer and plan to add
proprietary features:
-> Your client programs should still be able to utilize servers other than
The server message contained on the same line with LISTING_FOLLOWS will
contain the name of the system and the name of the directory, such as:
- uncensored.citadel.org|/usr/bbs/files/my_room_directory
+ uncensored.citadel.org|/usr/local/citadel/files/my_room_directory
SLRP (Set Last-message-Read Pointer)
NETP (authenticate as network session with connection NET Password)
This command is used by client software to identify itself as a transport
-session for IGnet/Open BBS to BBS networking. It should be called with
+session for Citadel site-to-site networking. It should be called with
two arguments: the node name of the calling system, and the "shared secret"
password for that connection. If the authentication succeeds, NETP will
return OK, otherwise, it returns ERROR.
identified itself as a network session using the NETP command. If the command
returns OK, the client may begin transmitting IGnet/Open spool data using
a series of WRIT commands. When a UCLS command is issued, the spooled data
-is entered into the BBS if the argument to UCLS is 1 or discarded if the
+is entered into the server if the argument to UCLS is 1 or discarded if the
argument to UCLS is 0. If the client has not authenticated itself with a
NETP command, ERROR+HIGHER_ACCESS_REQUIRED will be returned.
The Citadel server understands the following commands:
/quit - Exit from chat mode (causes the server to do an 000 end)
/who - List users currently in chat
- /whobbs - List users currently in chat and on the bbs
+ /whobbs - List users currently in chat and elsewhere
/me - Do an irc-style action.
/join - Join a new "room" in which all messages are only heard by
people in that room.
to make things look the way the user wants to see them. For example, we might
always choose to see a room full of private mail as a summary (one line per
message) rather than always dumping out the entire contents like we do on a
-typical BBS room. An address book room might look better as a tabbed view
+typical message room. An address book room might look better as a tabbed view
or something, rather than as a bunch of messages with vCards attached to them.
This is why we define "views" for a room. It gives the client software a
The values currently defined are:
-#define VIEW_BBS 0 /* Traditional Citadel BBS view */
+#define VIEW_BBS 0 /* Bulletin board view */
#define VIEW_MAILBOX 1 /* Mailbox summary */
#define VIEW_ADDRESSBOOK 2 /* Address book view */
#define VIEW_CALENDAR 3 /* Calendar view */
#define _CITADEL_UX_TYPESIZE_H
/* Include sysdep.h if not already included */
-#ifndef BBSDIR
+#ifndef CTDLDIR
# include "sysdep.h"
#endif
}
close(pipev[0]);
- execl(BBSDIR "/chkpwd", BBSDIR "/chkpwd", NULL);
- perror(BBSDIR "/chkpwd");
+ execl(CTDLDIR "/chkpwd", CTDLDIR "/chkpwd", NULL);
+ perror(CTDLDIR "/chkpwd");
exit(1);
}
#ifdef ENABLE_AUTOLOGIN
- /* A uid of BBSUID or -1 indicates that this user exists only in
+ /* A uid of CTDLUID or -1 indicates that this user exists only in
* Citadel, not in the underlying operating system.
*/
- if ( (CC->user.uid == BBSUID) || (CC->user.uid == (-1)) ) {
+ if ( (CC->user.uid == CTDLUID) || (CC->user.uid == (-1)) ) {
strproc(password);
strproc(CC->user.password);
code = strcasecmp(CC->user.password, password);
if (CtdlAccessCheck(ac_logged_in)) {
return;
}
- if ( (CC->user.uid != BBSUID) && (CC->user.uid != (-1)) ) {
+ if ( (CC->user.uid != CTDLUID) && (CC->user.uid != (-1)) ) {
cprintf("%d Not allowed. Use the 'passwd' command.\n", ERROR + NOT_HERE);
return;
}
fprintf(stderr,"%s: %s\n",argv[0],&buf[4]);
logoff(atoi(buf));
}
- strcpy(nodetitle, "this BBS");
+ strcpy(nodetitle, "this Citadel site");
r = CtdlIPCServerInfo(ipc, buf);
if (r / 100 == 1) {
my_pid = ipc->ServInfo.pid;