Changeset 203 for trunk/src


Ignore:
Timestamp:
Dec 7, 2008, 7:26:17 PM (16 years ago)
Author:
katerina
Message:

Fix compile failures on RHEL3 (ticket #130) and FreeBSD7 amd64 (ticket #131).

Location:
trunk/src
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/make-tests.sh

    r172 r203  
    2020#include <stdio.h>
    2121#include "CuTest.h"
     22#include "config.h"
    2223
    2324'
  • trunk/src/samhain.c

    r174 r203  
    824824  ino = (long) buf.st_ino;
    825825   
    826   if (NULL == (dp = opendir("/proc")))
     826  if (NULL == (dp = opendir(_("/proc"))))
    827827    {
    828828      return NULL;
  • trunk/src/sh_gpg.c

    r198 r203  
    257257  char   cc3[32];
    258258  char   cc4[SH_PATHBUF+32];
    259   char   cc5[32] = "--no-tty";
     259  char   cc5[32];
    260260#endif
    261261
     
    283283  /* sl_strlcpy (cc4,   sh.effective.home, SH_PATHBUF+32); */
    284284  sl_strlcpy (cc4,   homedir,           SH_PATHBUF+32);
    285   sl_strlcat (cc4,   _("/.gnupg"),      SH_PATHBUF+32);
     285  sl_strlcat (cc4,   _("/.gnupg"),      SH_PATHBUF+32);
     286  sl_strlcpy (cc5,   _("--no-tty"),     32);
    286287
    287288  /* fprintf(stderr, "YULE: homedir=%s\n", homedir); */
     
    416417      envp[0] = malloc (len); /* free() ok   */
    417418      if (envp[0] != NULL)
    418         sl_snprintf (envp[0], len, "HOME=%s", sh.effective.home);
     419        sl_snprintf (envp[0], len, _("HOME=%s"), sh.effective.home);
    419420      envp[1] = NULL;
    420421    }
  • trunk/src/sh_log_check.c

    r199 r203  
    1414
    1515/* Debian/Ubuntu: libpcre3-dev */
     16#ifdef HAVE_PCRE_PCRE_H
     17#include <pcre/pcre.h>
     18#else
    1619#include <pcre.h>
     20#endif
    1721
    1822#include "samhain.h"
  • trunk/src/sh_log_evalrule.c

    r186 r203  
    1515
    1616/* Debian/Ubuntu: libpcre3-dev */
     17#ifdef HAVE_PCRE_PCRE_H
     18#include <pcre/pcre.h>
     19#else
    1720#include <pcre.h>
     21#endif
     22
     23#ifndef PCRE_NO_AUTO_CAPTURE
     24#define PCRE_NO_AUTO_CAPTURE 0
     25#endif
    1826
    1927#include "samhain.h"
  • trunk/src/sh_log_parse_apache.c

    r186 r203  
    2929
    3030/* Debian/Ubuntu: libpcre3-dev */
     31#ifdef HAVE_PCRE_PCRE_H
     32#include <pcre/pcre.h>
     33#else
    3134#include <pcre.h>
     35#endif
    3236
    3337#include "samhain.h"
  • trunk/src/sh_log_parse_pacct.c

    r199 r203  
    227227sh_string * sh_read_pacct (sh_string * record, struct sh_logfile * logfile)
    228228{
    229 #if defined(__linux__)
     229#if defined(__linux__) && defined(HAVE_ACCT_V3)
    230230#  define STRUCT_ACCT struct acct_v3
    231231#else
  • trunk/src/sh_processcheck.c

    r183 r203  
    196196  char *      tmp;
    197197
    198   sl_snprintf (path, sizeof(path), "/proc/%ld/exe", (unsigned long) pid);
     198  sl_snprintf (path, sizeof(path), _("/proc/%ld/exe"), (unsigned long) pid);
    199199
    200200  if (0 == retry_lstat(FIL__, __LINE__, path, &sbuf) && S_ISLNK(sbuf.st_mode))
     
    203203    }
    204204
    205   sl_snprintf (path, sizeof(path), "/proc/%ld/file", (unsigned long) pid);
     205  sl_snprintf (path, sizeof(path), _("/proc/%ld/file"), (unsigned long) pid);
    206206
    207207  if (0 == retry_lstat(FIL__, __LINE__, path, &sbuf) && S_ISLNK(sbuf.st_mode))
     
    210210    }
    211211
    212   sl_snprintf (path, sizeof(path), "/proc/%ld/path/a.out", (unsigned long) pid);
     212  sl_snprintf (path, sizeof(path), _("/proc/%ld/path/a.out"), (unsigned long) pid);
    213213
    214214  if (0 == retry_lstat(FIL__, __LINE__, path, &sbuf) && S_ISLNK(sbuf.st_mode))
  • trunk/src/sh_unix.c

    r200 r203  
    20832083      int r;
    20842084
    2085       while((r = waitpid(pid, &status, WCONTINUED|WUNTRACED)) != pid && r != -1) ;
     2085      while((r = waitpid(pid, &status, WUNTRACED)) != pid && r != -1) ;
    20862086
    20872087#if !defined(USE_UNO)
  • trunk/src/sh_userfiles.c

    r149 r203  
    215215     * So, compare longest strings first */
    216216    if( s == NULL ) /* The default */          new->level = default_level;
    217     else if ( strstr(s, "attributes")!= NULL ) new->level = SH_LEVEL_ATTRIBUTES;
    218     else if ( strstr(s, "allignore") != NULL ) new->level = SH_LEVEL_ALLIGNORE;
    219     else if ( strstr(s, "noignore")  != NULL ) new->level = SH_LEVEL_NOIGNORE;
    220     else if ( strstr(s, "logfiles")  != NULL ) new->level = SH_LEVEL_LOGFILES;
    221     else if ( strstr(s, "readonly")  != NULL ) new->level = SH_LEVEL_READONLY;
    222     else if ( strstr(s, "loggrow")   != NULL ) new->level = SH_LEVEL_LOGGROW;
    223     else if ( strstr(s, "user0")     != NULL ) new->level = SH_LEVEL_USER0;
    224     else if ( strstr(s, "user1")     != NULL ) new->level = SH_LEVEL_USER1;
    225     else if ( strstr(s, "user2")     != NULL ) new->level = SH_LEVEL_USER2;
    226     else if ( strstr(s, "user3")     != NULL ) new->level = SH_LEVEL_USER3;
    227     else if ( strstr(s, "user4")     != NULL ) new->level = SH_LEVEL_USER4;
    228     else if ( strstr(s, "prelink")   != NULL ) new->level = SH_LEVEL_PRELINK;
     217    else if ( strstr(s, _("attributes"))!= NULL ) new->level = SH_LEVEL_ATTRIBUTES;
     218    else if ( strstr(s, _("allignore")) != NULL ) new->level = SH_LEVEL_ALLIGNORE;
     219    else if ( strstr(s, _("noignore"))  != NULL ) new->level = SH_LEVEL_NOIGNORE;
     220    else if ( strstr(s, _("logfiles"))  != NULL ) new->level = SH_LEVEL_LOGFILES;
     221    else if ( strstr(s, _("readonly"))  != NULL ) new->level = SH_LEVEL_READONLY;
     222    else if ( strstr(s, _("loggrow"))   != NULL ) new->level = SH_LEVEL_LOGGROW;
     223    else if ( strstr(s, _("user0"))     != NULL ) new->level = SH_LEVEL_USER0;
     224    else if ( strstr(s, _("user1"))     != NULL ) new->level = SH_LEVEL_USER1;
     225    else if ( strstr(s, _("user2"))     != NULL ) new->level = SH_LEVEL_USER2;
     226    else if ( strstr(s, _("user3"))     != NULL ) new->level = SH_LEVEL_USER3;
     227    else if ( strstr(s, _("user4"))     != NULL ) new->level = SH_LEVEL_USER4;
     228    else if ( strstr(s, _("prelink"))   != NULL ) new->level = SH_LEVEL_PRELINK;
    229229    else            /* The default */          new->level = default_level;
    230230
  • trunk/src/slib.c

    r200 r203  
    10941094{
    10951095#ifndef HAVE_STRSTR
    1096   insigned int    i;
     1096  unsigned int    i;
    10971097  size_t          needle_len;
    10981098  size_t          haystack_len;
Note: See TracChangeset for help on using the changeset viewer.