Diff for /parser3/src/main/pa_exec.C between versions 1.32 and 1.34

version 1.32, 2002/03/25 11:55:26 version 1.34, 2002/03/27 15:30:36
Line 73  static BOOL WINAPI CreateHiddenConsolePr Line 73  static BOOL WINAPI CreateHiddenConsolePr
         // calculating script's directory          // calculating script's directory
         char dir[MAX_STRING];          char dir[MAX_STRING];
         strncpy(dir, szCmdLine, MAX_STRING-1); dir[MAX_STRING-1]=0;          strncpy(dir, szCmdLine, MAX_STRING-1); dir[MAX_STRING-1]=0;
           lsplit(dir,' '); // trim arguments
         rsplit(dir,'/'); rsplit(dir,'\\'); // trim filename          rsplit(dir,'/'); rsplit(dir,'\\'); // trim filename
         chdir(dir);          chdir(dir);
   
Line 311  int pa_exec( Line 312  int pa_exec(
   
 #ifdef NO_PA_EXECS  #ifdef NO_PA_EXECS
         if(!forced_allow)          if(!forced_allow)
                 throw Exception(0, 0,                  throw Exception("parser.runtime",
                         &file_spec,                          &file_spec,
                         "parser execs are disabled [recompile parser without --disable-execs configure option]");                          "parser execs are disabled [recompile parser without --disable-execs configure option]");
 #endif  #endif
Line 359  from http://www.apache.org/websrc/cvsweb Line 360  from http://www.apache.org/websrc/cvsweb
                 if(error_size>3) // ".\r\n"                  if(error_size>3) // ".\r\n"
                         szErrorDesc[error_size-3]=0;                          szErrorDesc[error_size-3]=0;
                           
                 throw Exception(0, 0,                  throw Exception(0,
                         &file_spec,                          &file_spec,
                         "(real command line=\"%s\") exec failed - %s (%ld)",                          "(real command line=\"%s\") exec failed - %s (%ld)",
                                 cmd,                                  cmd,
Line 375  from http://www.apache.org/websrc/cvsweb Line 376  from http://www.apache.org/websrc/cvsweb
         if(!forced_allow) {          if(!forced_allow) {
                 struct stat finfo;                  struct stat finfo;
                 if(stat(file_spec_cstr, &finfo)!=0)                  if(stat(file_spec_cstr, &finfo)!=0)
                         throw Exception(0, 0,                           throw Exception("file.missing", 
                                         &file_spec,                                           &file_spec, 
                                         "stat failed: %s (%d), actual filename '%s'",                                           "stat failed: %s (%d), actual filename '%s'", 
                                                 strerror(errno), errno, file_spec_cstr);                                                  strerror(errno), errno, file_spec_cstr);
   
                 if(finfo.st_gid/*foreign?*/!=getegid())                  if(finfo.st_gid/*foreign?*/!=getegid())
                         throw Exception(0, 0,                          throw Exception("parser.runtime",
                                 &file_spec,                                  &file_spec,
                                 "parser executing files of foreign group is     disabled [recompile parser without --disable-foreign-group-files configure option], actual filename '%s'",                                   "parser executing files of foreign group is     disabled [recompile parser without --disable-foreign-group-files configure option], actual filename '%s'", 
                                         file_spec_cstr);                                          file_spec_cstr);
Line 393  from http://www.apache.org/websrc/cvsweb Line 394  from http://www.apache.org/websrc/cvsweb
                 const int argv_size=argv->size();                  const int argv_size=argv->size();
                 const int argv_max=sizeof(argv_cstrs)/sizeof(argv_cstrs[0])-1-1;                  const int argv_max=sizeof(argv_cstrs)/sizeof(argv_cstrs[0])-1-1;
                 if(argv_size>argv_max)                  if(argv_size>argv_max)
                         throw Exception(0, 0,                          throw Exception("parser.runtime",
                                 &file_spec,                                  &file_spec,
                                 "too many arguments (%d > max %d)", argv_size, argv_max);                                  "too many arguments (%d > max %d)", argv_size, argv_max);
                 for(int i=0; i<argv_size; i++)                  for(int i=0; i<argv_size; i++)
Line 425  from http://www.apache.org/websrc/cvsweb Line 426  from http://www.apache.org/websrc/cvsweb
   
                 return get_exit_status(pid); // negative may mean "-errno[execl()]"                  return get_exit_status(pid); // negative may mean "-errno[execl()]"
         } else           } else 
                 throw Exception(0, 0,                  throw Exception(0,
                         &file_spec,                          &file_spec,
                         "pipe error");                          "pipe error");
 #endif  #endif

Removed from v.1.32  
changed lines
  Added in v.1.34


E-mail: