updates.
authorPekka Riikonen <priikone@silcnet.org>
Wed, 11 Apr 2001 20:15:54 +0000 (20:15 +0000)
committerPekka Riikonen <priikone@silcnet.org>
Wed, 11 Apr 2001 20:15:54 +0000 (20:15 +0000)
CHANGES
Makefile.am
apps/silcd/packet_send.c
apps/silcd/server.h
configure.in.pre
doc/example_silc.conf
doc/example_silcd.conf
lib/silcclient/client.c
lib/silcclient/client.h

diff --git a/CHANGES b/CHANGES
index 7e4fd78e418356cdb5936d9ada5697af5e43709b..25a47e4db3ddf93464e2b607e97a5f68f6218b30 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,18 @@
+Wed Apr 11 22:10:15 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
+
+       * Disable force sending of packets when REKEY protocol is active.
+         We must assure that no packet is sent directly when rekey is
+         performed.  All packets must be sent through packet queue.
+         Added macro SILC_SERVER_IS_REKEY to silcd/server.h and
+         SILC_CLIENT_IS_REKEY to lib/silcclient/client.h.  Affected
+         function is silc_[server/client]_packet_send_real to check
+         the situation.
+
+       * Replaced the SIM paths from example config files to 
+         /usr/local/modules.  Also, make install creates now
+         /usr/local/silc/logs directory to hold all the SILC server
+         logs.
+
 Wed Apr 11 16:59:59 EEST 2001  Pekka Riikonen <priikone@poseidon.pspt.fi>
 
        * Made the configure.in.pre work on Solaris.  Patch by salo.
index 2f848f0c981efd1630e85afe07c97035d1570b78..b07aebccdc201957ca99be9ea7bbe8548ba82fa9 100644 (file)
@@ -32,16 +32,18 @@ EXTRA_DIST = CHANGES CREDITS
 # Installing of SILC into the system
 #
 
+etcdir = @ETCDIR@
 modulesdir = $(prefix)/@MODULESDIR@
 helpdir = $(prefix)/@HELPDIR@
 docdir = $(prefix)/@DOCDIR@
-etcdir = @ETCDIR@
+logsdir = $(prefix)/@LOGSDIR@
 
 install-dirs:
        -mkdir -p $(etcdir)
        -mkdir -p $(modulesdir)
        -mkdir -p $(helpdir)
        -mkdir -p $(docdir)
+       -mkdir -p $(logsdir)
 
 generate-server-key:
        -$(sbindir)/silcd -C $(etcdir)
@@ -50,8 +52,13 @@ sim-install:
        -cp -fR $(srcdir)/lib/silcsim/modules/*.so $(modulesdir)/
 
 doc-install:
-       -cp -fR $(srcdir)/doc/* $(docdir)/
+       $(INSTALL_DATA) $(srcdir)/doc/CodingStyle $(docdir)/
+       $(INSTALL_DATA) $(srcdir)/doc/FAQ $(docdir)/
+       $(INSTALL_DATA) $(srcdir)/doc/example* $(docdir)/
+       $(INSTALL_DATA) $(srcdir)/doc/*.txt $(docdir)/
        $(INSTALL_DATA) $(srcdir)/COPYING $(docdir)/
+       $(INSTALL_DATA) $(srcdir)/CHANGES $(docdir)/
+       $(INSTALL_DATA) $(srcdir)/CREDITS $(docdir)/
        $(INSTALL_DATA) $(srcdir)/README $(docdir)/
        $(INSTALL_DATA) $(srcdir)/INSTALL $(docdir)/
        $(INSTALL_DATA) $(srcdir)/TODO $(docdir)/
@@ -60,6 +67,7 @@ etc-install:
        -@if test '!' -f $(etcdir)/silcd.conf ; then \
          $(INSTALL_DATA) $(srcdir)/doc/example_silcd.conf \
          $(etcdir)/silcd.conf; \
+          chmod go= $(etcdir)/silcd.conf; \
        fi
        -@if test '!' -f $(etcdir)/silc.conf ; then \
          $(INSTALL_DATA) $(srcdir)/doc/example_silc.conf \
index a88eedbeac363bf0ce46ab0694529d98d77cb539..a08c5eb0d6b95ba67a33852a7e0c57cf9c3291b2 100644 (file)
@@ -35,6 +35,11 @@ int silc_server_packet_send_real(SilcServer server,
 {
   int ret;
 
+  /* If rekey protocol is active we must assure that all packets are
+     sent through packet queue. */
+  if (SILC_SERVER_IS_REKEY(sock))
+    force_send = FALSE;
+
   /* Send the packet */
   ret = silc_packet_send(sock, force_send);
   if (ret != -2)
