summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonrad Kuchciak <k.kuchciak@samsung.com>2017-11-09 13:53:15 +0100
committerMyoungJune Park <mj2004.park@samsung.com>2017-11-28 07:44:57 +0900
commitda06b2bde532b32ae02c0de0844bb09feab84006 (patch)
treef79338754360994ff00fe707381d9c4a06782cad
parent6a37d5d9380a2dab34ed104a762cbe61bf442cc1 (diff)
downloadfactory-reset-da06b2bde532b32ae02c0de0844bb09feab84006.tar.gz
factory-reset-da06b2bde532b32ae02c0de0844bb09feab84006.tar.bz2
factory-reset-da06b2bde532b32ae02c0de0844bb09feab84006.zip
Remove ": No smack property found" from smack_label.txt
List of smack labels is generated by chsmack and the output is stored in smack_label.txt. When ex. /opt/etc/shadow doesn't have any smack labels during image creation chsmack produces output like: opt/etc/shadow: No smack property found , which is then interpreted by rstsmack as one long filename. And instead of setting default smack label "_" to the file it does nothing. Finally, after the factory reset, the file has "System::Privileged" label which was set during unzipping opt and it causes the whole User session to fail at system startup. This is a workaround patch. Change-Id: I67c3884cdbaec912a08d8979488681931b1e2513 Signed-off-by: Konrad Kuchciak <k.kuchciak@samsung.com>
-rwxr-xr-xscript/build-backup-data.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/script/build-backup-data.sh b/script/build-backup-data.sh
index bb8d58e..da67765 100755
--- a/script/build-backup-data.sh
+++ b/script/build-backup-data.sh
@@ -62,6 +62,9 @@ create_archive() {
bash -c "find $i $xpath -exec /usr/bin/chsmack {} \; >> $rdir/smack_label.txt"
done
+ # workaround for the files with empty smack properies
+ sed -i -e "s/: No smack property found//g" $rdir/smack_label.txt
+
chmod go-rwx $rdir/* $rdir $rdir/..
}