Give cap_sys_moduel to kmod.
Give cap_net_admin to hciconfig
Add bluetooth-stack-up.service.
Add bluetooth-stack-down.service
Modify bluetooth-stack-down as root.
Change-Id: I5dc4401c5f8c6ef61aa3fbb834a70201920c7f45
then /usr/sbin/setcap cap_sys_admin=ei /usr/bin/krate-mount
fi
+# Package platform/upstream/kmod
+# Date Nov 7, 2018
+# Required cap_sys_module
+# cap_sys_module To use insmod
+# This is requested by Bluetooth module, to be used in bluetooth-stack-up.service.
+
+if [ -e "/usr/bin/kmod" ]
+then /usr/sbin/setcap cap_sys_module=ei /usr/bin/kmod
+fi
+
+# Package platform/upstream/bluez
+# Date Nov 7, 2018
+# Required cap_net_admin
+# cap_sys_module To control bt interface
+
+if [ -e "/usr/bin/hciconfig" ]
+then /usr/sbin/setcap cap_net_admin=ei /usr/bin/hciconfig
+fi
+
# TODO: MOVE TO OTHER SCRIPT OR REMOVE
# Requested by sooyeon.kim@samsung.com
if [ -e "/etc/skel/share/.voice" ]
/usr/bin/cat = cap_sys_ptrace+ei
/usr/bin/krate-mount = cap_sys_admin+ei
/usr/bin/inm-manager = cap_net_admin,cap_net_raw+ei
-/usr/bin/session-bind = cap_sys_admin+ei
\ No newline at end of file
+/usr/bin/session-bind = cap_sys_admin+ei
+/usr/bin/kmod = cap_sys_module+ei
+/usr/bin/hciconfig = cap_net_admin+ei
bluetooth-force-hci-logger.service;network_fw;network_fw;System;
bluetooth-frwk.service;network_fw;network_fw;System;
bluetooth-frwk-core.service;network_fw;network_fw;System;
+bluetooth-hci-down.service;network_fw;network_fw:System
bluetooth-hci-dump@.service;network_fw;network_fw;System;
bluetooth-hci-logger.service;network_fw;network_fw;System;
bluetooth-hci-logger-stop.service;network_fw;network_fw;System;
+bluetooth-hci-up.service;network_fw;network_fw:System
bluetooth-map-agent.service;network_fw;network_fw;System;
bluetooth-pbap-agent.service;network_fw;network_fw;System;
bluetooth-share.service;network_fw;network_fw;System;
bluetooth-share-start.service;network_fw;network_fw;System;
-bluetooth-stack-down.service;network_fw;network_fw;System;
+bluetooth-stack-down.service;root;root;System;
bluetooth-stack-down-with-radio.service;network_fw;network_fw;System;
+bluetooth-stack-up.service;network_fw;network_fw;System;
bluez-start.service;network_fw;network_fw;System;
boot-animation.service;application;application;System;
browser-provider.service;web_fw;web_fw;System;
bluetooth-force-hci-logger.service;network_fw;network_fw;System;
bluetooth-frwk.service;network_fw;network_fw;System;
bluetooth-frwk-core.service;network_fw;network_fw;System;
+bluetooth-hci-down.service;network_fw;network_fw:System
bluetooth-hci-dump@.service;network_fw;network_fw;System;
bluetooth-hci-logger.service;network_fw;network_fw;System;
bluetooth-hci-logger-stop.service;network_fw;network_fw;System;
+bluetooth-hci-up.service;network_fw;network_fw:System
bluetooth-share-start.service;network_fw;network_fw;System;
-bluetooth-stack-down.service;network_fw;network_fw;System;
+bluetooth-stack-down.service;root;root;System;
+bluetooth-stack-up.service;network_fw;network_fw;System;
bluez-start.service;network_fw;network_fw;System;
browser-provider.service;web_fw;web_fw;System;
buxton2.service;buxton;buxton;System;
bluetooth-force-hci-logger.service;network_fw;network_fw;System;
bluetooth-frwk.service;network_fw;network_fw;System;
bluetooth-frwk-core.service;network_fw;network_fw;System;
+bluetooth-hci-down.service;network_fw;network_fw:System
bluetooth-hci-dump@.service;network_fw;network_fw;System;
bluetooth-hci-logger.service;network_fw;network_fw;System;
bluetooth-hci-logger-stop.service;network_fw;network_fw;System;
+bluetooth-hci-up.service;network_fw;network_fw:System
bluetooth-share-start.service;network_fw;network_fw;System;
-bluetooth-stack-down.service;network_fw;network_fw;System;
+bluetooth-stack-down.service;root;root;System;
+bluetooth-stack-up.service;network_fw;network_fw;System;
bluez-start.service;network_fw;network_fw;System;
boot-animation.service;application;application;System;
buxton2.service;buxton;buxton;System;
bluetooth-frwk.service;network_fw;network_fw;System;
bluetooth-frwk-core.service;network_fw;network_fw;System;
bluetooth-hci-device.service;root;root;System;
+bluetooth-hci-down.service;network_fw;network_fw:System
bluetooth-hci-dump@.service;network_fw;network_fw;System;
bluetooth-hci-logger.service;network_fw;network_fw;System;
bluetooth-hci-logger-stop.service;network_fw;network_fw;System;
+bluetooth-hci-up.service;network_fw;network_fw:System
bluetooth-hciattach@.service;root;root;System;
bluetooth-map-agent.service;network_fw;network_fw;System;
bluetooth-pbap-agent.service;network_fw;network_fw;System;
bluetooth-share.service;network_fw;network_fw;System;
bluetooth-share-start.service;network_fw;network_fw;System;
-bluetooth-stack-down.service;network_fw;network_fw;System;
+bluetooth-stack-down.service;root;root;System;
bluetooth-stack-down-with-radio.service;network_fw;network_fw;System;
+bluetooth-stack-up.service;network_fw;network_fw;System;
bluez-start.service;network_fw;network_fw;System;
boot-animation.service;application;application;System;
browser-provider.service;web_fw;web_fw;System;
bluetooth-force-hci-logger.service;network_fw;network_fw;System;
bluetooth-frwk.service;network_fw;network_fw;System;
bluetooth-frwk-core.service;network_fw;network_fw;System;
+bluetooth-hci-down.service;network_fw;network_fw:System
bluetooth-hci-dump@.service;network_fw;network_fw;System;
bluetooth-hci-logger.service;network_fw;network_fw;System;
bluetooth-hci-logger-stop.service;network_fw;network_fw;System;
+bluetooth-hci-up.service;network_fw;network_fw:System
bluetooth-share-start.service;network_fw;network_fw;System;
-bluetooth-stack-down.service;network_fw;network_fw;System;
+bluetooth-stack-down.service;root;root;System;
+bluetooth-stack-up.service;network_fw;network_fw;System;
bluez-start.service;network_fw;network_fw;System;
browser-provider.service;web_fw;web_fw;System;
buxton2.service;buxton;buxton;System;
bluetooth-frwk.service;network_fw;network_fw;System;
bluetooth-frwk-core.service;network_fw;network_fw;System;
bluetooth-hci-device.service;root;root;System;
+bluetooth-hci-down.service;network_fw;network_fw:System
bluetooth-hci-dump@.service;network_fw;network_fw;System;
bluetooth-hci-logger.service;network_fw;network_fw;System;
bluetooth-hci-logger-stop.service;network_fw;network_fw;System;
+bluetooth-hci-up.service;network_fw;network_fw:System
bluetooth-hciattach@.service;root;root;System;
bluetooth-share-start.service;network_fw;network_fw;System;
-bluetooth-stack-down.service;network_fw;network_fw;System;
+bluetooth-stack-down.service;root;root;System;
+bluetooth-stack-up.service;network_fw;network_fw;System;
bluez-start.service;network_fw;network_fw;System;
boot-animation.service;application;application;System;
buxton2.service;buxton;buxton;System;