From 0423a388529fdbc892236b38535960d5f0ddcb2e Mon Sep 17 00:00:00 2001 From: DoHyun Pyun Date: Fri, 22 Jul 2016 14:01:03 +0900 Subject: [PATCH] Remove the code for setting smack labeling Change-Id: Ic9c08bdad83e17756fc8ace77da73ea7af8d555e Signed-off-by: DoHyun Pyun --- profiles/audio/transport.c | 23 ----------------------- profiles/health/hdp.c | 43 ------------------------------------------- src/profile.c | 23 ----------------------- 3 files changed, 89 deletions(-) diff --git a/profiles/audio/transport.c b/profiles/audio/transport.c index 9c18edd..4121e52 100644 --- a/profiles/audio/transport.c +++ b/profiles/audio/transport.c @@ -30,12 +30,6 @@ #include -#ifdef __TIZEN_PATCH__ -#include -#include -#include -#endif - #include "lib/bluetooth.h" #include "lib/sdp.h" #include "lib/uuid.h" @@ -316,23 +310,6 @@ static void a2dp_resume_complete(struct avdtp *session, media_transport_set_fd(transport, fd, imtu, omtu); -#ifdef __TIZEN_PATCH__ - { - DBG("Set smack label!"); - int ret; - - ret = fsetxattr(fd, XATTR_NAME_SMACKIPIN, "System", sizeof("System"), 0); - if (ret != 0) { - DBG("Set attr error: %d", ret); - } - - ret = fsetxattr(fd, XATTR_NAME_SMACKIPOUT, "System", sizeof("System"), 0); - if (ret != 0) { - DBG("Set attr error: %d", ret); - } - } -#endif - ret = g_dbus_send_reply(btd_get_dbus_connection(), req->msg, DBUS_TYPE_UNIX_FD, &fd, DBUS_TYPE_UINT16, &imtu, diff --git a/profiles/health/hdp.c b/profiles/health/hdp.c index 2637e32..fbead13 100644 --- a/profiles/health/hdp.c +++ b/profiles/health/hdp.c @@ -31,12 +31,6 @@ #include -#ifdef __TIZEN_PATCH__ -#include -#include -#include -#endif - #include "lib/bluetooth.h" #include "lib/l2cap.h" #include "lib/sdp.h" @@ -519,23 +513,6 @@ static void hdp_mdl_reconn_cb(struct mcap_mdl *mdl, GError *err, gpointer data) return; } -#ifdef __TIZEN_PATCH__ - { - DBG("Set smack label!"); - int ret; - - ret = fsetxattr(fd, XATTR_NAME_SMACKIPIN, "System", sizeof("System"), 0); - if (ret != 0) { - DBG("Set attr error: %d", ret); - } - - ret = fsetxattr(fd, XATTR_NAME_SMACKIPOUT, "System", sizeof("System"), 0); - if (ret != 0) { - DBG("Set attr error: %d", ret); - } - } -#endif - reply = g_dbus_create_reply(dc_data->msg, DBUS_TYPE_UNIX_FD, &fd, DBUS_TYPE_INVALID); g_dbus_send_message(conn, reply); @@ -627,29 +604,9 @@ static DBusMessage *channel_acquire_continue(struct hdp_tmp_dc_data *data, fd = mcap_mdl_get_fd(data->hdp_chann->mdl); -#ifndef __TIZEN_PATCH__ if (fd >= 0) return g_dbus_create_reply(data->msg, DBUS_TYPE_UNIX_FD, &fd, DBUS_TYPE_INVALID); -#else - if (fd >= 0) { - int ret; - - DBG("Set smack label!"); - ret = fsetxattr(fd, XATTR_NAME_SMACKIPIN, "System", sizeof("System"), 0); - if (ret != 0) { - DBG("Set attr error: %d", ret); - } - - ret = fsetxattr(fd, XATTR_NAME_SMACKIPOUT, "System", sizeof("System"), 0); - if (ret != 0) { - DBG("Set attr error: %d", ret); - } - - return g_dbus_create_reply(data->msg, DBUS_TYPE_UNIX_FD, &fd, - DBUS_TYPE_INVALID); - } -#endif hdp_tmp_dc_data_ref(data); if (mcap_reconnect_mdl(data->hdp_chann->mdl, device_reconnect_mdl_cb, diff --git a/src/profile.c b/src/profile.c index 9810102..c12b57b 100644 --- a/src/profile.c +++ b/src/profile.c @@ -33,12 +33,6 @@ #include #include -#ifdef __TIZEN_PATCH__ -#include -#include -#include -#endif - #include "lib/bluetooth.h" #include "lib/sdp.h" #include "lib/sdp_lib.h" @@ -1266,23 +1260,6 @@ static bool send_new_connection(struct ext_profile *ext, struct ext_io *conn) fd = g_io_channel_unix_get_fd(conn->io); -#ifdef __TIZEN_PATCH__ -{ - DBG("Set smack label!"); - int ret; - - ret = fsetxattr(fd, XATTR_NAME_SMACKIPIN, "System", sizeof("System"), 0); - if (ret != 0) { - DBG("Set attr error: %d", ret); - } - - ret = fsetxattr(fd, XATTR_NAME_SMACKIPOUT, "System", sizeof("System"), 0); - if (ret != 0) { - DBG("Set attr error: %d", ret); - } -} -#endif - dbus_message_iter_append_basic(&iter, DBUS_TYPE_UNIX_FD, &fd); dbus_message_iter_open_container(&iter, DBUS_TYPE_ARRAY, "{sv}", &dict); -- 2.7.4