[srm-cvs] CVS Update: - Added the no_tcp_ip setting to restrict access to the Unix socket only

From: <d.rethans[@]jdimedia.nl>
Date: Sat Oct 19 2002 - 14:22:50 CEST

Date: Sat Oct 19 14:22:49 CEST 2002
User: Derick Rethans
Directory: srm/main

Log Message:
 [0.25]
 - Added the no_tcp_ip setting to restrict access to the Unix socket only
   (defaults to 1 (no TCP/IP))
 
Modified files:
           srm/main/main.c (version: 1.60)

[FILE: /srm/main/main.c]

--- srm/main/main.c:1.59 Sun Oct 06 20:34:11 2002 GMT
+++ srm/main/main.c Sat Oct 19 10:22:48 2002 GMT
@@ -1,4 +1,4 @@
-/* $Id: cvstemp,v 1.59 2002/10/06 22:34:11 kalowsky Exp $ */
+/* $Id: cvstemp,v 1.60 2002/10/19 12:22:48 derick Exp $ */
 
 /* The contents of this file are subject to the Vulcan Logic Public
  * License Version 1.1 (the "License"); you may not use this file
@@ -53,6 +53,7 @@
         srm_ui32 application_lock_store_items;
         srm_ui32 session_lock_store_items;
         char *save_path;
+ int no_tcp_ip;
 END_INI_ENTRIES;
 
 
@@ -139,6 +140,7 @@
         INI_SETTING (logfile) = INI_SETTING_STR ("srm", "logfile", "/var/log/srm");
         INI_SETTING (loglevel) = INI_SETTING_UC32 ("srm", "log_level", 30);
         INI_SETTING (port) = INI_SETTING_UC32 ("srm", "port", 7700);
+ INI_SETTING (no_tcp_ip) = INI_SETTING_UC8 ("srm", "no_tcp_ip", 1);
         INI_SETTING (application_store_items) = INI_SETTING_UC32 ("store", "application_items", 2048);
         INI_SETTING (session_store_items) = INI_SETTING_UC32 ("store", "session_items", 4096);
         INI_SETTING (application_lock_store_items) = INI_SETTING_UC32 ("store", "application_lock_items", 1024);
@@ -264,9 +266,14 @@
 ** Initializing connections
 */
 
- srm_setup_socket (&rendezvous_s_in, AF_INET, (int) INI_SETTING(port), NULL);
- srm_setup_socket (&rendezvous_s_un, AF_UNIX, 0, INI_SETTING(sockname));
- CP_SETUP(rendezvous_s_in, rendezvous_s_un);
+ if (!INI_SETTING(no_tcp_ip)) {
+ srm_setup_socket (&rendezvous_s_in, AF_INET, (int) INI_SETTING(port), NULL);
+ CP_SETUP(rendezvous_s_in, rendezvous_s_in);
+ } else {
+ srm_setup_socket (&rendezvous_s_in, AF_INET, (int) INI_SETTING(port), NULL);
+ srm_setup_socket (&rendezvous_s_un, AF_UNIX, 0, INI_SETTING(sockname));
+ CP_SETUP(rendezvous_s_in, rendezvous_s_un);
+ }
 
 /******************************************************************************
 ** Main loop
Received on Sat Oct 19 14:25:49 2002

This archive was generated by hypermail 2.1.8 : Tue Jan 06 2009 - 06:00:02 CET