[systemd-devel] [PATCH 5/5] hostnamed: don't check against our cached data when setting new static hostname

Michal Sekletar msekleta at redhat.com
Mon Feb 24 06:59:31 PST 2014


We don't change static hostname in case it is the same as the one we currently
know about. This is not ideal, because it might have been changed in the meantime
and we just don't know about the change. So allow user the set whatever he
desires and don't check, before doing so, against our cached information.
---
 src/hostname/hostnamed.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/src/hostname/hostnamed.c b/src/hostname/hostnamed.c
index d8938a4..a1cfb89 100644
--- a/src/hostname/hostnamed.c
+++ b/src/hostname/hostnamed.c
@@ -433,9 +433,6 @@ static int method_set_static_hostname(sd_bus *bus, sd_bus_message *m, void *user
         if (isempty(name))
                 name = NULL;
 
-        if (streq_ptr(name, c->data[PROP_STATIC_HOSTNAME]))
-                return sd_bus_reply_method_return(m, NULL);
-
         r = bus_verify_polkit_async(bus, &c->polkit_registry, m, "org.freedesktop.hostname1.set-static-hostname", interactive, error, method_set_static_hostname, c);
         if (r < 0)
                 return r;
-- 
1.8.4.2



More information about the systemd-devel mailing list