forked from pool/systemd
27 lines
737 B
Diff
27 lines
737 B
Diff
From a9169c1c589bf7c7a29e7905d17e350ce7c7c48e Mon Sep 17 00:00:00 2001
|
|
From: Michal Sekletar <msekleta@redhat.com>
|
|
Date: Mon, 27 Oct 2014 11:08:26 +0100
|
|
Subject: [PATCH] util: fix copy-paste error and actually set the new hostname
|
|
|
|
Reported-by: sztanpet on irc
|
|
---
|
|
src/shared/util.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git src/shared/util.c src/shared/util.c
|
|
index 7d94a28..4143f6d 100644
|
|
--- src/shared/util.c
|
|
+++ src/shared/util.c
|
|
@@ -7189,7 +7189,7 @@ int sethostname_idempotent(const char *s) {
|
|
if (streq(buf, s))
|
|
return 0;
|
|
|
|
- r = sethostname(buf, strlen(buf));
|
|
+ r = sethostname(s, strlen(s));
|
|
if (r < 0)
|
|
return -errno;
|
|
|
|
--
|
|
1.7.9.2
|
|
|