Ignore:
Timestamp:
Sep 23, 2007, 2:41:29 AM (17 years ago)
Author:
Bruno Cornec
Message:

Apply patch from Andree Leidenfrost, modified a bit to use bkpinfo->tmpdir instead of /tmp
or MINDI_CACHE when appropriate. Fix security issues in mondo
Thanks al ot Andree for catching all those issues.
Will not compile needs more work as bkpinfo->tmpdir isn't available everywhere
Should become a global in 3.x when only containing pointers.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.5/mondo/src/common/libmondo-filelist.c

    r1552 r1644  
    268268    malloc_string(tmp_fname);
    269269    malloc_string(command);
    270     sprintf(tmp_fname, "/tmp/sort.%d.%d.%d", (int) (random() % 32768),
    271             (int) (random() % 32768), (int) (random() % 32768));
     270    sprintf(tmp_fname, "%s/sortfile", bkpinfo->tmpdir);
    272271
    273272    if (!does_file_exist(orig_fname)) {
     
    683682    malloc_string(syscall_pin);
    684683    malloc_string(syscall_pout);
    685     sprintf(masklist, "/tmp/%d.%d.mask", (int) (random() % 32768),
    686             (int) (random() % 32768));
     684    sprintf(masklist, "%s/masklist", bkpinfo->tmpdir);
    687685    sprintf(command, "cp -f %s %s", orig_msklist, masklist);
    688686    run_program_and_log_output(command, 1);
Note: See TracChangeset for help on using the changeset viewer.