Revert "Validate smack label of forked/executed WebProcess and PluginProcess"
authorSanghyup Lee <sh53.lee@samsung.com>
Wed, 25 Sep 2013 07:39:22 +0000 (16:39 +0900)
committerSanghyup Lee <sh53.lee@samsung.com>
Wed, 25 Sep 2013 07:40:03 +0000 (16:40 +0900)
This reverts commit abf2d2377d11e20f77d2a88d9102f763bbd440c5.

Change-Id: I97184ff7c8b3914263bbb015c4f315d9e1ee7f90

20 files changed:
Source/WTF/wtf/Platform.h
Source/WebKit2/PlatformTizen.cmake
Source/WebKit2/PluginProcess/efl/PluginProcessMainEfl.cpp
Source/WebKit2/Shared/Plugins/PluginModuleInfo.h
Source/WebKit2/Shared/tizen/ProcessSmackLabel.cpp [deleted file]
Source/WebKit2/Shared/tizen/ProcessSmackLabel.h [deleted file]
Source/WebKit2/UIProcess/API/efl/ewk_context.cpp
Source/WebKit2/UIProcess/Launcher/ProcessLauncher.h
Source/WebKit2/UIProcess/Launcher/efl/ProcessLauncherEfl.cpp
Source/WebKit2/UIProcess/Plugins/PluginInfoStore.h
Source/WebKit2/UIProcess/Plugins/PluginProcessManager.cpp
Source/WebKit2/UIProcess/Plugins/PluginProcessProxy.cpp
Source/WebKit2/UIProcess/WebContext.cpp
Source/WebKit2/UIProcess/WebContext.h
Source/WebKit2/UIProcess/WebProcessProxy.cpp
Source/WebKit2/UIProcess/efl/WebContextEfl.cpp
Source/WebKit2/WebProcess/efl/WebProcessMainEfl.cpp
Source/cmake/FindLIBSMACK.cmake [deleted file]
Source/cmake/OptionsTizen.cmake
packaging/webkit2-efl.spec

index fd38b45..d2759e0 100644 (file)
@@ -789,7 +789,8 @@ com) : Patch to do not adjust cover rect as fixed pixel size*/
 #define ENABLE_TIZEN_UPDATE_TIMEZONE_INFO 1 /* Hojong Han(hojong.han@samsung.com) : Sync timezone before getting local time */
 
 #define ENABLE_TIZEN_WRT_LAUNCHING_PERFORMANCE 1 /* Byungwoo Lee(bw80.lee@samsung.com) : Local patches to enhance web app launching performance */
-#define ENABLE_TIZEN_PROCESS_PERMISSION_CONTROL 1 /* Yunchan Cho(yunchan.cho@samsung.com), Ryuan Choi(ryuan.choi@samsung.com) : Change smack label of launched webkit processes */
+#define ENABLE_TIZEN_SET_WEB_PROCESS_EXECUTABLE_PATH 1 /* Yunchan Cho(yunchan.cho@samsung.com) : Support to set path of web process executable file */
+
 #define ENABLE_TIZEN_REDUCE_KEY_LAGGING 1    /* Soon-Young Lee(sy5002.lee@samsung.com) : Temporary solution for a keylagging problem. FIXME */
 #define ENABLE_TIZEN_TEXT_CODEC_MEMORY_REDUCTION 1 /*KyungTae Kim(ktf.kim@samsung.com) : Share Encode & Decode buffer for TextCodecUTF8 for memory reduction */
 #define ENABLE_TIZEN_ADJUST_CONTENTS_SIZE_FOR_MINUS_X_WORKAROUND 1 /*KyungTae Kim(ktf.kim@samsung.com) : Workaround patch that adjusts contents size of minus x position contents */
