Remove the code for setting smack labeling 97/81097/1 accepted/tizen/common/20160809.184123 accepted/tizen/ivi/20160809.232800 accepted/tizen/mobile/20160809.232826 accepted/tizen/tv/20160809.232643 accepted/tizen/wearable/20160809.232855 submit/tizen/20160809.064342
authorDoHyun Pyun <dh79.pyun@samsung.com>
Fri, 22 Jul 2016 05:01:03 +0000 (14:01 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Fri, 22 Jul 2016 05:01:03 +0000 (14:01 +0900)
Change-Id: Ic9c08bdad83e17756fc8ace77da73ea7af8d555e
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
profiles/audio/transport.c
profiles/health/hdp.c
src/profile.c

index 9c18edd..4121e52 100644 (file)
 
 #include <glib.h>
 
-#ifdef __TIZEN_PATCH__
-#include <sys/types.h>
-#include <sys/xattr.h>
-#include <linux/xattr.h>
-#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,
index 2637e32..fbead13 100644 (file)
 
 #include <glib.h>
 
-#ifdef __TIZEN_PATCH__
-#include <sys/types.h>
-#include <sys/xattr.h>
-#include <linux/xattr.h>
-#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,
index 9810102..c12b57b 100644 (file)
 #include <glib.h>
 #include <dbus/dbus.h>
 
-#ifdef __TIZEN_PATCH__
-#include <sys/types.h>
-#include <sys/xattr.h>
-#include <linux/xattr.h>
-#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);