summaryrefslogtreecommitdiff
path: root/libnm
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2016-06-01 12:54:05 +0200
committerThomas Haller <thaller@redhat.com>2016-06-01 19:06:34 +0200
commit89135853972710ce0f720acba4b3c12910e3cebc (patch)
treecfc4453397353b425e1816861151b9ef07d49421 /libnm
parenteb6140a7729db3eee2c95ddbbe65b12a31f29c43 (diff)
downloadNetworkManager-89135853972710ce0f720acba4b3c12910e3cebc.tar.gz
libnm: implement missing NM_AUTH_PERMISSION_SETTINGS_MODIFY_GLOBAL_DNS
Diffstat (limited to 'libnm')
-rw-r--r--libnm/nm-client.h5
-rw-r--r--libnm/nm-manager.c3
2 files changed, 7 insertions, 1 deletions
diff --git a/libnm/nm-client.h b/libnm/nm-client.h
index 66ec9ea5bb..bdd7c46310 100644
--- a/libnm/nm-client.h
+++ b/libnm/nm-client.h
@@ -92,6 +92,8 @@ G_BEGIN_DECLS
* owned by the current user can be modified
* @NM_CLIENT_PERMISSION_SETTINGS_MODIFY_HOSTNAME: controls whether the
* persistent hostname can be changed
+ * @NM_CLIENT_PERMISSION_SETTINGS_MODIFY_GLOBAL_DNS: modify persistent global
+ * DNS configuration
* @NM_CLIENT_PERMISSION_LAST: a reserved boundary value
*
* #NMClientPermission values indicate various permissions that NetworkManager
@@ -110,8 +112,9 @@ typedef enum {
NM_CLIENT_PERMISSION_SETTINGS_MODIFY_SYSTEM = 9,
NM_CLIENT_PERMISSION_SETTINGS_MODIFY_OWN = 10,
NM_CLIENT_PERMISSION_SETTINGS_MODIFY_HOSTNAME = 11,
+ NM_CLIENT_PERMISSION_SETTINGS_MODIFY_GLOBAL_DNS = 12,
- NM_CLIENT_PERMISSION_LAST = NM_CLIENT_PERMISSION_SETTINGS_MODIFY_HOSTNAME
+ NM_CLIENT_PERMISSION_LAST = 12,
} NMClientPermission;
/**
diff --git a/libnm/nm-manager.c b/libnm/nm-manager.c
index a6c1f3f954..66755e1394 100644
--- a/libnm/nm-manager.c
+++ b/libnm/nm-manager.c
@@ -213,6 +213,7 @@ init_dbus (NMObject *object)
#define NM_AUTH_PERMISSION_SETTINGS_MODIFY_SYSTEM "org.freedesktop.NetworkManager.settings.modify.system"
#define NM_AUTH_PERMISSION_SETTINGS_MODIFY_OWN "org.freedesktop.NetworkManager.settings.modify.own"
#define NM_AUTH_PERMISSION_SETTINGS_MODIFY_HOSTNAME "org.freedesktop.NetworkManager.settings.modify.hostname"
+#define NM_AUTH_PERMISSION_SETTINGS_MODIFY_GLOBAL_DNS "org.freedesktop.NetworkManager.settings.modify.global-dns"
static NMClientPermission
nm_permission_to_client (const char *nm)
@@ -239,6 +240,8 @@ nm_permission_to_client (const char *nm)
return NM_CLIENT_PERMISSION_SETTINGS_MODIFY_OWN;
else if (!strcmp (nm, NM_AUTH_PERMISSION_SETTINGS_MODIFY_HOSTNAME))
return NM_CLIENT_PERMISSION_SETTINGS_MODIFY_HOSTNAME;
+ else if (!strcmp (nm, NM_AUTH_PERMISSION_SETTINGS_MODIFY_GLOBAL_DNS))
+ return NM_CLIENT_PERMISSION_SETTINGS_MODIFY_GLOBAL_DNS;
return NM_CLIENT_PERMISSION_NONE;
}