Subversion Repositories wimsdev

Rev

Rev 13015 | Rev 15546 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 13015 Rev 15509
Line 418... Line 418...
418
   mkdirs("../tmp/log");
418
   mkdirs("../tmp/log");
419
   chmod("../tmp/log",S_IRUSR|S_IWUSR|S_IXUSR);
419
   chmod("../tmp/log",S_IRUSR|S_IWUSR|S_IXUSR);
420
   accessfile(tmplbuf,"w",logdpid);
420
   accessfile(tmplbuf,"w",logdpid);
421
   exit(0);
421
   exit(0);
422
  }
422
  }
-
 
423
// don't change the order: use in Wimslogd/wimslogd.c in parms()
423
  setreuid(geteuid(),geteuid());setregid(getegid(),getegid());
424
  setreuid(geteuid(),geteuid());setregid(getegid(),getegid());
424
  snprintf(tmplbuf,sizeof(tmplbuf),"%u %u %u %u %u %u %d %d %d",
425
  snprintf(tmplbuf,sizeof(tmplbuf),"%u %u %u %u %u %u %d %d %d %d",
425
      idle_time,idle_time2,idle_time3,
426
      idle_time,idle_time2,idle_time3,
426
      OLD_LOG_FILES,GEN_LOG_LIMIT,
427
      OLD_LOG_FILES,GEN_LOG_LIMIT,
427
      MODULE_LOG_LIMIT,backup_hour,site_accounting,
428
      MODULE_LOG_LIMIT,backup_hour,site_accounting,
428
      examlog_limit);
429
      examlog_limit,LOG_DELETE);
429
 
430
 
430
  setenv("wimslogd",tmplbuf,1);
431
  setenv("wimslogd",tmplbuf,1);
431
  execve(arg[0],arg,environ);
432
  execve(arg[0],arg,environ);
432
  fprintf(stderr,"Unable to execute wimslogd: %s\n",strerror(errno));
433
  fprintf(stderr,"Unable to execute wimslogd: %s\n",strerror(errno));
433
  exit(1);
434
  exit(1);