Use the realpath of telephony-daemon when giving capability. 83/137683/2 accepted/tizen/unified/20170710.154335 submit/tizen/20170707.072106
authorjin-gyu.kim <jin-gyu.kim@samsung.com>
Fri, 7 Jul 2017 05:41:44 +0000 (14:41 +0900)
committerJin-gyu Kim <jin-gyu.kim@samsung.com>
Fri, 7 Jul 2017 05:44:21 +0000 (05:44 +0000)
- Currently, tv and ivi use the symlink for telephony-daemon.
- Giving the capability to the symlink is not possible, therefore convert it as the realpath.

Change-Id: Ifec9cc85588a7bff29abbacffbd7cab43c11bab6

config/set_capability

index 98f8d1ed251655735ee04710757961400ade1a2d..aece1059a63cf70e4b506a06eb7483bd4537df32 100755 (executable)
@@ -422,8 +422,9 @@ fi
 # Required              cap_net_admin
 # cap_net_admin                for network interface up/down
 
+# some profiles create the symlink to telephony-daemon
 if [ -e "/usr/bin/telephony-daemon" ]
-then /usr/sbin/setcap cap_net_admin=eip /usr/bin/telephony-daemon
+then /usr/sbin/setcap cap_net_admin=eip $(/usr/bin/readlink -f /usr/bin/telephony-daemon)
 fi
 
 # Package               platform/core/system/session-utils