From 057ab9c2481d5ade30273e1069357b7c839e184c Mon Sep 17 00:00:00 2001 From: kremlin Date: Wed, 20 Aug 2014 23:01:50 -0500 Subject: [PATCH] make SetStaticHostname() call sethostname() --- src/interfaces/hostnamed/hostnamed.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/interfaces/hostnamed/hostnamed.c b/src/interfaces/hostnamed/hostnamed.c index 3f63e0a..ec7156f 100644 --- a/src/interfaces/hostnamed/hostnamed.c +++ b/src/interfaces/hostnamed/hostnamed.c @@ -256,9 +256,9 @@ on_handle_set_static_hostname(Hostname1 *hn1_passed_interf, } else { g_strdelimit(STATIC_HOSTNAME, " ", '-'); - hostname1_set_static_hostname(hn1_passed_interf, STATIC_HOSTNAME); + hostname1_set_static_hostname(hn1_passed_interf, STATIC_HOSTNAME); g_ptr_array_add(hostnamed_freeable, valid_static_hostname_buf); - ret = TRUE; + ret = (!sethostname(valid_static_hostname_buf, MAXHOSTNAMELEN)) ? TRUE : FALSE; /* TODO set /etc/myname, guarantee domain or substitue .home.network" */ hostname1_complete_set_static_hostname(hn1_passed_interf, invoc); } } -- 2.41.0