keyrouter: Use macro for a string of privilege 22/278222/1
authorSeunghun Lee <shiin.lee@samsung.com>
Fri, 10 Jun 2022 01:46:04 +0000 (10:46 +0900)
committerSooChan Lim <sc1.lim@samsung.com>
Mon, 18 Jul 2022 05:58:59 +0000 (14:58 +0900)
Change-Id: I586bada8424050ee660c59fc17b56b474e3ab637

src/keyrouter/keyrouter.c

index 9d70fceac9e733dc4467e5b89f2f31528621107e..4ab373424c1e53c0c76ea3b7f2a1db724ead5732 100644 (file)
@@ -11,6 +11,7 @@
 #include "keyrouter.h"
 
 #define TIZEN_KEYROUTER_VERSION 2
+#define TIZEN_KEYROUTER_PRIVILEGE "http://tizen.org/privilege/keygrab"
 
 static void
 keyrouter_bind(struct wl_client *client, void *data, uint32_t version,
@@ -384,7 +385,7 @@ keyrouter_check_privilege(struct ds_tizen_keyrouter_client *keyrouter_client,
     wl_client_get_credentials(client, &pid, &uid, &gid);
 
     keyrouter_client->privileged = tizen_security_check_privilege(pid, uid,
-            "http://tizen.org/privilege/keygrab");
+            TIZEN_KEYROUTER_PRIVILEGE);
 
     return keyrouter_client->privileged;
 }