bus_name = g_dbus_method_invocation_get_sender(invoc);
/* verify caller has correct permissions via polkit */
- is_authed = polkit_try_auth(bus_name, "org.freedesktop.hostname1.SetHostname", policykit_auth);
+ is_authed = polkit_try_auth(bus_name, "org.freedesktop.hostname1.set-hostname", policykit_auth);
switch(is_authed) {
bus_name = g_dbus_method_invocation_get_sender(invoc);
/* verify caller has correct permissions via polkit */
- is_authed = polkit_try_auth(bus_name, "org.freedesktop.hostname1.SetStaticHostname", policykit_auth);
+ is_authed = polkit_try_auth(bus_name, "org.freedesktop.hostname1.set-static-hostname", policykit_auth);
switch(is_authed) {
} 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);
}
}
bus_name = g_dbus_method_invocation_get_sender(invoc);
/* verify caller has correct permissions via polkit */
- is_authed = polkit_try_auth(bus_name, "org.freedesktop.hostname1.SetPrettyHostname", policykit_auth);
+ is_authed = polkit_try_auth(bus_name, "org.freedesktop.hostname1.set-pretty-hostname", policykit_auth);
switch(is_authed) {
g_strlcpy(valid_chassis_name_buf, proposed_chassis_name, (gsize)64);
/* verify caller has correct permissions via polkit */
- is_authed = polkit_try_auth(bus_name, "org.freedesktop.hostname1.SetChassis", policykit_auth);
+ is_authed = polkit_try_auth(bus_name, "org.freedesktop.hostname1.set-chassis", policykit_auth);
switch(is_authed) {
bus_name = g_dbus_method_invocation_get_sender(invoc);
/* verify caller has correct permissions via polkit */
- is_authed = polkit_try_auth(bus_name, "org.freedesktop.hostname1.SetIconName", policykit_auth);
+ is_authed = polkit_try_auth(bus_name, "org.freedesktop.hostname1.set-icon-name", policykit_auth);
switch(is_authed) {
const gchar *
our_get_os_cpename() {
- return "ONEDAY";
+ /* XXX needs to parse /etc/os-release (fallback to /usr/local/lib/os-release) */
+ return "";
}
const gchar *