From: Adrian Szyndela Date: Wed, 3 Oct 2018 13:52:22 +0000 (+0200) Subject: policychecker: add more types of privileges X-Git-Tag: submit/tizen/20180808.030253~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8ef10ad5affb3cc9722dd6ed8db6491a008cbf87;p=platform%2Fcore%2Fsystem%2Fdbus-tools.git policychecker: add more types of privileges Added three more types of privileges. Requested by bro kim. Change-Id: I3219a7b10cd4b5c784a88abe1fb034dde10bb0ff --- diff --git a/policychecker/check.in b/policychecker/check.in index da5b3ad..84c0c61 100755 --- a/policychecker/check.in +++ b/policychecker/check.in @@ -34,8 +34,15 @@ if [ ! -d /var/cynara/db ]; then exit 1 fi +PRIVILEGES=("http://tizen.org/privilege" + "http://samsung.com/tizen/privilege" + "http://developer.samsung.com/tizen/privilege" + "http://developer.samsung.com/privilege") + # TEST 1/3: check cynara privileges existence (there are too many to perform this check using xsltproc) -grep "http://tizen.org/privilege" /var/cynara/db/* | sed -e "s/;[^;]*;$//g" -e "s/.*http/http/g" | uniq > $system_privileges_file +for p in ${PRIVILEGES[@]}; do + grep $p /var/cynara/db/* | sed -e "s/;[^;]*;$//g" -e "s/.*http/http/g" | uniq >> $system_privileges_file +done $xslt_processor $checker_dir/extract_privilege.xsl $config_file | uniq > $conf_privileges_file grep -Fxv -f $system_privileges_file $conf_privileges_file | while read line ; do echo "FAILED(cynara) no privilege in cynara db: $line" ; exit 1; done