* Bumped internal version number to 6.23
authorArt Cancro <ajc@citadel.org>
Thu, 24 Jun 2004 20:33:37 +0000 (20:33 +0000)
committerArt Cancro <ajc@citadel.org>
Thu, 24 Jun 2004 20:33:37 +0000 (20:33 +0000)
* Added "Server IP address" to config (server, client, docs)

citadel/ChangeLog
citadel/citadel.h
citadel/control.c
citadel/routines2.c
citadel/serv_extensions.c
citadel/serv_upgrade.c
citadel/setup.c
citadel/techdoc/session.txt

index 61c503f92b499a154f9bef0a45775fe261b3ef40..8c50c9eabde30a9c74bfeeb9330a13f077a8c8cc 100644 (file)
@@ -1,4 +1,8 @@
  $Log$
+ Revision 622.3  2004/06/24 20:33:37  ajc
+ * Bumped internal version number to 6.23
+ * Added "Server IP address" to config (server, client, docs)
+
  Revision 622.2  2004/06/24 15:26:33  ajc
  * Updated the ig_tcp_server() function to allow binding to a single IP
    address.  This is not yet used by anything.
@@ -5879,4 +5883,3 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant <bryant@cs.usm.maine.edu>
 
 Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
        * Initial CVS import
-
index 686c61389e912fb151781714edf3c28d485e02a9..036caaa060bb860485e10d93748a6e8914f3494d 100644 (file)
@@ -32,7 +32,7 @@ extern "C" {
 /*
  * Text description of this software
  */
-#define CITADEL        "Citadel/UX 6.22"
+#define CITADEL        "Citadel/UX 6.23"
 
 /*
  * REV_LEVEL is the current version number (multiplied by 100 to avoid having
@@ -44,7 +44,7 @@ extern "C" {
  * usually more strict because you're not really supposed to dump/load and
  * upgrade at the same time.
  */
-#define REV_LEVEL      622             /* This version */
+#define REV_LEVEL      623             /* This version */
 #define REV_MIN                591             /* Oldest compatible database */
 #define EXPORT_REV_MIN 615             /* Oldest compatible export files */
 
@@ -107,7 +107,7 @@ struct config {
        char c_niu_2[15];               /* (not in use)                     */
        int c_setup_level;              /* what rev level we've setup to    */
        int c_maxsessions;              /* maximum concurrent sessions      */
-       char c_niu_3[20];               /* (not in use)                     */
+       char c_ip_addr[20];             /* IP address to listen on          */
        int c_port_number;              /* Cit listener port (usually 504)  */
        int c_ipgm_secret;              /* Internal program authentication  */
        struct ExpirePolicy c_ep;       /* System default msg expire policy */
index 6b05750aadb290d510ab3c765c2b64a3cd0aa1d6..c145a5a930eeca087ede2c1cde86afdc1299d74b 100644 (file)
@@ -209,6 +209,7 @@ void cmd_conf(char *argbuf)
                cprintf("\n");
                cprintf("\n");
 #endif
+               cprintf("%s\n", config.c_ip_addr);
                cprintf("000\n");
        }
 
@@ -367,6 +368,9 @@ void cmd_conf(char *argbuf)
                                            sizeof config.c_ldap_bind_pw);
                                break;
 #endif
+                       case 37:
+                               safestrncpy(config.c_ip_addr, buf,
+                                               sizeof config.c_ip_addr);
                        }
                        ++a;
                }