index e62c6b92d2962622f5400bdb424595c4856cb56a..613d64eab3c574dd3dd5bda925347ac519c2af46 100644 (file)
@@ -79,6 +79,11 @@ do {                                                         \
   silc_free(__fmt__);                                          \
 } while(0);
 
+/* Check whether rekey protocol is active */
+#define SILC_SERVER_IS_REKEY(sock)                                     \
+  (sock->protocol && sock->protocol->protocol &&                       \
+   sock->protocol->protocol->type == SILC_PROTOCOL_SERVER_REKEY)
+
 /* Prototypes */
 int silc_server_alloc(SilcServer *new_server);
 void silc_server_free(SilcServer server);
index 082b165b24a1387d0710289be5115149d22e519f..ec98514206216cf045a78af2c4a631e547f40d9b 100644 (file)
@@ -126,7 +126,7 @@ AC_CHECK_HEADERS(dlfcn.h,
 #
 
 # Default installation destination
-AC_PREFIX_DEFAULT(/usr/local/silc/)
+AC_PREFIX_DEFAULT(/usr/local/silc)
 
 # etc directory
 ETCDIR="/etc/silc"
@@ -192,6 +192,22 @@ AC_ARG_WITH(simdir,
 )
 AC_SUBST(MODULESDIR)
 
+# Logs directory
+LOGSDIR="logs"
+AC_ARG_WITH(logsdir,
+[  --with-logsdir[=PATH]   Directory for Server logs [PREFIX/logs]],
+[ case "$withval" in
+  no)
+    ;;
+  yes)
+    ;;
+  *)
+    LOGSDIR="$withwal"
+    ;;
+  esac ],
+)
+AC_SUBST(LOGSDIR)
+
 # Debug checking
 AC_MSG_CHECKING(for enabled debugging)
 AC_ARG_ENABLE(debug,
@@ -212,7 +228,7 @@ esac ], CFLAGS="-O2 -g $CFLAGS"
 # SOCKS4 support checking
 AC_MSG_CHECKING(whether to support SOCKS4)
 AC_ARG_WITH(socks4,
-[  --with-socks4[=PATH]    Compile with SOCKS4 support.],
+[  --with-socks4[=PATH]    Compile with SOCKS4 support],
 [ case "$withval" in
   no)
     AC_MSG_RESULT(no)
@@ -246,7 +262,7 @@ AC_ARG_WITH(socks4,
 # SOCKS5 support checking
 AC_MSG_CHECKING(whether to support SOCKS5)
 AC_ARG_WITH(socks5,
-[  --with-socks5[=PATH]    Compile with SOCKS5 support.],
+[  --with-socks5[=PATH]    Compile with SOCKS5 support],
 [ case "$withval" in
   no)
     AC_MSG_RESULT(no)
@@ -348,7 +364,7 @@ esac ], [
 AC_ARG_WITH(silcd-config-file,
 [  --with-silcd-config-file[=PATH]
                           Use PATH as default configuration file in SILC
-                          server.],
+                          server [/etc/silc/silcd.conf]],
 [ AC_DEFINE_UNQUOTED(SILC_SERVER_CONFIG_FILE, "$withval") ])
 
 # XXX
index 6b88d8125497d225c7df4825bfe1053bdb92dd85..71fce70c059c100f98aedd2d494399f1e6ff4d05 100644 (file)
@@ -6,16 +6,16 @@
 # If the cipher is builtin the <module path> maybe omitted.
 #
 [cipher]
-aes-256-cbc:../lib/silcsim/modules/aes.sim.so:32:16
-aes-192-cbc:../lib/silcsim/modules/aes.sim.so:24:16
-aes-128-cbc:../lib/silcsim/modules/aes.sim.so:16:16
-twofish-256-cbc:../lib/silcsim/modules/twofish.sim.so:32:16
-twofish-192-cbc:../lib/silcsim/modules/twofish.sim.so:24:16
-twofish-128-cbc:../lib/silcsim/modules/twofish.sim.so:16:16
-mars-256-cbc:../lib/silcsim/modules/mars.sim.so:32:16
-mars-192-cbc:../lib/silcsim/modules/mars.sim.so:24:16
-mars-128-cbc:../lib/silcsim/modules/mars.sim.so:16:16
-none:../lib/silcsim/modules/none.sim.so:0:0
+aes-256-cbc:/usr/local/silc/silc/modules/aes.sim.so:32:16
+aes-192-cbc:/usr/local/silc/modules/aes.sim.so:24:16
+aes-128-cbc:/usr/local/silc/modules/aes.sim.so:16:16
+twofish-256-cbc:/usr/local/silc/modules/twofish.sim.so:32:16
+twofish-192-cbc:/usr/local/silc/modules/twofish.sim.so:24:16
+twofish-128-cbc:/usr/local/silc/modules/twofish.sim.so:16:16
+mars-256-cbc:/usr/local/silc/modules/mars.sim.so:32:16
+mars-192-cbc:/usr/local/silc/modules/mars.sim.so:24:16
+mars-128-cbc:/usr/local/silc/modules/mars.sim.so:16:16
+none:/usr/local/silc/modules/none.sim.so:0:0
 
 #
 # Configured hash functions.
index a3b878a430c3f8d4ee64d38990abe48146757d50..c149bc00598ad6daad71891d0354534aa4e06049 100644 (file)
@@ -6,16 +6,16 @@
 # If the cipher is builtin the <module path> maybe omitted.
 #
 [Cipher]
-aes-256-cbc:../lib/silcsim/modules/aes.sim.so:32:16
-aes-192-cbc:../lib/silcsim/modules/aes.sim.so:24:16
-aes-128-cbc:../lib/silcsim/modules/aes.sim.so:16:16
-twofish-256-cbc:../lib/silcsim/modules/twofish.sim.so:32:16
-twofish-192-cbc:../lib/silcsim/modules/twofish.sim.so:24:16
-twofish-128-cbc:../lib/silcsim/modules/twofish.sim.so:16:16
-mars-256-cbc:../lib/silcsim/modules/mars.sim.so:32:16
-mars-192-cbc:../lib/silcsim/modules/mars.sim.so:24:16
-mars-128-cbc:../lib/silcsim/modules/mars.sim.so:16:16
-none:../lib/silcsim/modules/none.sim.so:0:0
+aes-256-cbc:/usr/local/silc/modules/aes.sim.so:32:16
+aes-192-cbc:/usr/local/silc/modules/aes.sim.so:24:16
+aes-128-cbc:/usr/local/silc/modules/aes.sim.so:16:16
+twofish-256-cbc:/usr/local/silc/modules/twofish.sim.so:32:16
+twofish-192-cbc:/usr/local/silc/modules/twofish.sim.so:24:16
+twofish-128-cbc:/usr/local/silc/modules/twofish.sim.so:16:16
+mars-256-cbc:/usr/local/silc/modules/mars.sim.so:32:16
+mars-192-cbc:/usr/local/silc/modules/mars.sim.so:24:16
+mars-128-cbc:/usr/local/silc/modules/mars.sim.so:16:16
+none:/usr/local/silc/modules/none.sim.so:0:0
 
 #
 # Configured hash functions.
@@ -106,10 +106,10 @@ lassi.kuo.fi.ssh.com:10.2.1.6:Kuopio, Finland:706
 #         fatallogile:<path>:<max byte size>
 #
 [Logging]
-infologfile:silcd.log:10000
-#warninglogfile:/var/log/silcd_warning.log:10000
-#errorlogfile:ERROR.log:10000
-#fatallogfile:/var/log/silcd_error.log:
+infologfile:/usr/local/silc/logs/silcd.log:10000
+#warninglogfile:/usr/local/silc/logs/silcd_warning.log:10000
+#errorlogfile:/usr/local/silc/logs/error.log:10000
+#fatallogfile:/usr/local/silc/logs/silcd_error.log:
 
 #
 # Connection classes.
index a43baa1146c4afc3cfde1514f0a9133f6d163780..12900bd103a4c9fb412d0a0fb59fe1595794886b 100644 (file)
@@ -585,6 +585,11 @@ int silc_client_packet_send_real(SilcClient client,
 {
   int ret;
 
+  /* If rekey protocol is active we must assure that all packets are
+     sent through packet queue. */
+  if (SILC_CLIENT_IS_REKEY(sock))
+    force_send = FALSE;
+
   /* Send the packet */
   ret = silc_packet_send(sock, force_send);
   if (ret != -2)
index b16e308f415185621751a090df47d88cf2f2c901..4730a65a3f33e08ab9f0b3591b33395b9fc42fda 100644 (file)
@@ -232,6 +232,11 @@ do {                                                       \
     (__sock) = (__x)->conns[__i]->sock;                        \
 } while(0)
 
+/* Check whether rekey protocol is active */
+#define SILC_CLIENT_IS_REKEY(sock)                                     \
+  (sock->protocol && sock->protocol->protocol &&                       \
+   sock->protocol->protocol->type == SILC_PROTOCOL_CLIENT_REKEY)
+
 /* Prototypes (some of the prototypes are defined in the silcapi.h) */
 
 void silc_client_packet_send(SilcClient client,