From e0004c3acb9e953322603ce96ef17c1fabed8727 Mon Sep 17 00:00:00 2001 From: Yunmi Ha Date: Wed, 28 Dec 2016 17:13:53 +0900 Subject: [PATCH] Change /etc/.pwd.lock file's path for RO mount 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 --- packaging/gumd.spec | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packaging/gumd.spec b/packaging/gumd.spec index 49b4af4..4cc1cbf 100644 --- a/packaging/gumd.spec +++ b/packaging/gumd.spec @@ -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 -- 2.7.4