Revert "Integration w/ DLP feature from privacy-guard" 82/156082/1 accepted/tizen/unified/20171017.204837 submit/tizen/20171017.061035
authortaesub kim <taesub.kim@samsung.com>
Tue, 17 Oct 2017 05:59:17 +0000 (05:59 +0000)
committertaesub kim <taesub.kim@samsung.com>
Tue, 17 Oct 2017 05:59:17 +0000 (05:59 +0000)
This reverts commit a6b689d7dfbfaab9138d32e148b08bf51b175703.

Change-Id: I7d32406cd7f4368e8ee60e3ad8b068c3d2d86c84

Makefile.am
configure.ac
extensions/Makefile.am [deleted file]
extensions/configure.ac [deleted file]
extensions/tizen_dlp.c [deleted file]
lib/Makefile.inc
lib/easy.c
lib/extensions/curl_extensions.c [deleted file]
lib/extensions/curl_extensions.h [deleted file]
lib/sendf.c
packaging/curl.spec

index ae70695..33f900a 100644 (file)
@@ -152,9 +152,6 @@ CLEANFILES = $(VC6_LIBDSP) $(VC6_SRCDSP) $(VC7_LIBVCPROJ) $(VC7_SRCVCPROJ)  \
 bin_SCRIPTS = curl-config
 
 SUBDIRS = lib src include
-if USE_TIZEN_FEATURE_DLP
-SUBDIRS += extensions
-endif
 DIST_SUBDIRS = $(SUBDIRS) tests packages docs scripts
 
 pkgconfigdir = $(libdir)/pkgconfig
index ab6a629..417ba20 100644 (file)
@@ -3080,18 +3080,6 @@ dnl Let's hope this split URL remains working:
 dnl http://publibn.boulder.ibm.com/doc_link/en_US/a_doc_lib/aixprggd/ \
 dnl genprogc/thread_quick_ref.htm
 
-dnl **********************************************************************
-dnl Check for DLP
-dnl **********************************************************************
-
-AC_ARG_ENABLE([dlp],
-    AS_HELP_STRING([--enable-dlp], [Enable DLP usage]))
-
-AS_IF([test "x$enable_dlp" = "xyes"], [
-    CPPFLAGS+=" -DUSE_TIZEN_FEATURE_DLP"
-])
-
-AM_CONDITIONAL(USE_TIZEN_FEATURE_DLP, test "x$enable_dlp" = "xyes")
 
 
 dnl **********************************************************************
