Accepting request 789691 from home:scabrero:branches:network
- Fix segfault in k5_primary_domain; (bsc#1167620); - Added patches: * 0009-Fix-null-dereference-qualifying-short-hostnames.patch OBS-URL: https://build.opensuse.org/request/show/789691 OBS-URL: https://build.opensuse.org/package/show/network/krb5?expand=0&rev=228
This commit is contained in:
parent
7a27c19df2
commit
f2bf4325ae
43
0009-Fix-null-dereference-qualifying-short-hostnames.patch
Normal file
43
0009-Fix-null-dereference-qualifying-short-hostnames.patch
Normal file
@ -0,0 +1,43 @@
|
||||
From 96d0ee0760a1c7cf735d04fbddf095a4c01ef190 Mon Sep 17 00:00:00 2001
|
||||
From: Greg Hudson <ghudson@mit.edu>
|
||||
Date: Tue, 3 Mar 2020 12:27:02 -0500
|
||||
Subject: [PATCH] Fix null dereference qualifying short hostnames
|
||||
|
||||
Fix the dnsglue.c PRIMARY_DOMAIN macro not to call strdup() with a
|
||||
null pointer if no DNS search path is configured.
|
||||
|
||||
ticket: 8881
|
||||
tags: pullup
|
||||
target_version: 1.18-next
|
||||
|
||||
(cherry picked from commit cd82bf377e7fad2409c76bf8b241920692f34fda)
|
||||
---
|
||||
src/lib/krb5/os/dnsglue.c | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/lib/krb5/os/dnsglue.c b/src/lib/krb5/os/dnsglue.c
|
||||
index e35ca9d76..0cd213fdd 100644
|
||||
--- a/src/lib/krb5/os/dnsglue.c
|
||||
+++ b/src/lib/krb5/os/dnsglue.c
|
||||
@@ -91,7 +91,7 @@ static int initparse(struct krb5int_dns_state *);
|
||||
#define DECLARE_HANDLE(h) struct __res_state h
|
||||
#define INIT_HANDLE(h) (memset(&h, 0, sizeof(h)), res_ninit(&h) == 0)
|
||||
#define SEARCH(h, n, c, t, a, l) res_nsearch(&h, n, c, t, a, l)
|
||||
-#define PRIMARY_DOMAIN(h) strdup(h.dnsrch[0])
|
||||
+#define PRIMARY_DOMAIN(h) ((h.dnsrch[0] == NULL) ? NULL : strdup(h.dnsrch[0]))
|
||||
#if HAVE_RES_NDESTROY
|
||||
#define DESTROY_HANDLE(h) res_ndestroy(&h)
|
||||
#else
|
||||
@@ -104,7 +104,8 @@ static int initparse(struct krb5int_dns_state *);
|
||||
#define DECLARE_HANDLE(h)
|
||||
#define INIT_HANDLE(h) (res_init() == 0)
|
||||
#define SEARCH(h, n, c, t, a, l) res_search(n, c, t, a, l)
|
||||
-#define PRIMARY_DOMAIN(h) strdup(_res.defdname)
|
||||
+#define PRIMARY_DOMAIN(h) \
|
||||
+ ((_res.defdname == NULL) ? NULL : strdup(_res.defdname))
|
||||
#define DESTROY_HANDLE(h)
|
||||
|
||||
#endif
|
||||
--
|
||||
2.25.1
|
||||
|
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Mar 25 09:20:38 UTC 2020 - Samuel Cabrero <scabrero@suse.de>
|
||||
|
||||
- Fix segfault in k5_primary_domain; (bsc#1167620);
|
||||
- Added patches:
|
||||
* 0009-Fix-null-dereference-qualifying-short-hostnames.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Feb 25 08:36:37 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
||||
|
@ -44,6 +44,7 @@ Patch5: 0005-krb5-1.6.3-ktutil-manpage.patch
|
||||
Patch6: 0006-krb5-1.12-api.patch
|
||||
Patch7: 0007-SELinux-integration.patch
|
||||
Patch8: 0008-krb5-1.9-debuginfo.patch
|
||||
Patch9: 0009-Fix-null-dereference-qualifying-short-hostnames.patch
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: bison
|
||||
BuildRequires: keyutils
|
||||
|
@ -1,3 +1,10 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Mar 25 09:20:38 UTC 2020 - Samuel Cabrero <scabrero@suse.de>
|
||||
|
||||
- Fix segfault in k5_primary_domain; (bsc#1167620);
|
||||
- Added patches:
|
||||
* 0009-Fix-null-dereference-qualifying-short-hostnames.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Feb 25 08:36:37 UTC 2020 - Tomáš Chvátal <tchvatal@suse.com>
|
||||
|
||||
|
10
krb5.spec
10
krb5.spec
@ -42,6 +42,7 @@ Patch5: 0005-krb5-1.6.3-ktutil-manpage.patch
|
||||
Patch6: 0006-krb5-1.12-api.patch
|
||||
Patch7: 0007-SELinux-integration.patch
|
||||
Patch8: 0008-krb5-1.9-debuginfo.patch
|
||||
Patch9: 0009-Fix-null-dereference-qualifying-short-hostnames.patch
|
||||
BuildRequires: autoconf
|
||||
BuildRequires: bison
|
||||
BuildRequires: keyutils
|
||||
@ -154,14 +155,7 @@ Include Files for Development
|
||||
%prep
|
||||
%setup -q -n %{srcRoot}
|
||||
%setup -q -a 3 -T -D -n %{srcRoot}
|
||||
%patch1 -p1
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
%patch6 -p1
|
||||
%patch7 -p1
|
||||
%patch8 -p1
|
||||
%autopatch -p1
|
||||
|
||||
%build
|
||||
# needs to be re-generated
|
||||
|
Loading…
Reference in New Issue
Block a user