From de9f966ccc66386af2643b9645f8eca73ef64cd0 Mon Sep 17 00:00:00 2001 From: "shingil.kang" Date: Fri, 5 Aug 2016 15:20:34 +0900 Subject: [PATCH] Add capability 'sdbd_rootperm' Change-Id: Ib63b4f3605506f62e3a8e8d7e32fb5937062ca3c Signed-off-by: shingil.kang Signed-off-by: Sooyoung Ha --- src/sdb.c | 3 +++ src/sdb.h | 1 + src/services.c | 4 ++++ 3 files changed, 8 insertions(+) diff --git a/src/sdb.c b/src/sdb.c index 6d2bf42..692e87f 100644 --- 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, diff --git a/src/sdb.h b/src/sdb.h index b339f26..2128616 100644 --- 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 diff --git a/src/services.c b/src/services.c index cafffc9..64dbd11 100644 --- a/src/services.c +++ b/src/services.c @@ -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); -- 2.34.1