[PATCH 1/2] Fix going back from stage1 nfs/url setup dialog.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We need to clear stage2Data when going back so that
* we don't sigsegv on it later if we change nfs method to url (and also if
we change from url to nfs in case of location specified via ks or boot opts)
* we don't try to fetch stage2 from the location in stage2Data right after
reselecting the method.

Also fixes [C] and [A] from
https://www.redhat.com/archives/anaconda-devel-list/2009-August/msg00043.html
(sigsegv after going Back when incorrect stage2 url is specified via ks or boot
params) which were partly fixed by Jeremy's
ad1e95df0e277442a19f7989afe3bd758cfccb47.
---
 loader/nfsinstall.c |    4 +++-
 loader/urlinstall.c |    4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/loader/nfsinstall.c b/loader/nfsinstall.c
index a8bba1c..964a463 100644
--- a/loader/nfsinstall.c
+++ b/loader/nfsinstall.c
@@ -159,8 +159,10 @@ char * mountNfsImage(struct installMethod * method,
             } else {
                 char *substr, *tmp;
 
-                if (nfsGetSetup(&host, &directory) == LOADER_BACK)
+                if (nfsGetSetup(&host, &directory) == LOADER_BACK) {
+                    loaderData->stage2Data = NULL;
                     return NULL;
+		}
 
                 /* If the user-provided URL points at a repo instead of a
                  * stage2 image, fix that up now.
diff --git a/loader/urlinstall.c b/loader/urlinstall.c
index 392dbd1..90f63cf 100644
--- a/loader/urlinstall.c
+++ b/loader/urlinstall.c
@@ -223,8 +223,10 @@ char *mountUrlImage(struct installMethod *method, char *location,
                 } else {
                     char *substr;
 
-                    if (urlMainSetupPanel(&ui))
+                    if (urlMainSetupPanel(&ui)) {
+                        loaderData->stage2Data = NULL;
                         return NULL;
+		    }
 
                     /* If the user-provided URL points at a repo instead of
                      * a stage2 image, fix it up now.
-- 
1.6.0.6

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux