Change /etc/.pwd.lock file's path for RO mount 95/107495/4
authorYunmi Ha <yunmi.ha@samsung.com>
Wed, 28 Dec 2016 08:13:53 +0000 (17:13 +0900)
committerYunmi Ha <yunmi.ha@samsung.com>
Wed, 28 Dec 2016 09:12:59 +0000 (18:12 +0900)
If mount /etc directory as readonly, lckpwdf API always return fail.
(Because lckpwdf API try to access /etc/.pwd.lock file as writable permition)
So almost gumd API return fail also.
For this, gumd makes /opt/etc/.pwd.lock and make symbolic link in /etc.
(Now..this is only for TV profile.)

Change-Id: I19f5f9fba0512bcc24c7fecde0bf4a8541df5d28
Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
packaging/gumd.spec

index 49b4af4..4cc1cbf 100644 (file)
@@ -131,7 +131,13 @@ install -d -m 755 %{_sysconfdir}/%{name}/userdel.d
 install -d -m 755 %{_sysconfdir}/%{name}/groupadd.d
 install -d -m 755 %{_sysconfdir}/%{name}/groupdel.d
 install -d -m 755 %{_localstatedir}/lib/%{name}/user
-
+%if "%{TIZEN_PRODUCT_TV}" ==  "1"
+touch /opt%{_sysconfdir}/.pwd.lock
+if [ -e "%{_sysconfdir}/.pwd.lock" ]; then
+    rm -f %{_sysconfdir}/.pwd.lock
+fi
+ln -s /opt%{_sysconfdir}/.pwd.lock %{_sysconfdir}/.pwd.lock
+%endif
 
 %postun -p /sbin/ldconfig