sdb: change group and owner of sdb device node 93/71593/2
authorTaeyoung Kim <ty317.kim@samsung.com>
Thu, 26 May 2016 05:27:32 +0000 (14:27 +0900)
committershingil.kang <shingil.kang@samsung.com>
Fri, 27 May 2016 07:34:48 +0000 (16:34 +0900)
- The owner and group of sdbd are changed from "root "to "sdk".
  Thus the udev rule is changed for it.

- Previous:
    bash-3.2# ls -alZ /dev/samsung_sdb
    crw------- 1 root root * 10, 15 Jan  1 23:41 /dev/samsung_sdb
    bash-3.2#

- Now:
    bash-3.2# ls -alZ /dev/samsung_sdb
    crw-rw---- 1 sdk sdk * 10, 15 Jan  2 04:09 /dev/samsung_sdb
    bash-3.2#

Change-Id: Ifef41987d391bc544cd8792fc21458624306ce29
Signed-off-by: Taeyoung Kim <ty317.kim@samsung.com>
packaging/sdbd.spec
rules/99-sdbd.rules [new file with mode: 0644]

index 6a3da0b..22f6be6 100644 (file)
@@ -2,7 +2,7 @@
 
 Name:       sdbd
 Summary:    SDB daemon
-Version:    3.0.12
+Version:    3.0.13
 Release:    0
 License:    Apache-2.0
 Summary:    SDB daemon
@@ -74,6 +74,11 @@ install -m 755 script/sdk_launch %{buildroot}%{_prefix}/sbin/
 mkdir -p %{buildroot}%{TZ_SYS_BIN}
 install -m 755 script/profile_command %{buildroot}%{TZ_SYS_BIN}/
 
+%ifnarch %{ix86}
+mkdir -p %{buildroot}%{_prefix}/lib/udev/rules.d/
+install -m 644 rules/99-sdbd.rules %{buildroot}%{_prefix}/lib/udev/rules.d/
+%endif
+
 %post
 . %{_sysconfdir}/tizen-platform.conf
 if ! getent passwd "${TZ_SDK_USER_NAME}" > /dev/null; then
@@ -98,6 +103,7 @@ fi
 %else
 %{_unitdir}/sdbd_tcp.service
 %{_libdir}/systemd/system/multi-user.target.wants/sdbd.service
+%{_prefix}/lib/udev/rules.d/99-sdbd.rules
 %endif
 /usr/share/license/%{name}
 %{TZ_SYS_BIN}/profile_command
diff --git a/rules/99-sdbd.rules b/rules/99-sdbd.rules
new file mode 100644 (file)
index 0000000..c441d87
--- /dev/null
@@ -0,0 +1 @@
+KERNEL=="samsung_sdb", OWNER="sdk", GROUP="sdk", SECLABEL{smack}="*"