systemd/hostname-NULL.patch
Marcus Meissner 9a9284fa89 - hostname-NULL.patch: Work around a crash on XEN hosts
in OBS. /etc/hostname is not present and systemd then does
  strchr(hostname,soemthing) with hostname NULL.

- hostname-NULL.patch: Work around a crash on XEN hosts
  in OBS. /etc/hostname is not present and systemd then does
  strchr(hostname,soemthing) with hostname NULL.

OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=888
2015-07-30 06:19:43 +00:00

14 lines
533 B
Diff

Index: systemd-222/src/core/hostname-setup.c
===================================================================
--- systemd-222.orig/src/core/hostname-setup.c
+++ systemd-222/src/core/hostname-setup.c
@@ -44,7 +44,7 @@ int hostname_setup(void) {
else
log_warning_errno(r, "Failed to read configured hostname: %m");
- hn = NULL;
+ hn = strdup("nohostname.set.site");
} else
hn = b;
/* strip any leftover of a domain name */