summaryrefslogtreecommitdiffstats
path: root/loader2
diff options
context:
space:
mode:
authorDavid Cantrell <dcantrell@redhat.com>2007-08-22 18:53:22 +0000
committerDavid Cantrell <dcantrell@redhat.com>2007-08-22 18:53:22 +0000
commit7721a68329f01bf228c0c14f16d8c7b67c052402 (patch)
tree12dca720bce86f4b6608b272af0f359a8f809474 /loader2
parent51009455632c3741d54e2324639306b962b2faf2 (diff)
downloadanaconda-7721a68329f01bf228c0c14f16d8c7b67c052402.tar.gz
anaconda-7721a68329f01bf228c0c14f16d8c7b67c052402.tar.xz
anaconda-7721a68329f01bf228c0c14f16d8c7b67c052402.zip
* loader2/nfsinstall.c (getFileFromNfs): Make sure we only add one
slash for NFS path names (#253539).
Diffstat (limited to 'loader2')
-rw-r--r--loader2/nfsinstall.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/loader2/nfsinstall.c b/loader2/nfsinstall.c
index f29f0e700..5a4244c18 100644
--- a/loader2/nfsinstall.c
+++ b/loader2/nfsinstall.c
@@ -277,6 +277,7 @@ void setKickstartNfs(struct loaderData_s * loaderData, int argc,
int getFileFromNfs(char * url, char * dest, struct loaderData_s * loaderData) {
char ret[47];
char * host = NULL, *path = NULL, * file = NULL, * opts = NULL;
+ char * chk = NULL;
int failed = 0;
struct networkDeviceConfig netCfg;
ip_addr_t *tip;
@@ -334,7 +335,13 @@ int getFileFromNfs(char * url, char * dest, struct loaderData_s * loaderData) {
file = path;
} else {
*file++ ='\0';
- host = sdupprintf("%s/%s", host, path);
+ chk = host;
+ chk += strlen(host) - 1;
+
+ if (*chk == '/' || *path == '/')
+ host = sdupprintf("%s%s", host, path);
+ else
+ host = sdupprintf("%s/%s", host, path);
}
logMessage(INFO, "file location: nfs://%s/%s", host, file);