Ignore:
Timestamp:
Jun 17, 2009, 4:43:35 AM (11 years ago)
Author:
Bruno Cornec
Message:
  • Add support of user for NFS write and fixes #316
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.9/mondo/src/common/libmondo-fork.c

    r2178 r2224  
    77
    88#include "my-stuff.h"
     9#include "mr_mem.h"
    910#include "mondostructures.h"
    1011#include "libmondo-fork.h"
     
    103104        *old_stderr, *cd_number_str;
    104105    char *p;
     106    char *tmp1 = NULL;
    105107
    106108/*@***********   End Variables ***************************************/
     
    131133    old_stderr[0] = '\0';
    132134
     135    if (bkpinfo->nfs_user != NULL) {
     136        mr_asprintf(&tmp1, "sudo -u %s %s", bkpinfo->nfs_user, basic_call);
     137    } else {
     138        mr_asprintf(&tmp1, "%s", basic_call);
     139    }
     140
    133141    sprintf(cd_number_str, "%d", cd_no);
    134     resolve_naff_tokens(midway_call, basic_call, isofile, "_ISO_");
     142    resolve_naff_tokens(midway_call, tmp1, isofile, "_ISO_");
    135143    resolve_naff_tokens(tmp, midway_call, cd_number_str, "_CD#_");
    136144    resolve_naff_tokens(ultimate_call, tmp, MONDO_LOGFILE, "_ERR_");
    137     log_msg(4, "basic call = '%s'", basic_call);
     145    log_msg(4, "basic call = '%s'", tmp1);
    138146    log_msg(4, "midway_call = '%s'", midway_call);
    139147    log_msg(4, "tmp = '%s'", tmp);
     
    169177        }
    170178        if (retval) {
    171             log_msg(2, "Basic call '%s' returned an error.", basic_call);
     179            log_msg(2, "Basic call '%s' returned an error.", tmp1);
    172180            popup_and_OK("Press ENTER to continue.");
    173181            popup_and_OK
     
    184192    }
    185193
     194    mr_free(tmp1);
    186195    paranoid_free(midway_call);
    187196    paranoid_free(ultimate_call);
Note: See TracChangeset for help on using the changeset viewer.