Fix update script re-setting the Smack label to System::Privileged 59/246959/3 accepted/tizen/6.0/unified/20210123.052331 accepted/tizen/unified/20201110.125041 submit/tizen/20201105.113154 submit/tizen_6.0/20201105.113732 submit/tizen_6.0/20210122.061316
authorTomasz Swierczek <t.swierczek@samsung.com>
Thu, 5 Nov 2020 10:05:23 +0000 (11:05 +0100)
committerTomasz Swierczek <t.swierczek@samsung.com>
Thu, 5 Nov 2020 11:20:42 +0000 (12:20 +0100)
The ca-bundle.pem file, acc. to smack manifest of the package, should
be labeled as System::Shared. The concat-cacerts.sh script, when encountered
exsting bundle, was removing it, creating new file which resulted in the
smack label to be (possibly) changed to the label under the script was run.

With this change, the file is no longer removed, preserving its Smack label.

Change-Id: Ieb230151f064689585f980e231781dded3dc3c2f

scripts/concat-cacerts.sh

index 07c9870b959d1221fc31d360b4c6b5b32e721010..ee1e676a637ea9c2277cb01f35e4aa29f05d0f3e 100755 (executable)
@@ -6,7 +6,7 @@ CRT_PATH=$2
 
 if [ -s $CRT_PATH ]
 then
-    rm $CRT_PATH
+    echo "" > $CRT_PATH
 fi
 
 for i in `find $SRC_PATH -maxdepth 1 -type f | sort`