From ca0714f168ab7cb7af8177e10941aa5c1fa3b09f Mon Sep 17 00:00:00 2001 From: Art Cancro Date: Thu, 14 Apr 2005 15:53:56 +0000 Subject: [PATCH] * 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. --- citadel/ChangeLog | 35 +++++++++++++++------------ citadel/acconfig.h | 4 ++-- citadel/chkpwd.c | 2 +- citadel/citadel.c | 26 ++++++++++---------- citadel/citadel.h | 16 ++++++------- citadel/citadel.lsm | 2 +- citadel/citadel.rc | 2 +- citadel/citadel.spec | 2 +- citadel/citadel_ipc.c | 16 ++++++------- citadel/citadel_ipc.h | 2 +- citadel/citserver.c | 2 +- citadel/commands.c | 12 +++++----- citadel/commands.h | 2 +- citadel/config.c | 10 ++++---- citadel/config.h | 2 +- citadel/configure.ac | 4 ++-- citadel/control.c | 10 ++++---- citadel/database_sleepycat.c | 4 ++-- citadel/file_ops.c | 8 +++---- citadel/messages.c | 18 +++++++------- citadel/msgbase.c | 2 +- citadel/room_ops.c | 8 +++---- citadel/rooms.c | 10 ++++---- citadel/routines.c | 6 ++--- citadel/routines2.c | 18 +++++++------- citadel/screen.c | 4 ++-- citadel/screen.h | 2 +- citadel/sendcommand.c | 8 +++---- citadel/serv_chat.c | 2 +- citadel/serv_expire.c | 2 +- citadel/serv_upgrade.c | 10 ++++---- citadel/serv_vandelay.c | 8 +++---- citadel/server_main.c | 16 ++++++------- citadel/setup.c | 44 +++++++++++++++++----------------- citadel/techdoc/chat.txt | 2 +- citadel/techdoc/hack.txt | 6 ++--- citadel/techdoc/netconfigs.txt | 2 +- citadel/techdoc/protocol.txt | 18 +++++++------- citadel/techdoc/views.txt | 4 ++-- citadel/typesize.h | 2 +- citadel/user_ops.c | 10 ++++---- citadel/whobbs.c | 2 +- 42 files changed, 185 insertions(+), 180 deletions(-) diff --git a/citadel/ChangeLog b/citadel/ChangeLog index 501bb3e8e..8720d9465 100644 --- a/citadel/ChangeLog +++ b/citadel/ChangeLog @@ -1,4 +1,9 @@ $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 @@ -446,7 +451,7 @@ 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 @@ -1794,7 +1799,7 @@ 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 @@ -2187,7 +2192,7 @@ 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 @@ -4530,10 +4535,10 @@ 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 @@ -4566,7 +4571,7 @@ * 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 @@ -4848,8 +4853,8 @@ 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) @@ -5158,7 +5163,7 @@ Revision 1.416 1999/11/17 04:15:05 ajc 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 @@ -5616,7 +5621,7 @@ Wed May 19 19:30:28 EDT 1999 Art Cancro 1999-05-11 Nathan Bryant * 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 @@ -5744,7 +5749,7 @@ Sat Mar 6 01:55:55 EST 1999 Art Cancro 1999-03-04 Nathan Bryant * 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 @@ -5837,7 +5842,7 @@ Sat Jan 23 14:32:19 EST 1999 Art Cancro Wed Jan 20 19:21:51 EST 1999 Art Cancro * 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 * Fixed a bug in the user editing command (client side) @@ -6069,7 +6074,7 @@ Sun Nov 8 13:19:36 EST 1998 Art Cancro Fri Nov 6 20:22:20 EST 1998 Art Cancro * 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() @@ -6089,7 +6094,7 @@ Wed Nov 4 10:53:13 EST 1998 Art Cancro Mon Nov 2 12:59:03 EST 1998 Art Cancro * 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 @@ -6572,7 +6577,7 @@ Sun Aug 2 21:09:09 EDT 1998 Nathan Bryant Sun Aug 2 18:52:05 EDT 1998 Nathan Bryant * config_defs.h: new file, contains external declarations from config.c * config.c: moved defs to config_defs.h, use PATH_MAX from - for bbs_home_directory + for ctdl_home_directory * mailinglist.c, support.c: include * sysoputil.c: include , , "config_defs.h", remove duplicated defs, replace gets() call with fgets() diff --git a/citadel/acconfig.h b/citadel/acconfig.h index 6715e289b..c73bc1946 100644 --- a/citadel/acconfig.h +++ b/citadel/acconfig.h @@ -1,5 +1,5 @@ -/* 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 diff --git a/citadel/chkpwd.c b/citadel/chkpwd.c index efcbb674b..ece82c2a1 100644 --- a/citadel/chkpwd.c +++ b/citadel/chkpwd.c @@ -28,7 +28,7 @@ int main(void) get_config(); uid = getuid(); - if (uid != BBSUID && uid) + if (uid != CTDLUID && uid) { pw = getpwuid(uid); openlog("chkpwd", LOG_CONS, LOG_AUTH); diff --git a/citadel/citadel.c b/citadel/citadel.c index ec5cdc574..58846072b 100644 --- a/citadel/citadel.c +++ b/citadel/citadel.c @@ -147,7 +147,7 @@ void ctdl_logoff(char *file, int line, CtdlIPC *ipc, int code) 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); @@ -174,7 +174,7 @@ void dropcarr(int signum) */ void catch_sigcont(int signum) { - sttybbs(SB_LAST); + stty_ctdl(SB_LAST); signal(SIGCONT, catch_sigcont); } @@ -484,7 +484,7 @@ void dotgoto(CtdlIPC *ipc, char *towhere, int display_name, int fromungoto) 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); } @@ -1054,9 +1054,9 @@ int main(int argc, char **argv) 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 */ @@ -1111,8 +1111,8 @@ int main(int argc, char **argv) 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); } @@ -1122,7 +1122,7 @@ int main(int argc, char **argv) * 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); } @@ -1203,10 +1203,10 @@ int main(int argc, char **argv) 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 */ @@ -1695,12 +1695,12 @@ NEWUSR: if (strlen(rc_password) == 0) { 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"); @@ -1859,7 +1859,7 @@ TERMN8: scr_printf("%s logged out.", fullname); CtdlIPCLogout(ipc); if ((mcmd == 29) || (mcmd == 15)) { screen_delete(); - sttybbs(SB_RESTORE); + stty_ctdl(SB_RESTORE); formout(ipc, "goodbye"); logoff(ipc, 0); } diff --git a/citadel/citadel.h b/citadel/citadel.h index abdc600cb..677ac0ad9 100644 --- a/citadel/citadel.h +++ b/citadel/citadel.h @@ -93,7 +93,7 @@ struct config { 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 */ @@ -103,7 +103,7 @@ struct config { 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 */ @@ -161,7 +161,7 @@ struct march { #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 @@ -174,7 +174,7 @@ struct march { 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) */ @@ -269,9 +269,9 @@ struct floor { #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 */ @@ -320,7 +320,7 @@ enum { /* * 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 */ diff --git a/citadel/citadel.lsm b/citadel/citadel.lsm index 410863f20..3ff8a15aa 100644 --- a/citadel/citadel.lsm +++ b/citadel/citadel.lsm @@ -7,7 +7,7 @@ Description: The Citadel messaging platform for Unix systems. 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 Maintained-by: Citadel Developers Primary-site: http://www.citadel.org/ diff --git a/citadel/citadel.rc b/citadel/citadel.rc index 51dd2b94f..a45dc5405 100644 --- a/citadel/citadel.rc +++ b/citadel/citadel.rc @@ -5,7 +5,7 @@ # # The standard client looks for this file in: # 1. $HOME/.citadelrc -# 2. /citadel.rc +# 2. /citadel.rc # 3. /etc/citadel.rc # 4. /citadel.rc diff --git a/citadel/citadel.spec b/citadel/citadel.spec index 11c5e1530..6a9524f6b 100644 --- a/citadel/citadel.spec +++ b/citadel/citadel.spec @@ -109,7 +109,7 @@ front ends. /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 diff --git a/citadel/citadel_ipc.c b/citadel/citadel_ipc.c index bfcc416d5..3a72ac180 100644 --- a/citadel/citadel_ipc.c +++ b/citadel/citadel_ipc.c @@ -285,7 +285,7 @@ int CtdlIPCKnownRooms(CtdlIPC *ipc, enum RoomList which, int floor, struct march {"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 */ @@ -294,7 +294,7 @@ int CtdlIPCKnownRooms(CtdlIPC *ipc, enum RoomList which, int floor, struct march 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; @@ -426,7 +426,7 @@ int CtdlIPCGetMessages(CtdlIPC *ipc, enum MessageList which, int whicharg, { "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; @@ -440,7 +440,7 @@ int CtdlIPCGetMessages(CtdlIPC *ipc, enum MessageList which, int whicharg, 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; @@ -471,7 +471,7 @@ int CtdlIPCGetSingleMessage(CtdlIPC *ipc, long msgnum, int headers, int as_mime, register int ret; char aaa[SIZ]; char *bbb = NULL; - size_t bbbsize; + size_t bbb_len; int multipart_hunting = 0; char multipart_prefix[128]; @@ -483,7 +483,7 @@ int CtdlIPCGetSingleMessage(CtdlIPC *ipc, long msgnum, int headers, int as_mime, 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" */ @@ -645,7 +645,7 @@ int CtdlIPCServerInfo(CtdlIPC *ipc, char *cret) 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; @@ -2924,7 +2924,7 @@ CtdlIPC* CtdlIPC_new(int argc, char **argv, char *hostbuf, char *portbuf) 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", diff --git a/citadel/citadel_ipc.h b/citadel/citadel_ipc.h index 93d1e6c6d..ba37904dd 100644 --- a/citadel/citadel_ipc.h +++ b/citadel/citadel_ipc.h @@ -39,7 +39,7 @@ struct CtdlServInfo { 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; diff --git a/citadel/citserver.c b/citadel/citserver.c index 9240f4ac4..67b240380 100644 --- a/citadel/citserver.c +++ b/citadel/citserver.c @@ -218,7 +218,7 @@ void cmd_info(void) { 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); diff --git a/citadel/commands.c b/citadel/commands.c index 892258f62..8e0a44c31 100644 --- a/citadel/commands.c +++ b/citadel/commands.c @@ -768,7 +768,7 @@ void load_command_set(void) 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) { @@ -1215,13 +1215,13 @@ int getcmd(CtdlIPC *ipc, char *argbuf) /* * 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; @@ -1264,8 +1264,8 @@ void sttybbs(int cmd) } #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; diff --git a/citadel/commands.h b/citadel/commands.h index 79c39809e..cb8757516 100644 --- a/citadel/commands.h +++ b/citadel/commands.h @@ -30,7 +30,7 @@ * 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); diff --git a/citadel/config.c b/citadel/config.c index ed95eab0a..8562f3472 100644 --- a/citadel/config.c +++ b/citadel/config.c @@ -24,7 +24,7 @@ #include "config.h" struct config config; -char bbs_home_directory[PATH_MAX] = BBSDIR; +char ctdl_home_directory[PATH_MAX] = CTDLDIR; int home_specified = 0; /* @@ -36,12 +36,12 @@ void get_config(void) { 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); } @@ -50,7 +50,7 @@ void get_config(void) { 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); } @@ -60,7 +60,7 @@ void get_config(void) { 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); } diff --git a/citadel/config.h b/citadel/config.h index 7de965864..7b1905946 100644 --- a/citadel/config.h +++ b/citadel/config.h @@ -8,5 +8,5 @@ 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; diff --git a/citadel/configure.ac b/citadel/configure.ac index 269a7c8c0..3efdfc1af 100644 --- a/citadel/configure.ac +++ b/citadel/configure.ac @@ -6,9 +6,9 @@ AC_REVISION([$Revision$]) 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)]) diff --git a/citadel/control.c b/citadel/control.c index a535192ed..d018f2743 100644 --- a/citadel/control.c +++ b/citadel/control.c @@ -66,13 +66,13 @@ void get_control(void) 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); @@ -176,7 +176,7 @@ void cmd_conf(char *argbuf) 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 */ @@ -276,8 +276,8 @@ void cmd_conf(char *argbuf) 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, diff --git a/citadel/database_sleepycat.c b/citadel/database_sleepycat.c index 193a327b0..473071c34 100644 --- a/citadel/database_sleepycat.c +++ b/citadel/database_sleepycat.c @@ -305,7 +305,7 @@ void open_databases(void) */ 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); @@ -393,7 +393,7 @@ void open_databases(void) snprintf(filename, sizeof filename, "%s/%s", dbdirname, d->d_name); chmod(filename, 0600); - chown(filename, BBSUID, (-1) ); + chown(filename, CTDLUID, (-1) ); } } closedir(dp); diff --git a/citadel/file_ops.c b/citadel/file_ops.c index bcc7759bd..7595fd853 100644 --- a/citadel/file_ops.c +++ b/citadel/file_ops.c @@ -271,7 +271,7 @@ void cmd_netf(char *cmdbuf) } 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); @@ -601,7 +601,7 @@ void cmd_clos(void) 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); } @@ -760,7 +760,7 @@ void cmd_ndop(char *cmdbuf) } 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 @@ -808,7 +808,7 @@ void cmd_nuop(char *cmdbuf) 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) { diff --git a/citadel/messages.c b/citadel/messages.c index 53949a7ad..701ad9d2a 100644 --- a/citadel/messages.c +++ b/citadel/messages.c @@ -59,7 +59,7 @@ struct cittext { 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); @@ -402,7 +402,7 @@ int read_message(CtdlIPC *ipc, has_images = 0; sigcaught = 0; - sttybbs(1); + stty_ctdl(1); strcpy(reply_to, NO_REPLY_TO); strcpy(reply_subject, ""); @@ -415,7 +415,7 @@ int read_message(CtdlIPC *ipc, ++lines_printed; lines_printed = checkpagin(lines_printed, pagin, screenheight); - sttybbs(0); + stty_ctdl(0); return (0); } @@ -462,7 +462,7 @@ int read_message(CtdlIPC *ipc, } } pprintf("\n"); - sttybbs(0); + stty_ctdl(0); return (0); } @@ -729,7 +729,7 @@ int read_message(CtdlIPC *ipc, if (pagin == 1 && !dest) color(DIM_WHITE); - sttybbs(0); + stty_ctdl(0); return (fr); } @@ -914,7 +914,7 @@ ME1: switch (mode) { 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) { @@ -932,7 +932,7 @@ ME1: switch (mode) { b = ka_wait(&e_ex_code); } while ((b != editor_pid) && (b >= 0)); editor_pid = (-1); - sttybbs(0); + stty_ctdl(0); screen_set(); break; } @@ -1561,9 +1561,9 @@ RMSGREAD: scr_flush(); 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); diff --git a/citadel/msgbase.c b/citadel/msgbase.c index 1661146c3..5c1dcd129 100644 --- a/citadel/msgbase.c +++ b/citadel/msgbase.c @@ -620,7 +620,7 @@ void do_help_subst(char *buffer) 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); } diff --git a/citadel/room_ops.c b/citadel/room_ops.c index e21b7330a..b335942d2 100644 --- a/citadel/room_ops.c +++ b/citadel/room_ops.c @@ -1049,13 +1049,13 @@ void cmd_rdir(void) 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"); @@ -1065,7 +1065,7 @@ void cmd_rdir(void) 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); diff --git a/citadel/rooms.c b/citadel/rooms.c index bb088a1af..465917650 100644 --- a/citadel/rooms.c +++ b/citadel/rooms.c @@ -34,7 +34,7 @@ #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); @@ -825,9 +825,9 @@ void download(CtdlIPC *ipc, int proto) 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 */ @@ -1138,7 +1138,7 @@ void do_edit(CtdlIPC *ipc, 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); @@ -1152,7 +1152,7 @@ void do_edit(CtdlIPC *ipc, } 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. " diff --git a/citadel/routines.c b/citadel/routines.c index ecbdc3cf5..413baa345 100644 --- a/citadel/routines.c +++ b/citadel/routines.c @@ -82,12 +82,12 @@ void hit_any_key(CtdlIPC *ipc) { /* hit any key to continue */ color(DIM_RED); scr_printf("%s\r", ipc->ServInfo.moreprompt); color(COLOR_POP); - sttybbs(0); + stty_ctdl(0); b=inkey(); for (a=0; aServInfo.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') @@ -401,7 +401,7 @@ void progress(CtdlIPC* ipc, unsigned long curr, unsigned long cmax) 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 */ diff --git a/citadel/routines2.c b/citadel/routines2.c index 9e0c5aa68..3d3562894 100644 --- a/citadel/routines2.c +++ b/citadel/routines2.c @@ -345,7 +345,7 @@ void upload(CtdlIPC *ipc, int c) 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 { @@ -362,17 +362,17 @@ void upload(CtdlIPC *ipc, int c) 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); } @@ -380,7 +380,7 @@ void upload(CtdlIPC *ipc, int c) do { b = ka_wait(&a); } while ((b != xfer_pid) && (b != (-1))); - sttybbs(0); + stty_ctdl(0); screen_set(); if (a != 0) { @@ -512,7 +512,7 @@ void subshell(void) int a, b; screen_reset(); - sttybbs(SB_RESTORE); + stty_ctdl(SB_RESTORE); a = fork(); if (a == 0) { signal(SIGINT, SIG_DFL); @@ -524,7 +524,7 @@ void subshell(void) do { b = ka_wait(NULL); } while ((a != b) && (a != (-1))); - sttybbs(0); + stty_ctdl(0); screen_set(); } @@ -1077,7 +1077,7 @@ void network_config_management(CtdlIPC *ipc, char *entrytype, char *comment) 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) { @@ -1092,7 +1092,7 @@ void network_config_management(CtdlIPC *ipc, char *entrytype, char *comment) b = ka_wait(&e_ex_code); } while ((b != editor_pid) && (b >= 0)); editor_pid = (-1); - sttybbs(0); + stty_ctdl(0); screen_set(); } diff --git a/citadel/screen.c b/citadel/screen.c index 70ee4003e..7a5bdcced 100644 --- a/citadel/screen.c +++ b/citadel/screen.c @@ -56,7 +56,7 @@ int is_curses_enabled(void) { * 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) @@ -477,7 +477,7 @@ int scr_set_windowsize(CtdlIPC* ipc) 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); diff --git a/citadel/screen.h b/citadel/screen.h index f71fa2f3c..02975030b 100644 --- a/citadel/screen.h +++ b/citadel/screen.h @@ -10,7 +10,7 @@ #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); diff --git a/citadel/sendcommand.c b/citadel/sendcommand.c index c4d6cbda0..da37dd71c 100644 --- a/citadel/sendcommand.c +++ b/citadel/sendcommand.c @@ -143,7 +143,7 @@ int main(int argc, char **argv) char cmd[SIZ]; char buf[SIZ]; - strcpy(bbs_home_directory, BBSDIR); + strcpy(ctdl_home_directory, CTDLDIR); strcpy(cmd, ""); /* @@ -151,8 +151,8 @@ int main(int argc, char **argv) */ 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) @@ -171,7 +171,7 @@ int main(int argc, char **argv) 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); diff --git a/citadel/serv_chat.c b/citadel/serv_chat.c index fd941f516..b323dab7a 100644 --- a/citadel/serv_chat.c +++ b/citadel/serv_chat.c @@ -319,7 +319,7 @@ void cmd_chat(char *argbuf) 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; } diff --git a/citadel/serv_expire.c b/citadel/serv_expire.c index a2d1ec634..5995d80ed 100644 --- a/citadel/serv_expire.c +++ b/citadel/serv_expire.c @@ -360,7 +360,7 @@ void do_uid_user_purge(struct ctdluser *us, void *data) { #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)); diff --git a/citadel/serv_upgrade.c b/citadel/serv_upgrade.c index 79b0d9c13..8abbad180 100644 --- a/citadel/serv_upgrade.c +++ b/citadel/serv_upgrade.c @@ -102,7 +102,7 @@ void bump_mailbox_generation_numbers(void) { /* - * 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; @@ -128,7 +128,7 @@ void cbtm_backend(struct ctdluser *usbuf, void *data) { 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); @@ -141,9 +141,9 @@ void cbtm_backend(struct ctdluser *usbuf, void *data) { } /* - * 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); @@ -206,7 +206,7 @@ void check_server_upgrades(void) { bump_mailbox_generation_numbers(); } if ((CitControl.version > 000) && (CitControl.version < 608)) { - convert_bbsuid_to_minusone(); + convert_ctdluid_to_minusone(); } CitControl.version = REV_LEVEL; diff --git a/citadel/serv_vandelay.c b/citadel/serv_vandelay.c index 46a2a56c0..4cc7c0ffb 100644 --- a/citadel/serv_vandelay.c +++ b/citadel/serv_vandelay.c @@ -264,7 +264,7 @@ void artv_do_export(void) { 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); @@ -273,7 +273,7 @@ void artv_do_export(void) { 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); @@ -331,7 +331,7 @@ void artv_import_config(void) { 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); @@ -340,7 +340,7 @@ void artv_import_config(void) { 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); diff --git a/citadel/server_main.c b/citadel/server_main.c index b7b1ac0c8..75c6c7137 100644 --- a/citadel/server_main.c +++ b/citadel/server_main.c @@ -101,8 +101,8 @@ int main(int argc, char **argv) } 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; } @@ -201,17 +201,17 @@ int main(int argc, char **argv) * 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); @@ -219,8 +219,8 @@ int main(int argc, char **argv) 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) diff --git a/citadel/setup.c b/citadel/setup.c index 261662671..6c8b336da 100644 --- a/citadel/setup.c +++ b/citadel/setup.c @@ -796,7 +796,7 @@ void edit_value(int curr) { int i; struct passwd *pw; - char bbsuidname[SIZ]; + char ctdluidname[SIZ]; switch (curr) { @@ -806,23 +806,23 @@ void edit_value(int 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 @@ -938,7 +938,7 @@ int main(int argc, char *argv[]) } /* 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")); } @@ -1049,20 +1049,20 @@ int main(int argc, char *argv[]) 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; @@ -1100,7 +1100,7 @@ int main(int argc, char *argv[]) } /* - 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); @@ -1183,21 +1183,21 @@ NEW_INST: 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); diff --git a/citadel/techdoc/chat.txt b/citadel/techdoc/chat.txt index ae2d8866f..4bb31c4bf 100644 --- a/citadel/techdoc/chat.txt +++ b/citadel/techdoc/chat.txt @@ -29,7 +29,7 @@ leader or whoever created the room is the conference leader. The conference 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 diff --git a/citadel/techdoc/hack.txt b/citadel/techdoc/hack.txt index 252b6313c..b85b3c74f 100644 --- a/citadel/techdoc/hack.txt +++ b/citadel/techdoc/hack.txt @@ -27,7 +27,7 @@ this file look something like this: 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) */ @@ -293,14 +293,14 @@ U Subject Optional. Developers may choose whether they wish to Let 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... <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 diff --git a/citadel/techdoc/netconfigs.txt b/citadel/techdoc/netconfigs.txt index ce4ec17f6..55434fb05 100644 --- a/citadel/techdoc/netconfigs.txt +++ b/citadel/techdoc/netconfigs.txt @@ -2,7 +2,7 @@ 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. diff --git a/citadel/techdoc/protocol.txt b/citadel/techdoc/protocol.txt index 6db52a6d0..1f4dab3ca 100644 --- a/citadel/techdoc/protocol.txt +++ b/citadel/techdoc/protocol.txt @@ -33,7 +33,7 @@ what you did, so that your new commands can be added to this document. 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. @@ -586,12 +586,12 @@ backward compatibility. The current implementation defines the following 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 @@ -610,7 +610,7 @@ parts of the listing: 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 @@ -645,7 +645,7 @@ contain three fields: a filename, the length of the file, and a description. 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) @@ -1292,7 +1292,7 @@ images which are likely to exist on most servers: 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. @@ -1319,7 +1319,7 @@ posting them twice. 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. @@ -1459,7 +1459,7 @@ will be a regular server command. 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. diff --git a/citadel/techdoc/views.txt b/citadel/techdoc/views.txt index f5b7788dd..3e9a1a0a9 100644 --- a/citadel/techdoc/views.txt +++ b/citadel/techdoc/views.txt @@ -6,7 +6,7 @@ in a Citadel client. And we don't enforce things either. But there's a need 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 @@ -18,7 +18,7 @@ is in the room record as room.QRdefaultview (and is also an integer). 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 */ diff --git a/citadel/typesize.h b/citadel/typesize.h index 4298082f4..57593307c 100644 --- a/citadel/typesize.h +++ b/citadel/typesize.h @@ -28,7 +28,7 @@ #define _CITADEL_UX_TYPESIZE_H /* Include sysdep.h if not already included */ -#ifndef BBSDIR +#ifndef CTDLDIR # include "sysdep.h" #endif diff --git a/citadel/user_ops.c b/citadel/user_ops.c index a9757e2db..f375637e1 100644 --- a/citadel/user_ops.c +++ b/citadel/user_ops.c @@ -589,8 +589,8 @@ static int validpw(uid_t uid, const char *pass) } close(pipev[0]); - execl(BBSDIR "/chkpwd", BBSDIR "/chkpwd", NULL); - perror(BBSDIR "/chkpwd"); + execl(CTDLDIR "/chkpwd", CTDLDIR "/chkpwd", NULL); + perror(CTDLDIR "/chkpwd"); exit(1); } @@ -646,10 +646,10 @@ int CtdlTryPassword(char *password) #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); @@ -938,7 +938,7 @@ void cmd_setp(char *new_pw) 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; } diff --git a/citadel/whobbs.c b/citadel/whobbs.c index 80fb72f3e..82d9f0d26 100644 --- a/citadel/whobbs.c +++ b/citadel/whobbs.c @@ -78,7 +78,7 @@ int main(int argc, char **argv) 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; -- 2.30.2