projects
/
systembsd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
make SetStaticHostname() call sethostname()
[systembsd.git]
/
src
/
interfaces
/
hostnamed
/
hostnamed.c
diff --git
a/src/interfaces/hostnamed/hostnamed.c
b/src/interfaces/hostnamed/hostnamed.c
index 9bc1f9e7d0b4164a3130d1f5823c39626825679b..ec7156f1bab6502e72d8e71b140ebf231e358872 100644
(file)
--- a/
src/interfaces/hostnamed/hostnamed.c
+++ b/
src/interfaces/hostnamed/hostnamed.c
@@
-133,7
+133,7
@@
on_handle_set_hostname(Hostname1 *hn1_passed_interf,
bus_name = g_dbus_method_invocation_get_sender(invoc);
/* verify caller has correct permissions via polkit */
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.
SetH
ostname", policykit_auth);
+ is_authed = polkit_try_auth(bus_name, "org.freedesktop.hostname1.
set-h
ostname", policykit_auth);
switch(is_authed) {
switch(is_authed) {
@@
-210,7
+210,7
@@
on_handle_set_static_hostname(Hostname1 *hn1_passed_interf,
bus_name = g_dbus_method_invocation_get_sender(invoc);
/* verify caller has correct permissions via polkit */
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.
SetStaticH
ostname", policykit_auth);
+ is_authed = polkit_try_auth(bus_name, "org.freedesktop.hostname1.
set-static-h
ostname", policykit_auth);
switch(is_authed) {
switch(is_authed) {
@@
-256,9
+256,9
@@
on_handle_set_static_hostname(Hostname1 *hn1_passed_interf,
} else {
g_strdelimit(STATIC_HOSTNAME, " ", '-');
} 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);
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);
}
}
hostname1_complete_set_static_hostname(hn1_passed_interf, invoc);
}
}
@@
-289,7
+289,7
@@
on_handle_set_pretty_hostname(Hostname1 *hn1_passed_interf,
bus_name = g_dbus_method_invocation_get_sender(invoc);
/* verify caller has correct permissions via polkit */
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.
SetPrettyH
ostname", policykit_auth);
+ is_authed = polkit_try_auth(bus_name, "org.freedesktop.hostname1.
set-pretty-h
ostname", policykit_auth);
switch(is_authed) {
switch(is_authed) {
@@
-389,7
+389,7
@@
on_handle_set_chassis(Hostname1 *hn1_passed_interf,
g_strlcpy(valid_chassis_name_buf, proposed_chassis_name, (gsize)64);
/* verify caller has correct permissions via polkit */
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.
SetC
hassis", policykit_auth);
+ is_authed = polkit_try_auth(bus_name, "org.freedesktop.hostname1.
set-c
hassis", policykit_auth);
switch(is_authed) {
switch(is_authed) {
@@
-473,7
+473,7
@@
on_handle_set_icon_name(Hostname1 *hn1_passed_interf,
bus_name = g_dbus_method_invocation_get_sender(invoc);
/* verify caller has correct permissions via polkit */
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.
SetIconN
ame", policykit_auth);
+ is_authed = polkit_try_auth(bus_name, "org.freedesktop.hostname1.
set-icon-n
ame", policykit_auth);
switch(is_authed) {
switch(is_authed) {
@@
-628,7
+628,8
@@
our_get_kernel_release() {
const gchar *
our_get_os_cpename() {
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 *
}
const gchar *