Changeset 3465 in MondoRescue
- Timestamp:
- Sep 11, 2015, 10:55:49 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.2/mondo/src/common/libmondo-cli.c
r3413 r3465 153 153 char *p = NULL; 154 154 char *q = NULL; 155 char *q2 = NULL; 155 156 156 157 long itbs = 0L; … … 440 441 /* p points on to the string server:/path */ 441 442 /* Store the 2 values */ 442 /* using memmove instead of strcpy as per #584 */443 /* memmove(bkpinfo->netfs_mount, p, MAX_STR_LEN); */444 bkpinfo->netfs_mount = p;443 q2 = bkpinfo->netfs_mount; 444 mr_asprintf(bkpinfo->netfs_mount, "%s", p); 445 mr_free(q2); 445 446 446 447 /* test if we specified a user */ … … 448 449 if (p != NULL) { 449 450 /* User found. Store the 2 values */ 450 bkpinfo->netfs_user = bkpinfo->netfs_mount; 451 mr_asprintf(bkpinfo->netfs_user, "%s", bkpinfo->netfs_mount); 452 p = strchr(bkpinfo->netfs_user, '@'); 453 *p = '\0'; 454 p = strchr(bkpinfo->netfs_mount, '@'); 451 455 p++; 452 456 /* new netfs mount */ 457 q2 = bkpinfo->netfs_mount; 453 458 mr_asprintf(bkpinfo->netfs_mount, "%s", p); 454 /* now that user is computed, create the right value by removing end of string */ 455 p--; 456 *p = '\0'; 459 mr_free(q2); 457 460 } 458 461 if (bkpinfo->netfs_user != NULL) {
Note:
See TracChangeset
for help on using the changeset viewer.