index 562f2ec..5663545 100755 (executable)
@@ -33,7 +33,6 @@ LIST(APPEND WebKit2StaticForDebug_INCLUDE_DIRECTORIES
     ${Tizen-Location-Manager_INCLUDE_DIRS}
     ${UIGadget_INCLUDE_DIRS}
     ${EFL_ASSIST_INCLUDE_DIRS}
-    ${LIBSMACK_INCLUDE_DIRS}
 )
 
 LIST(APPEND WebKit2_LIBRARIES
@@ -43,7 +42,6 @@ LIST(APPEND WebKit2_LIBRARIES
     ${TTS_LIBRARIES}
     ${Tizen-Location-Manager_LIBRARIES}
     ${UIGadget_LIBRARY}
-    ${LIBSMACK_LIBRARIES}
 )
 
 ADD_DEFINITIONS(-DWTF_USE_CROSS_PLATFORM_CONTEXT_MENUS=0)
@@ -67,7 +65,6 @@ LIST(APPEND WebKit2StaticForDebug_SOURCES
     Shared/tizen/NativeWebKeyboardEventTizen.cpp
     Shared/tizen/WebURLRequestTizen.cpp
     Shared/tizen/WebURLResponseTizen.cpp
-    Shared/tizen/ProcessSmackLabel.cpp
 
     UIProcess/API/C/efl/tizen/WKLocalFileSystemManager.cpp
     UIProcess/API/C/efl/tizen/WKContextTizen.cpp
index 225b6f0..888fbc9 100755 (executable)
 #include "NetscapePlugin.h"
 #endif // ENABLE(TIZEN_SCAN_PLUGIN)
 
-#if ENABLE(TIZEN_PROCESS_PERMISSION_CONTROL)
-#include "ProcessSmackLabel.h"
-#endif
-
 using namespace WebCore;
 
 namespace WebKit {
@@ -77,19 +73,6 @@ WK_EXPORT int PluginProcessMainEfl(int argc, char* argv[])
     ASSERT(argc == 2);
 #endif // ENABLE(TIZEN_SCAN_PLUGIN)
 
-#if ENABLE(TIZEN_PROCESS_PERMISSION_CONTROL)
-    // check process smack label
-    if (!changeProcessSmackLabel("/usr/bin/PluginProcess", argv[0])) {
-        TIZEN_LOGI("failed to change smack label");
-        return 1;
-    }
-
-    // drop CAP_MAC_ADMIN capability
-    if (!dropProcessCapability()) {
-        TIZEN_LOGI("failed to drop CAP_MAC_ADMIN");
-        return 1;
-    }
-#endif
     if (!eina_init())
         return 1;
 
index 8f54346..a232db3 100644 (file)
@@ -45,9 +45,6 @@ struct PluginModuleInfo {
 #elif PLATFORM(WIN)
     uint64_t fileVersion;
 #endif
-#if ENABLE(TIZEN_PROCESS_PERMISSION_CONTROL)
-    String executablePath;
-#endif
 
     PluginModuleInfo isolatedCopy() const
     {
diff --git a/Source/WebKit2/Shared/tizen/ProcessSmackLabel.cpp b/Source/WebKit2/Shared/tizen/ProcessSmackLabel.cpp
deleted file mode 100644 (file)
index 2395a2a..0000000
+++ /dev/null
@@ -1,103 +0,0 @@
-/*
- * Copyright (C) 2013 Samsung Electronics. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#if ENABLE(TIZEN_PROCESS_PERMISSION_CONTROL)
-
-#include <string>
-#include <unistd.h>
-#include <stdlib.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/smack.h>
-#include <sys/capability.h>
-#include <wtf/Assertions.h>
-
-namespace WebKit {
-
-bool changeProcessSmackLabel(const char* defaultExecutablePath, const char* currentExecutablePath)
-{
-    ASSERT(defaultExecutablePath && currentExecutablePath);
-
-    // this case needs not to change smack label
-    if (!strcmp(defaultExecutablePath, currentExecutablePath))
-        return true;
-
-    // check if this process is launched as abnormal way
-    char* newLabel;
-    if (smack_lgetlabel(currentExecutablePath, &newLabel, SMACK_LABEL_EXEC) < 0)
-        return false;
-
-    if (smack_set_label_for_self(newLabel) < 0) {
-        free(newLabel);
-        return false;
-    }
-
-    free(newLabel);
-    return true;
-}
-
-bool dropProcessCapability()
-{
-    // in case of root user, any capabilities aren't dropped
-    if (getuid() == 0)
-        return true;
-
-    cap_user_header_t header;
-    cap_user_data_t data;
-
-    header = static_cast<cap_user_header_t>(malloc(sizeof(*header)));
-    data = static_cast<cap_user_data_t>(calloc(sizeof(*data), _LINUX_CAPABILITY_U32S_3));
-
-    // check if header and data is allocated normally
-    ASSERT(header && data);
-
-    header->pid = getpid();
-    header->version = _LINUX_CAPABILITY_VERSION_3;
-
-    // read already granted capabilities of this process
-    if (capget(header, data) < 0) {
-        free(header);
-        free(data);
-        return false;
-    }
-
-    // remove process capability for CAP_MAC_ADMIN
-    data[CAP_TO_INDEX(CAP_MAC_ADMIN)].inheritable &= ~CAP_TO_MASK(CAP_MAC_ADMIN);
-    data[CAP_TO_INDEX(CAP_MAC_ADMIN)].permitted &= ~CAP_TO_MASK(CAP_MAC_ADMIN);
-    data[CAP_TO_INDEX(CAP_MAC_ADMIN)].effective &= ~CAP_TO_MASK(CAP_MAC_ADMIN);
-
-    bool ret = true;
-    if (capset(header, data) < 0)
-        ret = false;
-
-    free(header);
-    free(data);
-
-    return ret;
-}
-
-} // namespace WebKit
-#endif
-
diff --git a/Source/WebKit2/Shared/tizen/ProcessSmackLabel.h b/Source/WebKit2/Shared/tizen/ProcessSmackLabel.h
deleted file mode 100644 (file)
index e98868d..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (C) 2013 Samsung Electronics. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef ProcessSmackLabel_h
-#define ProcessSmackLabel_h
-
-#if ENABLE(TIZEN_PROCESS_PERMISSION_CONTROL)
-namespace WebKit {
-
-bool changeProcessSmackLabel(const char* defaultExecutablePath, const char* currentExecutablePath);
-bool dropProcessCapability();
-
-} // namespace WebKit
-#endif
-
-#endif
-
index 77f40d5..b2deb61 100755 (executable)
@@ -568,18 +568,12 @@ Ewk_Context* ewk_context_new()
 #if OS(TIZEN)
     Ewk_Context* ewkContext = Ewk_Context::create().leakRef();
     ewkContextInjectedBundleClientAttachClient(ewkContext);
-#if ENABLE(TIZEN_PROCESS_PERMISSION_CONTROL)
+#if ENABLE(TIZEN_SET_WEB_PROCESS_EXECUTABLE_PATH)
     const char* webProcessExecutablePath = getenv("WEB_PROCESS_EXECUTABLE_PATH");
     if (webProcessExecutablePath) {
         WKContextRef contextRef = ewkContext->wkContext();
         toImpl(contextRef)->setWebProcessExecutablePath(String::fromUTF8(webProcessExecutablePath));
     }
-
-    const char* pluginProcessExecutablePath = getenv("PLUGIN_PROCESS_EXECUTABLE_PATH");
-    if (pluginProcessExecutablePath) {
-        WKContextRef contextRef = ewkContext->wkContext();
-        toImpl(contextRef)->pluginInfoStore().setExecutablePath(String::fromUTF8(pluginProcessExecutablePath));
-    }
 #endif
     return ewkContext;
 #else
@@ -633,18 +627,12 @@ Ewk_Context* ewk_context_new_with_injected_bundle_path(const char* path)
 #if OS(TIZEN)
     Ewk_Context* ewkContext = Ewk_Context::create(String::fromUTF8(path)).leakRef();
     ewkContextInjectedBundleClientAttachClient(ewkContext);
-#if ENABLE(TIZEN_PROCESS_PERMISSION_CONTROL)
+#if ENABLE(TIZEN_SET_WEB_PROCESS_EXECUTABLE_PATH)
     const char* webProcessExecutablePath = getenv("WEB_PROCESS_EXECUTABLE_PATH");
     if (webProcessExecutablePath) {
         WKContextRef contextRef = ewkContext->wkContext();
         toImpl(contextRef)->setWebProcessExecutablePath(String::fromUTF8(webProcessExecutablePath));
     }
-
-    const char* pluginProcessExecutablePath = getenv("PLUGIN_PROCESS_EXECUTABLE_PATH");
-    if (pluginProcessExecutablePath) {
-        WKContextRef contextRef = ewkContext->wkContext();
-        toImpl(contextRef)->pluginInfoStore().setExecutablePath(String::fromUTF8(pluginProcessExecutablePath));
-    }
 #endif
     return ewkContext;
 #else
index 6bc5166..7f09523 100644 (file)
@@ -58,8 +58,8 @@ public:
         cpu_type_t architecture;
         bool executableHeap;
 #endif
-#if ENABLE(TIZEN_PROCESS_PERMISSION_CONTROL)
-        String customExecutablePath;
+#if ENABLE(TIZEN_SET_WEB_PROCESS_EXECUTABLE_PATH)
+        String webProcessExecutablePath;
 #endif
 #ifndef NDEBUG
         String processCmdPrefix;
index 390ee65..e4e4cb3 100644 (file)
@@ -195,32 +195,16 @@ void ProcessLauncher::launchProcess()
         String executablePath;
         switch (m_launchOptions.processType) {
         case WebProcess:
-#if ENABLE(TIZEN_PROCESS_PERMISSION_CONTROL)
-            if (!m_launchOptions.customExecutablePath.isEmpty()) {
-                executablePath = m_launchOptions.customExecutablePath;
-                TIZEN_LOGI("web process executable path: %s", executablePath.utf8().data());
+#if ENABLE(TIZEN_SET_WEB_PROCESS_EXECUTABLE_PATH)
+            if (!m_launchOptions.webProcessExecutablePath.isEmpty()) {
+                executablePath = m_launchOptions.webProcessExecutablePath;
+                TIZEN_LOGI("executable path: %s", executablePath.utf8().data());
             } else
 #endif
                 executablePath = executablePathOfWebProcess();
             break;
         case PluginProcess:
-#if ENABLE(TIZEN_PROCESS_PERMISSION_CONTROL)
-            {
-                // this env is used for tizen wrt process pool, and has highest priority for use.
-                const char* pathForProcessPool = getenv("PLUGIN_PROCESS_EXECUTABLE_PATH_FOR_PROCESS_POOL");
-                if (pathForProcessPool) {
-                    executablePath = String::fromUTF8(pathForProcessPool);
-                    TIZEN_LOGI("plugin process executable path: %s", executablePath.utf8().data());
-                    break;
-                }
-            }
-
-            if (!m_launchOptions.customExecutablePath.isEmpty()) {
-                executablePath = m_launchOptions.customExecutablePath;
-                TIZEN_LOGI("plugin process executable path: %s", executablePath.utf8().data());
-            } else
-#endif
-                executablePath = executablePathOfPluginProcess();
+            executablePath = executablePathOfPluginProcess();
             break;
         default:
             ASSERT_NOT_REACHED();
index 4848a24..42df69b 100644 (file)
@@ -58,11 +58,6 @@ public:
     // Note that the plug-in will still be seen by e.g. navigator.plugins
     bool shouldBlockPlugin(const PluginModuleInfo&) const;
 
-#if ENABLE(TIZEN_PROCESS_PERMISSION_CONTROL)
-    void setExecutablePath(const String& path) { m_executablePath = path; };
-    const String& executablePath() const { return m_executablePath; };
-#endif
-
 private:
     PluginModuleInfo findPluginForMIMEType(const String& mimeType) const;
     PluginModuleInfo findPluginForExtension(const String& extension, String& mimeType) const;
@@ -93,9 +88,7 @@ private:
     Vector<String> m_additionalPluginsDirectories;
     Vector<PluginModuleInfo> m_plugins;
     bool m_pluginListIsUpToDate;
-#if ENABLE(TIZEN_PROCESS_PERMISSION_CONTROL)
-    String m_executablePath;
-#endif
+
     mutable Mutex m_pluginsLock;
 };
     
index f87d360..cebf4f7 100644 (file)
@@ -50,9 +50,6 @@ void PluginProcessManager::getPluginProcessConnection(const PluginInfoStore& plu
     ASSERT(!pluginPath.isNull());
 
     PluginModuleInfo plugin = pluginInfoStore.infoForPluginWithPath(pluginPath);
-#if ENABLE(TIZEN_PROCESS_PERMISSION_CONTROL)
-    plugin.executablePath = pluginInfoStore.executablePath();
-#endif
     PluginProcessProxy* pluginProcess = getOrCreatePluginProcess(plugin);
     pluginProcess->getPluginProcessConnection(reply);
 }
index f41fe75..df8f96d 100644 (file)
@@ -69,10 +69,6 @@ PluginProcessProxy::PluginProcessProxy(PluginProcessManager* PluginProcessManage
     launchOptions.executableHeap = PluginProcessProxy::pluginNeedsExecutableHeap(pluginInfo);
 #endif
 
-#if ENABLE(TIZEN_PROCESS_PERMISSION_CONTROL)
-    launchOptions.customExecutablePath = pluginInfo.executablePath;
-#endif
-
     m_processLauncher = ProcessLauncher::create(this, launchOptions);
 }
 
index 40135e0..140eb55 100644 (file)
@@ -178,8 +178,8 @@ WebContext::WebContext(ProcessModel processModel, const String& injectedBundlePa
 #endif
     , m_processTerminationEnabled(true)
     , m_pluginWorkQueue("com.apple.CoreIPC.PluginQueue")
-#if ENABLE(TIZEN_PROCESS_PERMISSION_CONTROL)
-    , m_webProcessExecutablePath()
+#if ENABLE(TIZEN_SET_WEB_PROCESS_EXECUTABLE_PATH)
+    , m_webProcessExecutablePath(String())
 #endif
 {
 #if !LOG_DISABLED
index 07035bf..f98dd8d 100755 (executable)
@@ -182,12 +182,10 @@ public:
 #if PLATFORM(EFL)
     void notifyLowMemory();
 #endif
-
-#if ENABLE(TIZEN_PROCESS_PERMISSION_CONTROL)
-    void setWebProcessExecutablePath(const String& path) { m_webProcessExecutablePath = path; };
+#if ENABLE(TIZEN_SET_WEB_PROCESS_EXECUTABLE_PATH)
+    void setWebProcessExecutablePath(const String);
     const String& webProcessExecutablePath() const { return m_webProcessExecutablePath; };
 #endif
-
 #if ENABLE(TIZEN_WEBKIT2_MEMORY_SAVING_MODE)
     void setMemorySavingMode(bool memorySavingMode);
 #endif
@@ -458,7 +456,7 @@ private:
     String m_soupDataDirectory;
 #endif
 
-#if ENABLE(TIZEN_PROCESS_PERMISSION_CONTROL)
+#if ENABLE(TIZEN_SET_WEB_PROCESS_EXECUTABLE_PATH)
     String m_webProcessExecutablePath;
 #endif
 
index 2fd7453..147d2d4 100644 (file)
@@ -120,9 +120,8 @@ void WebProcessProxy::connect()
         launchOptions.architecture = ProcessLauncher::LaunchOptions::MatchCurrentArchitecture;
         launchOptions.executableHeap = false;
 #endif
-
-#if ENABLE(TIZEN_PROCESS_PERMISSION_CONTROL)
-        launchOptions.customExecutablePath = m_context->webProcessExecutablePath();
+#if ENABLE(TIZEN_SET_WEB_PROCESS_EXECUTABLE_PATH)
+        launchOptions.webProcessExecutablePath = m_context->webProcessExecutablePath();
 #endif
 
 #ifndef NDEBUG
index 4ec0929..6e26e74 100755 (executable)
@@ -125,6 +125,13 @@ void WebContext::setProxy(const String& proxyAddress)
 }
 #endif
 
+#if ENABLE(TIZEN_SET_WEB_PROCESS_EXECUTABLE_PATH)
+void WebContext::setWebProcessExecutablePath(const String webProcessExecutablePath)
+{
+    m_webProcessExecutablePath = webProcessExecutablePath;
+}
+#endif
+
 #if ENABLE(TIZEN_SESSION_REQUEST_CANCEL)
 void WebContext::abortSession()
 {
@@ -151,7 +158,6 @@ void WebContext::notifyLowMemory()
 #endif
 #endif
 }
-
 #if ENABLE(TIZEN_SOUP_COOKIE_CACHE_FOR_WEBKIT2)
 String WebContext::soupDataDirectory()
 {
index 8d60826..ae00f5d 100644 (file)
 #include "wtf/WTFThreadData.h"
 #endif
 
-#if ENABLE(TIZEN_PROCESS_PERMISSION_CONTROL)
-#include "ProcessSmackLabel.h"
-#endif
-
 using namespace WebCore;
 
 namespace WebKit {
@@ -75,19 +71,6 @@ WK_EXPORT int WebProcessMainEfl(int argc, char* argv[])
     if (argc != 2)
         return 1;
 
-#if ENABLE(TIZEN_PROCESS_PERMISSION_CONTROL)
-    // change process smack label
-    if (!changeProcessSmackLabel("/usr/bin/WebProcess", argv[0])) {
-        TIZEN_LOGI("failed to change smack label");
-        return 1;
-    }
-    // drop CAP_MAC_ADMIN capability
-    if (!dropProcessCapability()) {
-        TIZEN_LOGI("failed to drop CAP_MAC_ADMIN");
-        return 1;
-    }
-#endif
-
     if (!eina_init())
         return 1;
 
diff --git a/Source/cmake/FindLIBSMACK.cmake b/Source/cmake/FindLIBSMACK.cmake
deleted file mode 100644 (file)
index 27c1a7f..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-# - Try to find smack
-# Once done, this will define
-#
-#  LIBSMACK_FOUND - system has libsmack
-#  LIBSMACK_INCLUDE_DIRS - the libsmack include directories
-#  LIBSMACK_LIBRARIES - link these to use libsmack
-
-INCLUDE(FindPkgConfig)
-
-PKG_CHECK_MODULES(PC_LIBSMACK libsmack)
-
-FIND_PATH(LIBSMACK_INCLUDE_DIRS NAMES sys/smack.h
-    HINTS ${PC_LIBSMACK_INCLUDE_DIRS} ${PC_LIBSMACK_INCLUDEDIR}
-)
-
-FIND_LIBRARY(LIBSMACK_LIBRARIES NAMES smack
-    HINTS ${PC_LIBSMACK_LIBRARY_DIRS} ${PC_LIBSMACK_LIBDIR}
-)
-
-INCLUDE(FindPackageHandleStandardArgs)
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(LIBSMACK DEFAULT_MSG LIBSMACK_INCLUDE_DIRS LIBSMACK_LIBRARIES)
index 13ee401..c666c98 100644 (file)
@@ -232,7 +232,6 @@ FIND_PACKAGE(UIGadget REQUIRED)
 FIND_PACKAGE(VConf REQUIRED)
 FIND_PACKAGE(feedback REQUIRED)
 FIND_PACKAGE(EFL_ASSIST REQUIRED)
-FIND_PACKAGE(LIBSMACK REQUIRED)
 
 ADD_DEFINITIONS(-DENABLE_GESTURE_EVENTS=1)
 
index f8ce220..d11a133 100644 (file)
@@ -58,8 +58,6 @@ BuildRequires: pkgconfig(gles20)
 BuildRequires: pkgconfig(tts)
 BuildRequires: pkgconfig(capi-system-power)
 BuildRequires: pkgconfig(capi-system-info)
-BuildRequires: pkgconfig(libsmack)
-BuildRequires: libcap, libcap-devel
 
 
 %description
@@ -149,8 +147,10 @@ chmod 644 %{_libdir}/libewebkit2.so
 # 2. Resources
 chmod 644 /usr/share/edje/webkit.edj
 # 3. executables
-setfattr -n security.capability -v 0sAQAAAgAAAAAAAAAAAAAAAAIAAAA= %{_bindir}/WebProcess
-setfattr -n security.capability -v 0sAQAAAgAAAAAAAAAAAAAAAAIAAAA= %{_bindir}/PluginProcess
+if [ `grep -c smack /proc/filesystems` -eq 1 ]
+then
+    setcap cap_mac_admin=ie %{_bindir}/WebProcess
+fi
 
 %postun