SHA256
1
0
forked from pool/systemd
systemd/hostname-NULL.patch
Marcus Meissner 8b1e73ecdb Accepting request 319468 from home:msmeissn:branches:Base:System
- 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/request/show/319468
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 */