Changeset 486 for trunk


Ignore:
Timestamp:
Sep 1, 2015, 8:28:42 PM (9 years ago)
Author:
katerina
Message:

Fix for ticket #384 (use logger utility in posix compliant way).

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/docs/Changelog

    r485 r486  
    114.1.0:
     2        * fix safe_logger() - uses the logger utility with a non-posix option
    23        * fix missing reporting on shell expansion capability in --version
    34        * fix missing error message on invalid list for skipchecksum
  • trunk/src/sh_unix.c

    r481 r486  
    369369 
    370370  char l0[64], l1[64], l2[64], l3[64];
    371   char a0[32], a1[32], a2[32];
     371  char a0[32];
    372372  char e0[128];
    373373  char msg[128];
     
    375375  char * locations[] = { NULL, NULL, NULL, NULL, NULL };
    376376  char * envp[]      = { NULL, NULL };
    377   char * argp[]      = { NULL, NULL, NULL, NULL, NULL };
     377  char * argp[]      = { NULL, NULL, NULL };
    378378 
    379379  pid_t  thepid = getpid();
     
    390390 
    391391  envp[0] = e0;
    392  
    393392  argp[0] = a0;
    394   argp[1] = a1;
    395   argp[2] = a2;
    396393 
    397394  sl_strlcpy(msg, _("samhain["), 128);
     
    436433
    437434  sl_strlcpy (a0, _("logger"), 32);
    438   sl_strlcpy (a1, _("-p"), 32);
    439   sl_strlcpy (a2, _("daemon.alert"), 32);
    440 
    441435  sl_strlcpy (e0,
    442436              _("PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/ucb:/usr/local/bin"),
     
    451445
    452446  if (locations[i] != NULL) {
    453     argp[3] = msg;
     447    argp[1] = msg;
    454448    newpid = fork();
    455449    if (newpid == 0) {
Note: See TracChangeset for help on using the changeset viewer.