systemd/avoid-assertion-if-invalid-address-familily-is-passed-to-g.patch
Dr. Werner Fink 4ae8e483c0 - Update to release 202:
+ 'systemctl list-jobs' got some polishing. '--type=' argument
    may now be passed more than once. 'systemctl list-sockets' has
    been added.
  + systemd gained a new unit 'systemd-static-nodes.service'
    that generates static device nodes earlier during boot, and
    can run in conjunction with udev.
  + systemd-nspawn now places all containers in the new /machine
    top-level cgroup directory in the name=systemd hierarchy.
  + bootchart can now store its data in the journal.
  + journactl can now take multiple --unit= and --user-unit=
    switches.
  + The cryptsetup logic now understands the "luks.key=" kernel
    command line switch. If a configured key file is missing, it
    will fallback to prompting the user.
- Rebase some patches
- Update handle-SYSTEMCTL_OPTIONS-environment-variable.patch to
  properly handle SYSTEMCTL_OPTIONS

- Fix regression in the default for tmp auto-deletion
  (systemd-tmp-safe-defaults.patch, FATE#314974).

- Add chromebook lid switch as a power switch to logind rule to
  enable suspend on lid close

- Update to release 202:
  + 'systemctl list-jobs' got some polishing. '--type=' argument
    may now be passed more than once. 'systemctl list-sockets' has
    been added.
  + systemd gained a new unit 'systemd-static-nodes.service'

OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=365
2013-04-19 20:31:17 +00:00

39 lines
1.3 KiB
Diff

From: Ludwig Nussel <ludwig.nussel@suse.de>
Date: Mon, 26 Nov 2012 09:49:42 +0100
Subject: avoid assertion if invalid address familily is passed to
gethostbyaddr_r (bnc#791101)
---
src/nss-myhostname/nss-myhostname.c | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/src/nss-myhostname/nss-myhostname.c b/src/nss-myhostname/nss-myhostname.c
index 16ccb3e..884eb99 100644
--- a/src/nss-myhostname/nss-myhostname.c
+++ b/src/nss-myhostname/nss-myhostname.c
@@ -383,6 +383,12 @@ enum nss_status _nss_myhostname_gethostbyaddr2_r(
struct address *a;
unsigned n_addresses = 0, n;
+ if (af != AF_INET && af != AF_INET6) {
+ *errnop = EAFNOSUPPORT;
+ *h_errnop = NO_DATA;
+ return NSS_STATUS_UNAVAIL;
+ }
+
if (len != PROTO_ADDRESS_SIZE(af)) {
*errnop = EINVAL;
*h_errnop = NO_RECOVERY;
@@ -398,11 +404,6 @@ enum nss_status _nss_myhostname_gethostbyaddr2_r(
if (memcmp(addr, LOCALADDRESS_IPV6, 16) == 0)
goto found;
-
- } else {
- *errnop = EAFNOSUPPORT;
- *h_errnop = NO_DATA;
- return NSS_STATUS_UNAVAIL;
}
ifconf_acquire_addresses(&addresses, &n_addresses);