# Install default Smack rules, copied from a running Tizen IVI 3.0. # Corresponds to manifest file from default-access-domains in Tizen: # https://review.tizen.org/git?p=platform/core/security/default-ac-domains.git;a=blob;f=packaging/default-ac-domains.manifest do_install_append_with-lsm-smack () { install -d ${D}/${sysconfdir}/smack/accesses.d cat >${D}/${sysconfdir}/smack/accesses.d/default-access-domains <${D}/${libdir}/tmpfiles.d/packet-forwarding.conf <${D}/${base_libdir}/udev/rules.d/85-netdev-ipconf-smacklabel.rules < install -d $D${sysconfdir} # This has no effect on files installed into /etc during image construction # because pseudo does not know the special semantic of SMACK::TRANSMUTE. # To avoid having different xattrs on files inside /etc when pre-installed # in an image vs. installed on a device, the xattr-images.bbclass has # a workaround for this deficiency in pseudo. chsmack -t $D${sysconfdir} chsmack -a 'System::Shared' $D${sysconfdir} # Same for /var. Any daemon running as "System" will get write access # to everything. install -d $D${localstatedir} chsmack -t $D${localstatedir} chsmack -a 'System::Shared' $D${localstatedir} # mkdir -p $D/tmp chsmack -a '*' $D/tmp # # # These are in a file system mounted by systemd. We patch the systemd service # to set these attributes. }