Changeset 2226 in MondoRescue


Ignore:
Timestamp:
Jun 17, 2009, 2:33:36 PM (15 years ago)
Author:
Bruno Cornec
Message:

nfs_user is now a pointer which shows the way to go and avoids setup issue, memory management pb, ...

Location:
branches/2.2.9/mondo/src/common
Files:
5 edited

Legend:

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

    r2225 r2226  
    997997            p--;
    998998            *p = '\0';
    999             strcpy(bkpinfo->nfs_user,bkpinfo->nfs_mount);
     999            mr_asprintf(q,"%s",bkpinfo->nfs_mount);
     1000            bkpinfo->nfs_user = q;
    10001001            strcpy(bkpinfo->nfs_mount,tmp);
    10011002        }
  • branches/2.2.9/mondo/src/common/libmondo-devices.c

    r2224 r2226  
    20532053    log_it("isodir = %s", bkpinfo->isodir);
    20542054    log_it("nfs_mount = '%s'", bkpinfo->nfs_mount);
    2055     if (bkpinfo->nfs_user != NULL) {
     2055    if (bkpinfo->nfs_user) {
    20562056        log_it("nfs_user = '%s'", bkpinfo->nfs_user);
    20572057    }
  • branches/2.2.9/mondo/src/common/libmondo-fork.c

    r2225 r2226  
    133133    old_stderr[0] = '\0';
    134134
    135     if (bkpinfo->nfs_user != NULL) {
     135    if (bkpinfo->nfs_user) {
    136136        mr_asprintf(&tmp1, "su - %s -c \"%s\"", bkpinfo->nfs_user, basic_call);
    137137    } else {
  • branches/2.2.9/mondo/src/common/libmondo-tools.c

    r2224 r2226  
    857857    bkpinfo->kernel_path[0] = '\0';
    858858    bkpinfo->nfs_mount[0] = '\0';
    859     bkpinfo->nfs_user[0] = '\0';
     859    bkpinfo->nfs_user = NULL;
    860860    bkpinfo->nfs_remote_dir[0] = '\0';
    861861    bkpinfo->postnuke_tarball[0] = '\0';
     
    14101410        paranoid_free(g_serial_string);
    14111411        paranoid_free(g_magicdev_command);
     1412
     1413        mr_free(bkpinfo->nfs_user);
    14121414    }
    14131415
  • branches/2.2.9/mondo/src/common/mondostructures.h

    r2224 r2226  
    574574   * The potential user to use for NFS backup
    575575   */
    576     char nfs_user[MAX_STR_LEN/4];
     576    char *nfs_user;
    577577
    578578  /**
Note: See TracChangeset for help on using the changeset viewer.