summaryrefslogtreecommitdiff
path: root/libnm
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2016-08-17 15:34:55 +0200
committerThomas Haller <thaller@redhat.com>2016-08-17 15:50:20 +0200
commit2cb18efaea0b0fd90c4633c2c0ff00864fad18b4 (patch)
treef72adc49dd610ced96a6fcef5e4e16129574d517 /libnm
parentd070d7f47d2d5631f610c0cd58f18bbffa431f63 (diff)
downloadNetworkManager-2cb18efaea0b0fd90c4633c2c0ff00864fad18b4.tar.gz
permissions: properly add checkpoint-rollback permission
Fixes: a52d4654ec4d3afbbb0ef70ada55f4a5ddac92db
Diffstat (limited to 'libnm')
-rw-r--r--libnm/nm-client.h4
-rw-r--r--libnm/nm-manager.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/libnm/nm-client.h b/libnm/nm-client.h
index a496d9ad2e..e2a18b6172 100644
--- a/libnm/nm-client.h
+++ b/libnm/nm-client.h
@@ -97,6 +97,7 @@ G_BEGIN_DECLS
* @NM_CLIENT_PERMISSION_SETTINGS_MODIFY_GLOBAL_DNS: modify persistent global
* DNS configuration
* @NM_CLIENT_PERMISSION_RELOAD: controls access to Reload.
+ * @NM_CLIENT_PERMISSION_CHECKPOINT_ROLLBACK: permission to create checkpoints.
* @NM_CLIENT_PERMISSION_LAST: a reserved boundary value
*
* #NMClientPermission values indicate various permissions that NetworkManager
@@ -117,8 +118,9 @@ typedef enum {
NM_CLIENT_PERMISSION_SETTINGS_MODIFY_HOSTNAME = 11,
NM_CLIENT_PERMISSION_SETTINGS_MODIFY_GLOBAL_DNS = 12,
NM_CLIENT_PERMISSION_RELOAD = 13,
+ NM_CLIENT_PERMISSION_CHECKPOINT_ROLLBACK = 14,
- NM_CLIENT_PERMISSION_LAST = 13,
+ NM_CLIENT_PERMISSION_LAST = 14,
} NMClientPermission;
/**
diff --git a/libnm/nm-manager.c b/libnm/nm-manager.c
index 27bd4ca672..4156f651bf 100644
--- a/libnm/nm-manager.c
+++ b/libnm/nm-manager.c
@@ -232,6 +232,8 @@ nm_permission_to_client (const char *nm)
return NM_CLIENT_PERMISSION_SETTINGS_MODIFY_GLOBAL_DNS;
else if (!strcmp (nm, NM_AUTH_PERMISSION_RELOAD))
return NM_CLIENT_PERMISSION_RELOAD;
+ else if (!strcmp (nm, NM_AUTH_PERMISSION_CHECKPOINT_ROLLBACK))
+ return NM_CLIENT_PERMISSION_CHECKPOINT_ROLLBACK;
return NM_CLIENT_PERMISSION_NONE;
}