Hello community,

here is the log from the commit of package grub2 for openSUSE:Factory checked 
in at 2018-09-16 18:30:21
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/grub2 (Old)
 and      /work/SRC/openSUSE:Factory/.grub2.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "grub2"

Sun Sep 16 18:30:21 2018 rev:193 rq:635552 version:2.02

Changes:
--------
--- /work/SRC/openSUSE:Factory/grub2/grub2.changes      2018-09-03 
10:32:57.364337644 +0200
+++ /work/SRC/openSUSE:Factory/.grub2.new/grub2.changes 2018-09-16 
18:30:23.859442246 +0200
@@ -1,0 +2,13 @@
+Thu Sep 13 08:38:01 UTC 2018 - mch...@suse.com
+
+- Fix broken network interface with random address and same name (bsc#1084508) 
+  * 0001-ofnet-Initialize-structs-in-bootpath-parser.patch
+
+-------------------------------------------------------------------
+Fri Aug 31 10:06:56 UTC 2018 - mch...@suse.com
+
+- Fix outputting invalid btrfs subvol path on non btrfs filesystem due to bogus
+  return code handling. (bsc#1106381)
+  * modified grub2-btrfs-10-config-directory.patch 
+
+-------------------------------------------------------------------

New:
----
  0001-ofnet-Initialize-structs-in-bootpath-parser.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ grub2.spec ++++++
--- /var/tmp/diff_new_pack.rQmQO5/_old  2018-09-16 18:30:25.643441535 +0200
+++ /var/tmp/diff_new_pack.rQmQO5/_new  2018-09-16 18:30:25.647441534 +0200
@@ -257,6 +257,7 @@
 Patch213:       grub2-Fix-incorrect-netmask-on-ppc64.patch
 Patch214:       grub2-ieee1275-open-raw-mode.patch
 Patch215:       grub2-ppc64-cas-new-scope.patch
+Patch216:       0001-ofnet-Initialize-structs-in-bootpath-parser.patch
 Patch233:       grub2-use-stat-instead-of-udevadm-for-partition-lookup.patch
 Patch234:       
fix-grub2-use-stat-instead-of-udevadm-for-partition-lookup-with-new-glibc.patch
 Patch236:       grub2-efi_gop-avoid-low-resolution.patch
@@ -546,6 +547,7 @@
 %patch213 -p1
 %patch214 -p1
 %patch215 -p1
+%patch216 -p1
 %patch233 -p1
 %patch234 -p1
 %patch236 -p1

++++++ 0001-ofnet-Initialize-structs-in-bootpath-parser.patch ++++++
>From ddd47864e98cb32a718075bab4462dc56919ec6c Mon Sep 17 00:00:00 2001
From: Julian Andres Klode <julian.kl...@canonical.com>
Date: Mon, 3 Sep 2018 10:09:15 +0200
Subject: [PATCH] ofnet: Initialize structs in bootpath parser

Code later on checks if variables inside the struct are
0 to see if they have been set, like if there were addresses
in the bootpath.

The variables were not initialized however, so the check
might succeed with uninitialized data, and a new interface
with random addresses and the same name is added. This causes
$net_default_mac to point to the random one, so, for example,
using that variable to load per-mac config files fails.

Bug-Ubuntu: https://bugs.launchpad.net/bugs/1785859
Signed-off-by: Julian Andres Klode <julian.kl...@canonical.com>
---
 grub-core/net/drivers/ieee1275/ofnet.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Index: grub-2.02/grub-core/net/drivers/ieee1275/ofnet.c
===================================================================
--- grub-2.02.orig/grub-core/net/drivers/ieee1275/ofnet.c
+++ grub-2.02/grub-core/net/drivers/ieee1275/ofnet.c
@@ -153,8 +153,8 @@ grub_ieee1275_parse_bootpath (const char
   char *comma_char = 0;
   char *equal_char = 0;
   grub_size_t field_counter = 0;
-  grub_net_network_level_address_t client_addr, gateway_addr, subnet_mask;
-  grub_net_link_level_address_t hw_addr;
+  grub_net_network_level_address_t client_addr = {}, gateway_addr = {}, 
subnet_mask = {};
+  grub_net_link_level_address_t hw_addr = {};
   grub_net_interface_flags_t flags = 0;
   struct grub_net_network_level_interface *inter = NULL;
   grub_uint32_t vlantag = 0;

++++++ grub2-btrfs-10-config-directory.patch ++++++
--- /var/tmp/diff_new_pack.rQmQO5/_old  2018-09-16 18:30:25.819441465 +0200
+++ /var/tmp/diff_new_pack.rQmQO5/_new  2018-09-16 18:30:25.823441463 +0200
@@ -1,3 +1,11 @@
+v1:
+References: bsc#1063443
+
+v2:
+References: bsc#1106381
+Fix outputting invalid btrfs subvol path on non btrfs filesystem due to bogus
+return code handling.
+
 Index: grub-2.02/grub-core/fs/btrfs.c
 ===================================================================
 --- grub-2.02.orig/grub-core/fs/btrfs.c
@@ -35,7 +43,17 @@
    dev = grub_device_open (devname);
    grub_free (devname);
    if (!dev)
-@@ -2655,12 +2641,43 @@ grub_cmd_btrfs_get_default_subvol (struc
+@@ -2625,8 +2611,7 @@ grub_cmd_btrfs_get_default_subvol (struc
+     {
+       grub_device_close (dev);
+       grub_dprintf ("btrfs", "failed to open fs\n");
+-      grub_errno = GRUB_ERR_NONE;
+-      return 0;
++      return grub_errno;
+     }
+ 
+   err = grub_btrfs_get_default_subvolume_id (data, &subvolid);
+@@ -2655,12 +2640,47 @@ grub_cmd_btrfs_get_default_subvol (struc
          return err;
        }
  
@@ -76,12 +94,16 @@
 +    return grub_error (GRUB_ERR_BAD_ARGUMENT, "device name required");
 +
 +  if ((err = grub_btrfs_get_default_subvol (argv[0], &subvolid, &subvol)) != 
GRUB_ERR_NONE)
-+    return err;
++    {
++      if (err == GRUB_ERR_BAD_FS)
++      err = grub_errno = GRUB_ERR_NONE;
++      return err;
++    }
 +
    if (num_only && path_only)
        output = grub_xasprintf ("%"PRIuGRUB_UINT64_T" /%s", subvolid, subvol);
    else if (num_only)
-@@ -2676,9 +2693,6 @@ grub_cmd_btrfs_get_default_subvol (struc
+@@ -2676,9 +2696,6 @@ grub_cmd_btrfs_get_default_subvol (struc
    grub_free (output);
    grub_free (subvol);
  
@@ -91,7 +113,7 @@
    return GRUB_ERR_NONE;
  }
  
-@@ -2757,6 +2771,122 @@ subvol_get_env (struct grub_env_var *var
+@@ -2757,6 +2774,122 @@ subvol_get_env (struct grub_env_var *var
      return "";
  }
  
@@ -214,7 +236,7 @@
  GRUB_MOD_INIT (btrfs)
  {
    grub_fs_register (&grub_btrfs_fs);
-@@ -2780,6 +2910,8 @@ GRUB_MOD_INIT (btrfs)
+@@ -2780,6 +2913,8 @@ GRUB_MOD_INIT (btrfs)
                                 subvol_set_env);
    grub_register_variable_hook ("btrfs_subvolid", subvolid_get_env,
                                 subvolid_set_env);
@@ -223,7 +245,7 @@
    grub_env_export ("btrfs_subvol");
    grub_env_export ("btrfs_subvolid");
    grub_env_export ("btrfs_relative_path");
-@@ -2789,6 +2921,7 @@ GRUB_MOD_FINI (btrfs)
+@@ -2789,6 +2924,7 @@ GRUB_MOD_FINI (btrfs)
  {
    grub_register_variable_hook ("btrfs_subvol", NULL, NULL);
    grub_register_variable_hook ("btrfs_subvolid", NULL, NULL);



Reply via email to