Root should not be able to use pkgcmd tools. 52/28652/1 accepted/tizen/3.0.2014.q3/common/20141020.094321 accepted/tizen/common/20141013.150509 accepted/tizen/ivi/20141014.072144 submit/tizen_3.0.2014.q3_common/20141020.090531 submit/tizen_3.0.2014.q3_common/20141020.093726 submit/tizen_common/20141013.122308 submit/tizen_ivi/20141014.000000
authorBaptiste DURAND <baptiste.durand@open.eurogiciel.org>
Mon, 13 Oct 2014 09:06:30 +0000 (11:06 +0200)
committerBaptiste DURAND <baptiste.durand@open.eurogiciel.org>
Mon, 13 Oct 2014 09:06:30 +0000 (11:06 +0200)
BUG-Tizen=TC-320

Change-Id: I0827b1d3e17a400bab950a1184c4add59ec2bc18
Signed-off-by: Baptiste DURAND <baptiste.durand@open.eurogiciel.org>
tool/pkg_cmd.c

index cfcad54..2a43db8 100755 (executable)
@@ -1133,6 +1133,10 @@ int main(int argc, char *argv[])
                }
        }
        uid_t uid = getuid();
+       if(uid == OWNER_ROOT) {
+               printf("Current User is Root! : Only regular users are allowed\n");
+               return -1;
+       }
        if(data.global == 1) {
                uid = GLOBAL_USER;
        }