[gnome-boxes] installer: Disable driver signing for unsigned drivers



commit f8e88e82b4b8dff318da61ebfd21eebb83ab0c61
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date:   Fri Mar 15 17:19:08 2013 +0200

    installer: Disable driver signing for unsigned drivers
    
    In the next release (0.2.6) of libosinfo, driver signing checks in
    scripts will have to be explicitly disabled if we want to use unsigned
    drivers. We actually shouldn't be doing this since this means disabling
    a security feature of Windows *permanently* but unfortunately QXL drivers
    for windows are not signed and they are essential for an impressive user
    experience.
    
    To make things slightly better, we only do this if there is an unsigned
    driver to be installed.
    
    With this change QXL driver will now actually be functional in Windows XP
    and Windows 7.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=691546

 src/unattended-installer.vala |   25 +++++++++++++++++++++++--
 1 files changed, 23 insertions(+), 2 deletions(-)
---
diff --git a/src/unattended-installer.vala b/src/unattended-installer.vala
index 136c19a..53cc570 100644
--- a/src/unattended-installer.vala
+++ b/src/unattended-installer.vala
@@ -76,6 +76,7 @@ private class Boxes.UnattendedInstaller: InstallerMedia {
     private string lang;
     private string hostname;
     private string kbd;
+    private bool driver_signing = true;
 
     ulong key_inserted_id; // ID of key_entry.insert_text signal handler
 
@@ -256,6 +257,8 @@ private class Boxes.UnattendedInstaller: InstallerMedia {
             device_path = device_name_to_path (script.path_format, disk_config.get_target_dev ());
             config.set_post_install_drivers_disk (device_path);
         }
+
+        config.set_driver_signing (driver_signing);
     }
 
     public override void setup_post_install_domain_config (Domain domain) {
@@ -751,14 +754,32 @@ private class Boxes.UnattendedInstaller: InstallerMedia {
                 break;
             }
 
+        var driver_signing_mutable = false;
+        if (signing_required)
+            // See if there is any script that will allow us to disable driver signing checks
+            foreach (var s in this.scripts.get_elements ()) {
+                var script = s as InstallScript;
+
+                if (script.has_config_param_name (INSTALL_CONFIG_PROP_DRIVER_SIGNING)) {
+                    debug ("Script '%s' allows disabling of driver signature checks.", script.id);
+                    driver_signing_mutable = true;
+
+                    break;
+                }
+            }
+
         return get_drivers ((driver) => {
             if (!installable_func (driver))
                 return false;
 
             if (!driver.get_signed () && signing_required) {
-                debug ("Driver from location '%s' is not signed. Ignoring..", driver.get_location ());
+                if (driver_signing_mutable)
+                    driver_signing = false;
+                else {
+                    debug ("Driver from location '%s' is not signed. Ignoring..", driver.get_location ());
 
-                return false;
+                    return false;
+                }
             }
 
             return true;


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