NEW_USER=$1
export `tzplatform-get --user $NEW_USER TZ_USER_CONTENT`
-find $TZ_USER_CONTENT -type d -exec chown root:priv_mediastorage {} + -exec chmod 2770 {} +
+
+if [ -e /opt/share/askuser_disable ]
+then
+ find $TZ_USER_CONTENT -type d -exec chown root:priv_mediastorage {} + -exec chmod 2770 {} +
+else
+ find $TZ_USER_CONTENT -type d -exec chown root:priv_mediastorage {} + -exec chmod 2777 {} +
+fi
+
find $TZ_USER_CONTENT -type l -exec chown -h root:priv_mediastorage {} + -exec chsmack -a '_' {} +
# This is not related with the capability, but place here to run in generic-security.post
# It would be better to run this separately in generic-security.post future.
-if [ -e /usr/share/security-config/update_privacy_mount_list.sh ] && [ -e /usr/share/security-manager/policy/privilege-mount.list ]
+if [ -e /usr/share/security-config/update_privacy_mount_list.sh ] && [ -e /usr/share/security-manager/policy/privilege-mount.list ] && [ ! -e /opt/share/askuser_disable ]
then
/usr/share/security-config/update_privacy_mount_list.sh
fi
/usr/share/security-config/set_label
mkdir -p /opt/share/security-config/result
mkdir -p /opt/share/security-config/log
+touch /opt/share/askuser_disable
+chmod 600 /opt/share/askuser_disable
%post profile_mobile
mv /opt/share/security-config/test/root_test/mobile/* /opt/share/security-config/test/root_test/
rm -r /opt/share/security-config/test/capability_test/mobile/
rm -r /opt/share/security-config/test/capability_test/wearable/
rm -r /opt/share/security-config/test/new_service_test/list/
+rm -f /opt/share/askuser_disable
%postun profile_mobile
rm /opt/share/security-config/test/root_test/*
rm -r /opt/share/security-config/test/capability_test/mobile/
rm -r /opt/share/security-config/test/capability_test/wearable/
rm -r /opt/share/security-config/test/new_service_test/list/
+rm -f /opt/share/askuser_disable
%postun profile_wearable
rm /opt/share/security-config/test/root_test/*