diff options
author | Hyotaek Shim <hyotaek.shim@samsung.com> | 2018-09-19 19:23:03 +0900 |
---|---|---|
committer | Karol Lewandowski <k.lewandowsk@samsung.com> | 2024-02-13 23:21:02 +0100 |
commit | d985ba2ea37e71eeaac3a7bb3838045e89521204 (patch) | |
tree | 7525a31c3e2b55f980f0814c0b1c997972788650 | |
parent | 1119a81549e410cea0a8d18c52db4469d07066e8 (diff) | |
download | device-mapper-sandbox/klewandowski/tizen_2.03.22.tar.gz device-mapper-sandbox/klewandowski/tizen_2.03.22.tar.bz2 device-mapper-sandbox/klewandowski/tizen_2.03.22.zip |
tizen: Set the smack label of /dev/mapper and /dev/mapper/control as '*'accepted/tizen/unified/x/20240219.013834accepted/tizen/unified/toolchain/20240311.065937accepted/tizen/unified/20240216.054936sandbox/klewandowski/tizen_2.03.22accepted/tizen_unified_toolchain
Normally, /dev/mapper and /dev/mapper/control are created by the in-kernel dm driver
and the smack label is set by Systemd as '*'.
When the dm driver is loaded as a module (dm-mod.ko), however,
/dev/mapper's label cannot be initialized by Systemd.
drwxr-xr-x root root * /dev/mapper
crw------- root root * /dev/mapper/control
Change-Id: I74f7b58cbfb80294bb19bd5cff683359d26c1b22
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
-rw-r--r-- | packaging/99-dm-tizen.rules | 1 | ||||
-rw-r--r-- | packaging/device-mapper.spec | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/packaging/99-dm-tizen.rules b/packaging/99-dm-tizen.rules new file mode 100644 index 0000000..09dc8e0 --- /dev/null +++ b/packaging/99-dm-tizen.rules @@ -0,0 +1 @@ +KERNEL=="device-mapper", NAME="mapper/control", SECLABEL{smack}="*", RUN+="/bin/chsmack -a * /dev/mapper" diff --git a/packaging/device-mapper.spec b/packaging/device-mapper.spec index dc8f2c8..454e841 100644 --- a/packaging/device-mapper.spec +++ b/packaging/device-mapper.spec @@ -9,6 +9,7 @@ Summary: Device mapper utility Url: http://sources.redhat.com/dm Group: Base/Device Management Source0: ftp://sources.redhat.com/pub/lvm2/lvm2-v%{lvm2_version}.tar.gz +Source101: 99-dm-tizen.rules Source1001: device-mapper.manifest BuildRequires: pkgconfig(libsystemd) @@ -61,6 +62,7 @@ make CFLAGS="-fPIC" LDFLAGS="-pie" V=1 \ %install make install_device-mapper DESTDIR=%{buildroot} usrlibdir=%{buildroot}/usr/%{_lib} sed -i 's/ (.*)//g' %{buildroot}%{_libdir}/pkgconfig/*.pc +install -m644 99-dm-tizen.rules %{buildroot}/%{udev_dir}/99-dm-tizen.rules rm -rf %{buildroot}/usr/share/man |