Add capability 'sdbd_rootperm' 05/105705/2
authorshingil.kang <shingil.kang@samsung.com>
Fri, 5 Aug 2016 06:20:34 +0000 (15:20 +0900)
committerSooyoung Ha <yoosah.ha@samsung.com>
Mon, 13 Feb 2017 11:15:53 +0000 (20:15 +0900)
Change-Id: Ib63b4f3605506f62e3a8e8d7e32fb5937062ca3c
Signed-off-by: shingil.kang <shingil.kang@samsung.com>
Signed-off-by: Sooyoung Ha <yoosah.ha@samsung.com>
src/sdb.c
src/sdb.h
src/services.c

index 6d2bf42..692e87f 100644 (file)
--- a/src/sdb.c
+++ b/src/sdb.c
@@ -1873,6 +1873,9 @@ static void init_capabilities(void) {
                     "%s", DISABLED);
     }
 
+    // Sdbd root permission
+    snprintf(g_capabilities.root_permission, sizeof(g_capabilities.root_permission),
+                "%s", DISABLED);
 
     // Root command support
     if(!request_capability_to_plugin(CAPABILITY_ROOT_ONOFF, g_capabilities.rootonoff_support,
index b339f26..2128616 100644 (file)
--- a/src/sdb.h
+++ b/src/sdb.h
@@ -281,6 +281,7 @@ typedef struct platform_capabilities
     char encryption_support[CAPBUF_ITEMSIZE];   // enabled or disabled
     char appid2pid_support[CAPBUF_ITEMSIZE];    // enabled or disabled
     char pkgcmd_debugmode[CAPBUF_ITEMSIZE];     // enabled or disabled
+    char root_permission[CAPBUF_ITEMSIZE];      // enabled or disabled
 
     char log_enable[CAPBUF_ITEMSIZE];           // enabled or disabled
     char log_path[CAPBUF_LL_ITEMSIZE];          // path of sdbd log
index cafffc9..64dbd11 100644 (file)
@@ -893,6 +893,10 @@ static void get_capability(int fd, void *cookie) {
     offset += put_key_value_string(cap_buffer, offset, CAPBUF_SIZE,
                                 "syncwinsz_support", g_capabilities.syncwinsz_support);
 
+    // sdbd root permission
+    offset += put_key_value_string(cap_buffer, offset, CAPBUF_SIZE,
+                                "sdbd_rootperm", g_capabilities.root_permission);
+
     // Root command support
     offset += put_key_value_string(cap_buffer, offset, CAPBUF_SIZE,
                                 "rootonoff_support", g_capabilities.rootonoff_support);