diff options
author | Thomas Haller <thaller@redhat.com> | 2016-08-17 15:34:55 +0200 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2016-08-17 15:50:20 +0200 |
commit | 2cb18efaea0b0fd90c4633c2c0ff00864fad18b4 (patch) | |
tree | f72adc49dd610ced96a6fcef5e4e16129574d517 /libnm | |
parent | d070d7f47d2d5631f610c0cd58f18bbffa431f63 (diff) | |
download | NetworkManager-2cb18efaea0b0fd90c4633c2c0ff00864fad18b4.tar.gz |
permissions: properly add checkpoint-rollback permission
Fixes: a52d4654ec4d3afbbb0ef70ada55f4a5ddac92db
Diffstat (limited to 'libnm')
-rw-r--r-- | libnm/nm-client.h | 4 | ||||
-rw-r--r-- | libnm/nm-manager.c | 2 |
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; } |