Ignore:
Timestamp:
01/20/06 21:35:04 (17 years ago)
Author:
bas
Message:

EmailtoTracScript?:

email2trac:

  • Define TRAC_SCRIPT_NAME in Makefile.in
  • Improved run_email2trac.c and made it working.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • emailtotracscript/trunk/run_email2trac.c

    r31 r35  
    3333#include <string.h>
    3434#include <stdio.h>
     35#include <limits.h>
    3536
    3637#include "run_email2trac.h"
     
    4546  int caller = getuid();
    4647  int status;
    47   char trac_script[255];
    48   char** trac_script_args;
     48
     49  char   *trac_script;
     50  char   **trac_script_args;
    4951  struct passwd *TRAC;
    5052  struct passwd *MTA;
    5153  struct stat script_attrs;
    52  
    53   strcat(trac_script,TRAC_SCRIPT_PATH);
     54 
     55  trac_script = malloc((strlen(TRAC_SCRIPT_PATH)
     56        + strlen(TRAC_SCRIPT_NAME) + 10) * sizeof(char));
     57
     58  strncat(trac_script,TRAC_SCRIPT_PATH, strlen(TRAC_SCRIPT_PATH));
    5459  strcat(trac_script,"/");
    55   strcat(trac_script,TRAC_SCRIPT_NAME);
     60  strncat(trac_script,TRAC_SCRIPT_NAME, strlen(TRAC_SCRIPT_NAME));
     61
     62  /*
     63  printf("trac_script = %s\n", trac_script);
     64  */
    5665
    5766  /* First copy arguments passed to the wrapper as scripts arguments
Note: See TracChangeset for help on using the changeset viewer.