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