Merge ~paelzer/ubuntu/+source/open-vm-tools:lp-1855686-crash-broken-lsb-output-EOAN into ubuntu/+source/open-vm-tools:ubuntu/eoan-devel

Proposed by Christian Ehrhardt 
Status: Merged
Approved by: Christian Ehrhardt 
Approved revision: 7e818beb52a856b48a945963aaed683597adf6d9
Merge reported by: Christian Ehrhardt 
Merged at revision: 7e818beb52a856b48a945963aaed683597adf6d9
Proposed branch: ~paelzer/ubuntu/+source/open-vm-tools:lp-1855686-crash-broken-lsb-output-EOAN
Merge into: ubuntu/+source/open-vm-tools:ubuntu/eoan-devel
Diff against target: 92 lines (+70/-0)
3 files modified
debian/changelog (+7/-0)
debian/patches/lp-1855686-Avoid-vmtoolsd-crash-in-HostInfo.patch (+62/-0)
debian/patches/series (+1/-0)
Reviewer Review Type Date Requested Status
Rafael David Tinoco (community) Approve
Canonical Server packageset reviewers Pending
git-ubuntu developers Pending
Review via email: mp+376512@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Change is all the same, so for discussion I guess we can focus on https://code.launchpad.net/~paelzer/ubuntu/+source/open-vm-tools/+git/open-vm-tools/+merge/376511 and then handle all the same if agreed.

Revision history for this message
Rafael David Tinoco (rafaeldtinoco) wrote :

Review checklist:

- [√] changelog entry correct, targeted to correct codename "eoan"
- [-] no major upstream changes to consider
- [-] debian changes look safe
- [-] update-maintainer has been run
- [-] changes forwarded upstream/debian (if appropriate)
- [-] nothing else to drop
- [x] patches match what was proposed upstream
      - lots of weird whitespaces (upstream) have been removed.
      - code changes are the same.
- [√] patches correctly included in debian/patches/series?
- [√] patches have correct DEP3 metadata
- [√] verified PPA package installs/uninstalls
- [-] autopkgtest against the PPA package passes

+1 for this change:

open-vm-tools (2:11.0.1-2ubuntu0.19.10.2) eoan; urgency=medium

  * d/p/lp-1855686-Avoid-vmtoolsd-crash-in-HostInfo.patch: fix crash with
    uncommon lsb_output behavior (LP: #1855686)

 -- Christian Ehrhardt <email address hidden> Mon, 09 Dec 2019 11:03:56 +0100

review: Approve
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Tag pushed and uploaded to -unapproved

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Migrated, setting merged

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index fd2c92c..68d8b1c 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,10 @@
6+open-vm-tools (2:11.0.1-2ubuntu0.19.10.2) eoan; urgency=medium
7+
8+ * d/p/lp-1855686-Avoid-vmtoolsd-crash-in-HostInfo.patch: fix crash with
9+ uncommon lsb_output behavior (LP: #1855686)
10+
11+ -- Christian Ehrhardt <christian.ehrhardt@canonical.com> Mon, 09 Dec 2019 11:03:56 +0100
12+
13 open-vm-tools (2:11.0.1-2ubuntu0.19.10.1) eoan; urgency=medium
14
15 * Update to latest release v11 (LP: #1844834)
16diff --git a/debian/patches/lp-1855686-Avoid-vmtoolsd-crash-in-HostInfo.patch b/debian/patches/lp-1855686-Avoid-vmtoolsd-crash-in-HostInfo.patch
17new file mode 100644
18index 0000000..6ed1acf
19--- /dev/null
20+++ b/debian/patches/lp-1855686-Avoid-vmtoolsd-crash-in-HostInfo.patch
21@@ -0,0 +1,62 @@
22+From 61b43df047e0a6666590016966b9574af21951a8 Mon Sep 17 00:00:00 2001
23+From: Oliver Kurth <okurth@vmware.com>
24+Date: Thu, 5 Dec 2019 11:34:43 -0800
25+Subject: [PATCH] Avoid vmtoolsd crash in HostInfo.
26+
27+The guest identification code causes vmtoolsd to crash in certain
28+versions of some distros. The crash is caused by recent changes to
29+the lsb_release command. Previously, if the command existed, all
30+of its options worked. Now, some of the options no longer exist.
31+
32+Change the code to check for an lsb_release failure whenever it is
33+invoked.
34+
35+Fix for: https://github.com/vmware/open-vm-tools/issues/390
36+
37+Origin: upstream, https://github.com/vmware/open-vm-tools/commit/61b43df047e0a6666590016966b9574af21951a8
38+Bug-Ubuntu: https://bugs.launchpad.net/bugs/1855686
39+Last-Update: 2019-12-09
40+Note: removed non important whitespace damage from the upstream patch
41+
42+---
43+ open-vm-tools/lib/misc/hostinfoPosix.c | 32 +++++++++++++++-----------
44+ 1 file changed, 19 insertions(+), 13 deletions(-)
45+
46+diff --git a/open-vm-tools/lib/misc/hostinfoPosix.c b/open-vm-tools/lib/misc/hostinfoPosix.c
47+index 91a44ca89..26c3efd89 100644
48+--- a/open-vm-tools/lib/misc/hostinfoPosix.c
49++++ b/open-vm-tools/lib/misc/hostinfoPosix.c
50+@@ -1334,6 +1334,8 @@ HostinfoLsbRemoveQuotes(char *lsbOutput) // IN/OUT:
51+ {
52+ char *lsbStart = lsbOutput;
53+
54++ ASSERT(lsbStart != NULL);
55++
56+ if (lsbStart[0] == '"') {
57+ char *quoteEnd = strchr(++lsbStart, '"');
58+
59+@@ -1407,13 +1409,17 @@ HostinfoLsb(char ***args) // OUT:
60+
61+ /* LSB Distributor */
62+ lsbOutput = HostinfoGetCmdOutput("/usr/bin/lsb_release -si 2>/dev/null");
63+- (*args)[0] = Util_SafeStrdup(HostinfoLsbRemoveQuotes(lsbOutput));
64+- free(lsbOutput);
65++ if (lsbOutput != NULL) {
66++ (*args)[0] = Util_SafeStrdup(HostinfoLsbRemoveQuotes(lsbOutput));
67++ free(lsbOutput);
68++ }
69+
70+ /* LSB Release */
71+ lsbOutput = HostinfoGetCmdOutput("/usr/bin/lsb_release -sr 2>/dev/null");
72+- (*args)[1] = Util_SafeStrdup(HostinfoLsbRemoveQuotes(lsbOutput));
73+- free(lsbOutput);
74++ if (lsbOutput != NULL) {
75++ (*args)[1] = Util_SafeStrdup(HostinfoLsbRemoveQuotes(lsbOutput));
76++ free(lsbOutput);
77++ }
78+
79+ /* LSB Description */
80+ (*args)[3] = Util_SafeStrdup((*args)[fields]);
81+--
82+2.24.0
83+
84diff --git a/debian/patches/series b/debian/patches/series
85index daf5404..b3b4c2e 100644
86--- a/debian/patches/series
87+++ b/debian/patches/series
88@@ -3,3 +3,4 @@ debian/max_nic_count
89 debian/scsi-udev-rule
90 89c0d4445_GitHub-Issue-367.-Remove-references-to-deprecated-G_INLINE_FUNC
91 fix_zfs_fs_detection
92+lp-1855686-Avoid-vmtoolsd-crash-in-HostInfo.patch

Subscribers

People subscribed via source and target branches