index 7d627ae2e27ede2cae28e505e7fc4613be69f54f..8a76f8bd02dbb960eebef289017b8870b535f77d 100644 (file)
@@ -644,7 +644,7 @@ void read_bio(CtdlIPC *ipc)
 void do_system_configuration(CtdlIPC *ipc)
 {
 
-#define NUM_CONFIGS 37
+#define NUM_CONFIGS 38
 
        char buf[SIZ];
        char sc[NUM_CONFIGS][SIZ];
@@ -734,6 +734,7 @@ void do_system_configuration(CtdlIPC *ipc)
        strprompt("Minimum number of worker threads", &sc[21][0], 3);
        strprompt("Maximum number of worker threads", &sc[22][0], 3);
 
+       strprompt("Server IP address (0.0.0.0 for 'any')", &sc[37][0], 15);
        strprompt("POP3 server port (-1 to disable)", &sc[23][0], 5);
        strprompt("IMAP server port (-1 to disable)", &sc[27][0], 5);
        strprompt("SMTP server port (-1 to disable)", &sc[24][0], 5);
index e62655e1e72f5cc82703b6e9759bf6a1d810e701..d69a85dea0506d8b34d0eee64579d7bd9c38b2d3 100644 (file)
@@ -452,7 +452,8 @@ void CtdlRegisterServiceHook(int tcp_port,
                return;
        }
        else {
-               newfcn->msock = ig_tcp_server(NULL, tcp_port,
+               newfcn->msock = ig_tcp_server(config.c_ip_addr,
+                                       tcp_port,
                                        config.c_maxsessions);
                snprintf(message, sizeof message, "TCP port %d: ", tcp_port);
        }
index 88d6be7096c67d4e7c0c6e12db04b6f1d0bc1dc2..79b0d9c13f54254fe9cb5b0e0e9e42c96eb67641 100644 (file)
@@ -168,6 +168,10 @@ void update_config(void) {
                config.c_ldap_port = 389;
        }
 
+       if (CitControl.version < 623) {
+               strcpy(config.c_ip_addr, "0.0.0.0");
+       }
+
        put_config();
 }
 
index 88b9d352231a152847027a029955ec7a034cd7d3..02f59123f7addf7cb41e798cc8bbc8540075fe33 100644 (file)
@@ -32,7 +32,7 @@
 #endif
 
 
-#define MAXSETUP 3     /* How many setup questions to ask */
+#define MAXSETUP 4     /* How many setup questions to ask */
 
 #define UI_TEXT                0       /* Default setup type -- text only */
 #define UI_SILENT      3       /* Silent running, for use in scripts */
@@ -51,6 +51,7 @@ char *setup_titles[] =
        "Citadel Home Directory",
        "System Administrator",
        "Citadel User ID",
+       "Server IP address",
        "Server port number",
 };
 
@@ -72,6 +73,11 @@ char *setup_text[] =
 "user ID.  Please specify that user ID here.  You may specify either a\n"
 "user name or a numeric UID.\n",
 
+"Specify the IP address on which your server will run.  If you leave this\n"
+"blank, or if you specify 0.0.0.0, Citadel will listen on all addresses.\n"
+"You can usually skip this unless you're running multiple instances of\n"
+"Citadel on the same computer.\n",
+
 "Specify the TCP port number on which your server will run.  Normally, this\n"
 "will be port 504, which is the official port assigned by the IANA for\n"
 "Citadel servers.  You'll only need to specify a different port number if\n"
@@ -711,6 +717,10 @@ void edit_value(int curr)
                break;
 
        case 3:
+               set_str_val(curr, &config.c_ip_addr);
+               break;
+
+       case 4:
                set_int_val(curr, &config.c_port_number);
                break;
 
index d589b6e44a36745f481721179a3f535b4232bd92..3875d332677870e4ba1f8a8aba530ecfdd1b83df 100644 (file)
@@ -34,8 +34,8 @@ what you did, so that your new commands can be added to this document.
 document, but we will briefly cover the methodology employed by Citadel/UX.
 
  Citadel/UX offers Citadel BBS service using TCP/IP.  It does so via a
-multithreaded server listening on a TCP port.  Older (4.xx) versions employed
-an inetd-based server.
+multithreaded server listening on a TCP port.  Local connections may also
+be made using the same protocol using Unix domain sockets.
 
  The port number officially assigned to Citadel by the IANA is 504/tcp.  Since
 our session layer assumes a clean, reliable, sequenced connection, the use
@@ -1795,6 +1795,7 @@ fails for any reason, ERROR is returned.
  35. LDAP Base DN
  36. LDAP Bind DN
  37. Password for LDAP Bind DN
+ 38. Server IP address to listen on (or "0.0.0.0" for all addresses)
 
  CONF also accepts two additional commands: GETSYS and PUTSYS followed by an
 arbitrary MIME type (such as application/x-citadel-internet-config) which