Changeset 35


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.
Location:
emailtotracscript/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • emailtotracscript/trunk/Makefile.in

    r32 r35  
    1717MTA_USER=@mta_user@
    1818
     19TRAC_SCRIPT_NAME=email2trac
     20
    1921CC=@CC@
    2022DEBUG=0
     
    3032
    3133install: all
    32         install --mode=4700 --owner=root run_email2trac $(EXEC_PREFIX)
     34        install --mode=4111 --owner=root run_email2trac $(EXEC_PREFIX)
    3335        for script in $(PYTHON_FILES) ; \
    3436        do \
  • 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.