Drop root permission when launching apps in command line
authorJihoon Chung <jihoon.chung@samsaung.com>
Thu, 26 Sep 2013 04:57:32 +0000 (13:57 +0900)
committerHoseon LEE <hoseon46.lee@samsung.com>
Mon, 14 Oct 2013 11:18:21 +0000 (20:18 +0900)
commit1d90fd45baed741efa967fe63e80ac5667f6a79d
tree8f49b2456ff8733bc17aa783f6d707e68a311793
parentbb9341ecc058990a2d3e1d78d5ea0772f9ed4dcf
Drop root permission when launching apps in command line

- Launching apps in command line is useful to investigate issue with printf or other tools.

[Issue#]   N/A
[Problem]  Indicator does not show correctly when launched via command line.
[Cause]    Caused by various reasons - e.g., DAC and SMACK.
           * When applications are run with "root" permission,
             some of the platform feature (DAC, SMACK, etc) will fail to initialize.
           * Indicator issue is one of the issues which will occurr
             when web application is running on the "root" permission.
[Solution] Drop root permission
           * To support normal operations when launched by command line,
             web app needs to drop "root" permission before doing something.

[Remarks] Implementation details
    * Drop "root" permission should be done before touching  platform resource.
    * Current implementation point is too early, before attaching database, to access widget dao.
    * To resolve this, using ail to get various information to use privilege API.

Change-Id: I4c3014277da924cff590a80cb01c411655418a05
packaging/wrt.spec
src/wrt-client/CMakeLists.txt
src/wrt-client/client_security_support.cpp [new file with mode: 0644]
src/wrt-client/client_security_support.h [new file with mode: 0644]
src/wrt-client/wrt-client.cpp