Changeset 307


Ignore:
Timestamp:
Dec 3, 2010, 10:44:38 PM (14 years ago)
Author:
katerina
Message:

Fix for ticket #229 (malfunction on CentOS 4.8 / gcc4), documentation update.

Location:
trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/docs/Changelog

    r305 r307  
    112.8.1:
     2        * Document handling of missing files with secondary schedule
    23        * Fix incorrect handling of missing files when secondary schedule
    34          is used (reported by Sergey)
     
    1213          reported by M. El Nahass (time.h missing in src/sh_login_track.c)
    1314
    14 2.8.0:
     152.8.0 (01-11-2010):
    1516        * Support IPv6
    1617        * Add registry checking
    1718        * Use auditd records to find out who did it
    1819
    19 2.7.2c:
     202.7.2c (23-09-2010):
    2021        * Fix uppercase hostname problem in client/server communication
    2122
    2223
    23 2.7.2b:
     242.7.2b (05-09-2010):
    2425        * Fix compile errors on Solaris 10 (reported by A. Saheba)
    2526
    26 2.7.2a:
     272.7.2a (23-08-2010):
    2728        * rewrote rijndaelKeySched() in a more conservative way to fix
    2829          compile problem on SLES 11.
    2930
    30 2.7.2:
     312.7.2 (16-08-2010):
    3132        * sh_utils.c: fixed an endianess issue that prevented cross-verification
    3233          of email signatures (reported by A. Zangerl)
     
    4243          Need to provide a dummy argp[].
    4344
    44 2.7.1:
     452.7.1 (07-06-2010):
    4546        * samhain_kmem.c: fix compile problems
    4647        * fix problems with config file parser: increase max. line length,
  • trunk/docs/HOWTO-client+server-troubleshooting.html

    r91 r307  
    135135<ul>
    136136  <li>Almost all problems can only be diagnosed correctly by checking the
    137       <b>server</b> logs</li>
    138   <li>If the server does not write logs, <b>fix this first</b>. For debugging,
    139       stop the server, then run it in the foreground with
    140       <tt>yule -p info --foreground</tt></li>
     137      <b>server logs</b>.</li>
     138  <li>
     139    If the server does not write logs, <b>fix this first</b>. For debugging,
     140    stop the server, then run it in the foreground with
     141    <tt>yule -p info --foreground</tt>
     142    <ul>
     143      <li>
     144        By default, the server logs to the file
     145        <tt>/var/log/yule/yule_log</tt>, and since the server drops
     146        root privileges on startup, the directory <tt>/var/log/yule</tt>
     147        must be writable for the nonprivileged user the server runs
     148        as (the first existing out of: yule, daemon, nobody).
     149      </li>
     150      <li>
     151        Logging to the logfile must be enabled in the
     152        <tt>/etc/yulerc</tt> config file (e.g. LogSeverity=mark, or
     153        LogSeverity=info for enhanced verbosity).
     154      </li>
     155    </ul>
     156  </li>
    141157</ul>
    142158</div>
     
    257273     <p>
    258274     <p>
    259      This does not work for a number of people because (1) the
    260      <tt>/etc/hosts</tt> file on the client machine has errors
    261      (yes, there are plenty machines with a completely
    262      messed up <tt>/etc/hosts</tt> file), (2) the
    263      server cannot resolve the client address because the local DNS is
    264      f***ed up, or (3) the client machine has multiple network interfaces, and
    265      the interface used is not the one the client name resolves to.
    266      </p>
    267 
    268        <p>
     275     This does not work for a number of people because
     276     <ol>
     277       <li>
     278         the
     279         <tt>/etc/hosts</tt> file on the client machine has errors
     280         (yes, there are plenty machines with a completely
     281         messed up <tt>/etc/hosts</tt> file),
     282       </li>
     283       <li>
     284         the
     285         server cannot resolve the client address because the local DNS is
     286         misconfigured, or
     287       </li>
     288       <li>
     289         the client machine has multiple network interfaces, and
     290         the interface used is not the one the client name resolves to.
     291       </li>
     292     </ol>
     293     </p>
     294
     295     <p>
    269296       If the client uses the wrong interface on a multi-interface machine,
    270297       there is a config file option
     
    272299       that allows to choose the interface the client will use for
    273300       outgoing connections.
    274        </p>
    275        <p>
     301     </p>
     302     <p>
    276303       If you want to download the config file from the server, you
    277304       should instead use the corresponding command line option
    278305       <tt>--bind-address=</tt><i>IP address</i>
    279306       to select the interface.
    280        </p>
    281 
    282      <p>
    283      If you encounter problems, you may (1) fix your
    284      <tt>/etc/hosts</tt> file(s), (2) fix your local DNS, or
    285      (3) switch to the second method.
    286      </p>
    287      <p>
    288      Errors in name resolving/cross-checking can be avoided by setting a
    289      very low severity (lower than the logging threshold), e.g.
    290      </p>
    291      <p>
    292      <tt>SeverityLookup=</tt><i>debug</i>
    293      </p>
    294      <p>
    295      in the <i>Misc</i> section of the server configuration,
    296      if you prefer running <i>unsafe</i> at any speed
    297      instead of fixing the problem (you have been warned). Doing so will
    298      allow an attacker to pose as the client.
     307     </p>
     308
     309     <p>
     310       If you encounter problems, you may (1) fix your
     311       <tt>/etc/hosts</tt> file(s), (2) fix your local DNS, or
     312       (3) switch to the second method.
     313     </p>
     314     <p>
     315       Error messages related to name resolving/cross-checking can be
     316       suppressed by setting a
     317       very low severity (lower than the logging threshold), e.g.
     318     </p>
     319     <p>
     320       <tt>SeverityLookup=</tt><i>debug</i>
     321     </p>
     322     <p>
     323       in the <i>Misc</i> section of the server configuration,
     324       if you prefer running <i>unsafe</i> at any speed
     325       instead of fixing the problem (you have been warned). Doing so will
     326       allow an attacker to pose as the client.
    299327     </p>
    300328  </li>
     
    325353<p>
    326354The client does <i>not</i> tell the server the path to the requested
    327 file - it just requests a config or a database file. It's entirely the
     355file - it just tells the <em>type</em> of the file, i.e.
     356either a configuration file or a database file. It is entirely the
    328357responsibility of the server to locate the correct file and send it.
    329358</p>
     
    356385To fix: put the file in the correct location, make sure the permissions
    357386are ok.
     387<ul>
     388  <li>
     389    Note that <em>the server drops root privileges at startup</em> and
     390    runs as an unprivileged user (the first existing out of:
     391    yule, daemon, nobody).
     392  </li>
     393  <li>
     394    Also remember that to access a file, at least execute permission is required
     395    <em>for every directory in the path</em>.
     396  </li>
     397</ul>
    358398</p>
    359399
  • trunk/docs/HOWTO-samhain-on-windows.html

    r297 r307  
    278278the Cygwin filesystem view, i.e. <tt>/cygdrive/c/...</tt>, otherwise
    279279samhain may not work from a pure DOS shell, and may not run as a Windows
    280 service.
     280service [Rainer Wichmann].
    281281</p>
    282282</div>
     
    399399</li>
    400400</ul>
     401<div class="block">
     402<p>
     403It seems that start/stop/restart the service does not work if samhain
     404is configured to run as a daemon, because the Windows service manager
     405cannot track the forked daemon process.
     406</p>
     407<p>Therefore, if you run Samhain as a Windows service, it might be better
     408to configure it as a 'normal' process which does not fork a daemon:
     409<ul>
     410  <li>
     411    Set 'Daemon = no' in the samhainrc configuration file.
     412  </li>
     413  <li>
     414    Edit the key HKEY_LOCAL_MACHINE-&gt;SYSTEM-&gt;CurrentControlSet-&gt;Services-&gt;Samhain->Parameters to add a string value named 'AppParameters', with
     415    the value '--forever'.
     416  </li>
     417</ul>
     418[Rainer Wichmann].
     419</p>
     420</div>
    401421<p>
    402422Also see <a href="http://support.microsoft.com/kb/q137890/">http://support.microsoft.com/kb/q137890/</a> for information regarding the creation of a
  • trunk/src/samhain.c

    r305 r307  
    20242024          if (flag_check_2 == 1 || FileSchedTwo == NULL)
    20252025            {
    2026               fprintf(stderr, "FIXME check unvisited\n");
    20272026              TPT((0, FIL__, __LINE__, _("msg=<Check for missing files.>\n")))
    20282027              sh_hash_unvisited (ShDFLevel[SH_ERR_T_FILE]);
  • trunk/src/sh_calls.c

    r295 r307  
    226226  } while (val_retry < 0 && errno == EINTR);
    227227
    228   *addrlen = (int) my_addrlen;
    229228  error = errno;
    230229  if (val_retry < 0) {
     
    237236  sh_ipvx_save(serv_addr, ss.ss_family, (struct sockaddr *) &ss);
    238237
     238  *addrlen = (int) my_addrlen;
    239239  SL_RETURN(val_retry, _("retry_accept"));
    240240}
  • trunk/src/sh_files.c

    r305 r307  
    377377                  if (S_FALSE == sh_ignore_chk_del(ptr->name))
    378378                    {
    379                       fprintf(stderr, "FIXME 1 %s, %d\n", ptr->name, ptr->is_reported);
    380379                      if (0 != hashreport_missing(ptr->name,
    381380                                                  (ptr->class == SH_LEVEL_ALLIGNORE) ?
     
    436435                      if (S_FALSE == sh_ignore_chk_del(ptr->name))
    437436                        {
    438                           fprintf(stderr, "FIXME 2 %s, %d\n", ptr->name, ptr->is_reported);
    439437                          if (0 != hashreport_missing(ptr->name,
    440438                                                      (ptr->class == SH_LEVEL_ALLIGNORE) ?
     
    12921290              if (S_FALSE == sh_ignore_chk_del(ptr->name))
    12931291                {
    1294                   fprintf(stderr, "FIXME 2 %s, %d\n", ptr->name, ptr->is_reported);
    12951292                  if (0 != hashreport_missing(ptr->name,
    12961293                                              (ptr->class == SH_LEVEL_ALLIGNORE) ?
  • trunk/src/sh_forward.c

    r295 r307  
    50285028#endif
    50295029
    5030   int                sock = -1;
     5030  /* Use volatile to circumvent a gcc4 problem on RH/CentOS 4.8 (?) */
     5031  volatile int       sock = -1;
    50315032  sh_conn_t        * cx;
    50325033  fd_set             readset;
  • trunk/src/sh_hash.c

    r305 r307  
    688688         
    689689          goto end;
    690           SL_RET0(_("sh_hash_remove"));
    691690#else
    692691          SET_SH_FFLAG_REPORTED(p->fflags);
Note: See TracChangeset for help on using the changeset viewer.