@@ -4008,7 +3996,6 @@ AC_CONFIG_FILES([Makefile \
            include/curl/Makefile \
            src/Makefile \
            lib/Makefile \
-           extensions/Makefile \
            scripts/Makefile \
            lib/libcurl.vers \
            tests/Makefile \
diff --git a/extensions/Makefile.am b/extensions/Makefile.am
deleted file mode 100644 (file)
index 5874678..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-lib_LTLIBRARIES = libcurl_extension_dlp.la
-
-libcurl_extension_dlp_la_SOURCES = tizen_dlp.c
-libcurl_extension_dlp_la_LDFLAGS = -lprivacy-guard-client
diff --git a/extensions/configure.ac b/extensions/configure.ac
deleted file mode 100644 (file)
index 63f03a0..0000000
+++ /dev/null
@@ -1 +0,0 @@
-LT_INIT
diff --git a/extensions/tizen_dlp.c b/extensions/tizen_dlp.c
deleted file mode 100644 (file)
index c88c604..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/**
- * @file       tizen_dlp.cpp
- * @brief      external API functions for DLP
- */
-
-#include <privacy_guard/privacy_guard_dlp.h>
-
-/**
- * @fn void tizen_dlp_init(void)
- * @brief Initialize the DLP creating the Load Rules and Logging threads
- * @callgraph
- */
-void tizen_dlp_init(void)
-{
-    privacy_guard_dlp_init();
-}
-
-/**
- * @fn void tizen_dlp_check_leak(const char *hostname, char * const mem, size_t len)
- * @brief Checks for information leak on a given request string
- *
- * @param[in] hostname                                 The hostname of the server to which the request will be sent
- * @param[in] mem                                              Text that we are going to validate for info leak
- * @param[in] len                                              Size of len in bytes
- *
- * @return  either PRIV_GUARD_DLP_RESULT_ALLOW or PRIV_GUARD_DLP_RESULT_DENY
- * @callgraph
- */
-void tizen_dlp_check_leak(const char *hostname, char * const mem, size_t len)
-{
-    /**
-    * Send data to Tizen DLP verification
-    */
-    privacy_guard_dlp_check_leak(hostname, mem, len);
-}
index c5230a1..19f5800 100644 (file)
@@ -37,11 +37,6 @@ LIB_VTLS_HFILES = vtls/openssl.h vtls/vtls.h vtls/gtls.h                \
   vtls/cyassl.h vtls/schannel.h vtls/darwinssl.h vtls/gskit.h           \
   vtls/mbedtls.h
 
-if USE_TIZEN_FEATURE_DLP
-LIB_EXTENSIONS_CFILES = extensions/curl_extensions.c
-LIB_EXTENSIONS_HFILES = extensions/curl_extensions.h
-endif
-
 LIB_CFILES = file.c timeval.c base64.c hostip.c progress.c formdata.c   \
   cookie.c http.c sendf.c ftp.c url.c dict.c if2ip.c speedcheck.c       \
   ldap.c version.c getenv.c escape.c mprintf.c telnet.c netrc.c         \
@@ -81,5 +76,5 @@ LIB_HFILES = arpa_telnet.h netrc.h file.h timeval.h hostip.h progress.h \
 
 LIB_RCFILES = libcurl.rc
 
-CSOURCES = $(LIB_CFILES) $(LIB_VAUTH_CFILES) $(LIB_VTLS_CFILES) $(LIB_EXTENSIONS_CFILES)
-HHEADERS = $(LIB_HFILES) $(LIB_VAUTH_HFILES) $(LIB_VTLS_HFILES) $(LIB_EXTENSIONS_HFILES)
+CSOURCES = $(LIB_CFILES) $(LIB_VAUTH_CFILES) $(LIB_VTLS_CFILES)
+HHEADERS = $(LIB_HFILES) $(LIB_VAUTH_HFILES) $(LIB_VTLS_HFILES)
index 2895c8d..bed94a4 100644 (file)
@@ -76,9 +76,6 @@
 #include "curl_printf.h"
 #include "curl_memory.h"
 #include "memdebug.h"
-#ifdef USE_TIZEN_FEATURE_DLP
-#include "extensions/curl_extensions.h"
-#endif
 
 void Curl_version_init(void);
 
@@ -205,13 +202,6 @@ static CURLcode global_init(long flags, bool memoryfuncs)
   if(initialized++)
     return CURLE_OK;
 
-#ifdef USE_TIZEN_FEATURE_DLP
-  /**
-   * Initialize Tizen DLP
-   */
-  curl_extensions_tizen_dlp_init();
-#endif
-
   if(memoryfuncs) {
     /* Setup the default memory functions here (again) */
     Curl_cmalloc = (curl_malloc_callback)malloc;
diff --git a/lib/extensions/curl_extensions.c b/lib/extensions/curl_extensions.c
deleted file mode 100644 (file)
index 7bce27d..0000000
+++ /dev/null
@@ -1,75 +0,0 @@
-/***************************************************************************
- *                                  _   _ ____  _
- *  Project                     ___| | | |  _ \| |
- *                             / __| | | | |_) | |
- *                            | (__| |_| |  _ <| |___
- *                             \___|\___/|_| \_\_____|
- *
- * Copyright (C) 2014 - 2016, Steve Holme, <steve_holme@hotmail.com>.
- *
- * This software is licensed as described in the file COPYING, which
- * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
- *
- * You may opt to use, copy, modify, merge, publish, distribute and/or sell
- * copies of the Software, and permit persons to whom the Software is
- * furnished to do so, under the terms of the COPYING file.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ***************************************************************************/
-
-/**
- * @file    curl_extensions.cpp
- * @brief   external API functions for DLP
- */
-
-#ifdef USE_TIZEN_FEATURE_DLP
-#include <dlfcn.h>
-#include <extensions/curl_extensions.h>
-
-#define LIBRARY_PATH "/usr/lib/libcurl_extension_dlp.so.0"
-
-static int first_run = 1;
-static void (*tizen_dlp_init)(void) = NULL;
-static void (*tizen_dlp_check_leak)(const char *, char * const, size_t) = NULL;
-
-/**
- * @fn void curl_extensions_init(void)
- * @brief Load the extension shared library looking for the function call
- * symbols it going to use
- * @callgraph
- */
-static void curl_extensions_init(void)
-{
-    if (first_run) {
-        void *handle = dlopen(LIBRARY_PATH, RTLD_LAZY);
-        if (handle) {
-            tizen_dlp_init = dlsym(handle, "tizen_dlp_init");
-            tizen_dlp_check_leak = dlsym(handle, "tizen_dlp_check_leak");
-        }
-        first_run = 0;
-    }
-}
-
-/**
- *   @callgraph
- */
-void curl_extensions_tizen_dlp_init(void)
-{
-    curl_extensions_init();
-
-    if (tizen_dlp_init)
-        tizen_dlp_init();
-}
-
-/**
- *   @callgraph
- */
-void curl_extensions_tizen_dlp_check_leak(const char *hostname, char * const mem, size_t len)
-{
-    if(tizen_dlp_check_leak)
-        tizen_dlp_check_leak(hostname, mem, len);
-}
-#endif /* USE_TIZEN_FEATURE_DLP */
diff --git a/lib/extensions/curl_extensions.h b/lib/extensions/curl_extensions.h
deleted file mode 100644 (file)
index 9b2aeb1..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-/***************************************************************************
- *                                  _   _ ____  _
- *  Project                     ___| | | |  _ \| |
- *                             / __| | | | |_) | |
- *                            | (__| |_| |  _ <| |___
- *                             \___|\___/|_| \_\_____|
- *
- * Copyright (C) 2014 - 2016, Steve Holme, <steve_holme@hotmail.com>.
- *
- * This software is licensed as described in the file COPYING, which
- * you should have received as part of this distribution. The terms
- * are also available at https://curl.haxx.se/docs/copyright.html.
- *
- * You may opt to use, copy, modify, merge, publish, distribute and/or sell
- * copies of the Software, and permit persons to whom the Software is
- * furnished to do so, under the terms of the COPYING file.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ***************************************************************************/
-
-/**
- * @file       curl_extensions.h
- * @brief      API for privacy-guard-dlp
- */
-
-#ifdef USE_TIZEN_FEATURE_DLP
-#ifndef HEADER_CURL_EXTENSIONS_H
-#define HEADER_CURL_EXTENSIONS_H
-
-#include <stddef.h>
-
-/**
- * @fn void curl_extensions_tizen_dlp_init(void)
- * @brief Initialize the DLP creating the Load Rules and Logging threads
- * @callgraph
- */
-void curl_extensions_tizen_dlp_init(void);
-
-/**
- * @fn void curl_extensions_tizen_dlp_check_leak(const char *hostname, char * const mem, size_t len)
- * @brief Checks for information leak on a given request string
- *
- * @param[in] hostname                                 The hostname of the server to which the request will be sent
- * @param[in] mem                                              Text that we are going to validate for info leak
- * @param[in] len                                              Size of len in bytes
- *
- * @return  either PRIV_GUARD_DLP_RESULT_ALLOW or PRIV_GUARD_DLP_RESULT_DENY
- * @callgraph
- */
-void curl_extensions_tizen_dlp_check_leak(const char *hostname, char * const mem, size_t len);
-
-#endif /* HEADER_CURL_EXTENSIONS_H */
-#endif /* USE_TIZEN_FEATURE_DLP */
index 2704c7f..7601697 100644 (file)
@@ -24,9 +24,6 @@
 
 #include <curl/curl.h>
 
-#ifdef USE_TIZEN_FEATURE_DLP
-#include "extensions/curl_extensions.h"
-#endif
 #include "urldata.h"
 #include "sendf.h"
 #include "connect.h"
@@ -328,14 +325,6 @@ CURLcode Curl_write(struct connectdata *conn,
   CURLcode result = CURLE_OK;
   int num = (sockfd == conn->sock[SECONDARYSOCKET]);
 
-#ifdef USE_TIZEN_FEATURE_DLP
-  /**
-   * Send data to Tizen DLP verification
-   */
-  curl_extensions_tizen_dlp_check_leak(conn->host.dispname, (char *const)mem,
-                                       len);
-#endif
-
   bytes_written = conn->send[num](conn, num, mem, len, &result);
 
   *written = bytes_written;
index 3fa2a1f..8a23d3a 100644 (file)
@@ -14,7 +14,6 @@ BuildRequires:  pkgconfig(openssl)
 BuildRequires:  pkgconfig(zlib)
 BuildRequires:  pkgconfig(libcares)
 BuildRequires: pkgconfig(libnghttp2)
-BuildRequires: pkgconfig(privacy-guard-client)
 
 Provides:   webclient
 
@@ -52,15 +51,6 @@ Obsoletes:   curl-devel < %{version}-%{release}
 libcurl is the core engine of curl; this packages contains all the libs,
 headers, and manual pages to develop applications using libcurl.
 
-%package -n libcurl-extension-dlp
-Summary:       Extensions for Tizen OS
-Provides:      libcurl-extension-dlp = %{version}-%{release}
-Requires(post): /sbin/ldconfig
-Requires(postun): /sbin/ldconfig
-
-%description -n libcurl-extension-dlp
-libcurl extensions for Tinen OS.
-
 %prep
 %setup -q
 cp %{SOURCE1001} .
@@ -86,7 +76,6 @@ CFLAGS+=" -DTIZEN_TV_EXT"
 --disable-static \
 --with-nghttp2 \
 --without-zsh-functions-dir \
---enable-dlp \
 
 #--with-ca-bundle=%{_sysconfdir}/pki/tls/certs/ca-bundle.crt 
 
@@ -106,7 +95,7 @@ rm -rf $RPM_BUILD_ROOT
 
 make DESTDIR=$RPM_BUILD_ROOT INSTALL="%{__install} -p" install
 
-rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl{,_extension_dlp}.la
+rm -f ${RPM_BUILD_ROOT}%{_libdir}/libcurl.la
 install -d $RPM_BUILD_ROOT/%{_datadir}/aclocal
 install -m 644 docs/libcurl/libcurl.m4 $RPM_BUILD_ROOT/%{_datadir}/aclocal
 
@@ -135,7 +124,3 @@ rm -rf ${RPM_BUILD_ROOT}/usr/share/man
 %{_libdir}/pkgconfig/*.pc
 %{_datadir}/aclocal/libcurl.m4
 
-%files -n libcurl-extension-dlp
-%manifest %{name}.manifest
-%{_libdir}/libcurl_extension_dlp.so.*
-%license COPYING