new upstream release
- new upstream release - curl-config now provides dummy --static-libs option (#733956)
This commit is contained in:
parent
8b6f7828aa
commit
eaba136aa1
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,2 +1,3 @@
|
|||||||
/curl-7.21.6.tar.lzma
|
/curl-7.21.6.tar.lzma
|
||||||
/curl-7.21.7.tar.lzma
|
/curl-7.21.7.tar.lzma
|
||||||
|
/curl-7.22.0.tar.lzma
|
||||||
|
@ -1,453 +0,0 @@
|
|||||||
From fd86734fca0945b2d6b90d6d7d0224cf0732114a Mon Sep 17 00:00:00 2001
|
|
||||||
From: Kamil Dudka <kdudka@redhat.com>
|
|
||||||
Date: Wed, 3 Aug 2011 12:48:49 +0200
|
|
||||||
Subject: [PATCH 1/2] curl - rhbz #719939
|
|
||||||
|
|
||||||
---
|
|
||||||
docs/libcurl/curl_easy_setopt.3 | 8 ++++++
|
|
||||||
docs/libcurl/symbols-in-versions | 4 +++
|
|
||||||
include/curl/curl.h | 7 +++++
|
|
||||||
lib/Makefile.in | 18 +++++++++++---
|
|
||||||
lib/Makefile.inc | 4 +-
|
|
||||||
lib/curl_gssapi.c | 44 ++++++++++++++++++++++++++++++++++++
|
|
||||||
lib/curl_gssapi.h | 46 ++++++++++++++++++++++++++++++++++++++
|
|
||||||
lib/http_negotiate.c | 6 ++++-
|
|
||||||
lib/krb5.c | 6 ++++-
|
|
||||||
lib/socks_gssapi.c | 7 ++++-
|
|
||||||
lib/url.c | 6 +++++
|
|
||||||
lib/urldata.h | 3 ++
|
|
||||||
12 files changed, 149 insertions(+), 10 deletions(-)
|
|
||||||
create mode 100644 lib/curl_gssapi.c
|
|
||||||
create mode 100644 lib/curl_gssapi.h
|
|
||||||
|
|
||||||
diff --git a/docs/libcurl/curl_easy_setopt.3 b/docs/libcurl/curl_easy_setopt.3
|
|
||||||
index c2804f3..3b7826b 100644
|
|
||||||
--- a/docs/libcurl/curl_easy_setopt.3
|
|
||||||
+++ b/docs/libcurl/curl_easy_setopt.3
|
|
||||||
@@ -2105,6 +2105,14 @@ of these, 'private' will be used. Set the string to NULL to disable kerberos
|
|
||||||
support for FTP.
|
|
||||||
|
|
||||||
(This option was known as CURLOPT_KRB4LEVEL up to 7.16.3)
|
|
||||||
+.IP CURLOPT_GSSAPI_DELEGATION
|
|
||||||
+Set the parameter to CURLGSSAPI_DELEGATION_FLAG to allow unconditional GSSAPI
|
|
||||||
+credential delegation. The delegation is disabled by default since 7.21.7.
|
|
||||||
+Set the parameter to CURLGSSAPI_DELEGATION_POLICY_FLAG to delegate only if
|
|
||||||
+the OK-AS-DELEGATE flag is set in the service ticket in case this feature is
|
|
||||||
+supported by the GSSAPI implementation and the definition of
|
|
||||||
+GSS_C_DELEG_POLICY_FLAG was available at compile-time.
|
|
||||||
+(Added in 7.21.8)
|
|
||||||
.SH SSH OPTIONS
|
|
||||||
.IP CURLOPT_SSH_AUTH_TYPES
|
|
||||||
Pass a long set to a bitmask consisting of one or more of
|
|
||||||
diff --git a/docs/libcurl/symbols-in-versions b/docs/libcurl/symbols-in-versions
|
|
||||||
index 9257fb1..3c8f715 100644
|
|
||||||
--- a/docs/libcurl/symbols-in-versions
|
|
||||||
+++ b/docs/libcurl/symbols-in-versions
|
|
||||||
@@ -186,6 +186,9 @@ CURLFTPSSL_TRY 7.11.0 7.17.0
|
|
||||||
CURLFTP_CREATE_DIR 7.19.4
|
|
||||||
CURLFTP_CREATE_DIR_NONE 7.19.4
|
|
||||||
CURLFTP_CREATE_DIR_RETRY 7.19.4
|
|
||||||
+CURLGSSAPI_DELEGATION_FLAG 7.21.8
|
|
||||||
+CURLGSSAPI_DELEGATION_NONE 7.21.8
|
|
||||||
+CURLGSSAPI_DELEGATION_POLICY_FLAG 7.21.8
|
|
||||||
CURLINFO_APPCONNECT_TIME 7.19.0
|
|
||||||
CURLINFO_CERTINFO 7.19.1
|
|
||||||
CURLINFO_CONDITION_UNMET 7.19.4
|
|
||||||
@@ -344,6 +347,7 @@ CURLOPT_FTP_SSL_CCC 7.16.1
|
|
||||||
CURLOPT_FTP_USE_EPRT 7.10.5
|
|
||||||
CURLOPT_FTP_USE_EPSV 7.9.2
|
|
||||||
CURLOPT_FTP_USE_PRET 7.20.0
|
|
||||||
+CURLOPT_GSSAPI_DELEGATION 7.21.8
|
|
||||||
CURLOPT_HEADER 7.1
|
|
||||||
CURLOPT_HEADERDATA 7.10
|
|
||||||
CURLOPT_HEADERFUNCTION 7.7.2
|
|
||||||
diff --git a/include/curl/curl.h b/include/curl/curl.h
|
|
||||||
index a9d42fa..bcbab86 100644
|
|
||||||
--- a/include/curl/curl.h
|
|
||||||
+++ b/include/curl/curl.h
|
|
||||||
@@ -614,6 +614,10 @@ typedef enum {
|
|
||||||
#define CURLSSH_AUTH_KEYBOARD (1<<3) /* keyboard interactive */
|
|
||||||
#define CURLSSH_AUTH_DEFAULT CURLSSH_AUTH_ANY
|
|
||||||
|
|
||||||
+#define CURLGSSAPI_DELEGATION_NONE 0 /* no delegation (default) */
|
|
||||||
+#define CURLGSSAPI_DELEGATION_POLICY_FLAG (1<<0) /* if permitted by policy */
|
|
||||||
+#define CURLGSSAPI_DELEGATION_FLAG (1<<1) /* delegate always */
|
|
||||||
+
|
|
||||||
#define CURL_ERROR_SIZE 256
|
|
||||||
|
|
||||||
struct curl_khkey {
|
|
||||||
@@ -1483,6 +1487,9 @@ typedef enum {
|
|
||||||
CINIT(CLOSESOCKETFUNCTION, FUNCTIONPOINT, 208),
|
|
||||||
CINIT(CLOSESOCKETDATA, OBJECTPOINT, 209),
|
|
||||||
|
|
||||||
+ /* allow GSSAPI credential delegation */
|
|
||||||
+ CINIT(GSSAPI_DELEGATION, LONG, 210),
|
|
||||||
+
|
|
||||||
CURLOPT_LASTENTRY /* the last unused */
|
|
||||||
} CURLoption;
|
|
||||||
|
|
||||||
diff --git a/lib/Makefile.in b/lib/Makefile.in
|
|
||||||
index a99f5e9..d5c65e7 100644
|
|
||||||
--- a/lib/Makefile.in
|
|
||||||
+++ b/lib/Makefile.in
|
|
||||||
@@ -94,7 +94,7 @@ am__objects_1 = file.lo timeval.lo base64.lo hostip.lo progress.lo \
|
|
||||||
curl_threads.lo warnless.lo hmac.lo polarssl.lo curl_rtmp.lo \
|
|
||||||
openldap.lo curl_gethostname.lo gopher.lo axtls.lo \
|
|
||||||
idn_win32.lo http_negotiate_sspi.lo cyassl.lo http_proxy.lo \
|
|
||||||
- non-ascii.lo asyn-ares.lo asyn-thread.lo
|
|
||||||
+ non-ascii.lo asyn-ares.lo asyn-thread.lo curl_gssapi.lo
|
|
||||||
am__objects_2 =
|
|
||||||
am_libcurl_la_OBJECTS = $(am__objects_1) $(am__objects_2)
|
|
||||||
libcurl_la_OBJECTS = $(am_libcurl_la_OBJECTS)
|
|
||||||
@@ -144,7 +144,8 @@ am__objects_3 = libcurlu_la-file.lo libcurlu_la-timeval.lo \
|
|
||||||
libcurlu_la-axtls.lo libcurlu_la-idn_win32.lo \
|
|
||||||
libcurlu_la-http_negotiate_sspi.lo libcurlu_la-cyassl.lo \
|
|
||||||
libcurlu_la-http_proxy.lo libcurlu_la-non-ascii.lo \
|
|
||||||
- libcurlu_la-asyn-ares.lo libcurlu_la-asyn-thread.lo
|
|
||||||
+ libcurlu_la-asyn-ares.lo libcurlu_la-asyn-thread.lo \
|
|
||||||
+ libcurlu_la-curl_gssapi.lo
|
|
||||||
am_libcurlu_la_OBJECTS = $(am__objects_3) $(am__objects_2)
|
|
||||||
libcurlu_la_OBJECTS = $(am_libcurlu_la_OBJECTS)
|
|
||||||
@BUILD_UNITTESTS_TRUE@am_libcurlu_la_rpath =
|
|
||||||
@@ -479,7 +480,7 @@ CSOURCES = file.c timeval.c base64.c hostip.c progress.c formdata.c \
|
|
||||||
pingpong.c rtsp.c curl_threads.c warnless.c hmac.c polarssl.c \
|
|
||||||
curl_rtmp.c openldap.c curl_gethostname.c gopher.c axtls.c \
|
|
||||||
idn_win32.c http_negotiate_sspi.c cyassl.c http_proxy.c non-ascii.c \
|
|
||||||
- asyn-ares.c asyn-thread.c
|
|
||||||
+ asyn-ares.c asyn-thread.c curl_gssapi.c
|
|
||||||
|
|
||||||
HHEADERS = arpa_telnet.h netrc.h file.h timeval.h qssl.h hostip.h \
|
|
||||||
progress.h formdata.h cookie.h http.h sendf.h ftp.h url.h dict.h \
|
|
||||||
@@ -494,7 +495,7 @@ HHEADERS = arpa_telnet.h netrc.h file.h timeval.h qssl.h hostip.h \
|
|
||||||
curl_base64.h rawstr.h curl_addrinfo.h curl_sspi.h slist.h nonblock.h \
|
|
||||||
curl_memrchr.h imap.h pop3.h smtp.h pingpong.h rtsp.h curl_threads.h \
|
|
||||||
warnless.h curl_hmac.h polarssl.h curl_rtmp.h curl_gethostname.h \
|
|
||||||
- gopher.h axtls.h cyassl.h http_proxy.h non-ascii.h asyn.h
|
|
||||||
+ gopher.h axtls.h cyassl.h http_proxy.h non-ascii.h asyn.h curl_gssapi.h
|
|
||||||
|
|
||||||
|
|
||||||
# Makefile.inc provides the CSOURCES and HHEADERS defines
|
|
||||||
@@ -612,6 +613,7 @@ distclean-compile:
|
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl_addrinfo.Plo@am__quote@
|
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl_fnmatch.Plo@am__quote@
|
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl_gethostname.Plo@am__quote@
|
|
||||||
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl_gssapi.Plo@am__quote@
|
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl_memrchr.Plo@am__quote@
|
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl_rand.Plo@am__quote@
|
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/curl_rtmp.Plo@am__quote@
|
|
||||||
@@ -662,6 +664,7 @@ distclean-compile:
|
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-curl_addrinfo.Plo@am__quote@
|
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-curl_fnmatch.Plo@am__quote@
|
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-curl_gethostname.Plo@am__quote@
|
|
||||||
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-curl_gssapi.Plo@am__quote@
|
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-curl_memrchr.Plo@am__quote@
|
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-curl_rand.Plo@am__quote@
|
|
||||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libcurlu_la-curl_rtmp.Plo@am__quote@
|
|
||||||
@@ -1488,6 +1491,13 @@ libcurlu_la-asyn-thread.lo: asyn-thread.c
|
|
||||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
|
||||||
@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libcurlu_la-asyn-thread.lo `test -f 'asyn-thread.c' || echo '$(srcdir)/'`asyn-thread.c
|
|
||||||
|
|
||||||
+libcurlu_la-curl_gssapi.lo: curl_gssapi.c
|
|
||||||
+@am__fastdepCC_TRUE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libcurlu_la-curl_gssapi.lo -MD -MP -MF $(DEPDIR)/libcurlu_la-curl_gssapi.Tpo -c -o libcurlu_la-curl_gssapi.lo `test -f 'curl_gssapi.c' || echo '$(srcdir)/'`curl_gssapi.c
|
|
||||||
+@am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/libcurlu_la-curl_gssapi.Tpo $(DEPDIR)/libcurlu_la-curl_gssapi.Plo
|
|
||||||
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='curl_gssapi.c' object='libcurlu_la-curl_gssapi.lo' libtool=yes @AMDEPBACKSLASH@
|
|
||||||
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
|
||||||
+@am__fastdepCC_FALSE@ $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libcurlu_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libcurlu_la-curl_gssapi.lo `test -f 'curl_gssapi.c' || echo '$(srcdir)/'`curl_gssapi.c
|
|
||||||
+
|
|
||||||
mostlyclean-libtool:
|
|
||||||
-rm -f *.lo
|
|
||||||
|
|
||||||
diff --git a/lib/Makefile.inc b/lib/Makefile.inc
|
|
||||||
index 04285b5..51fc919 100644
|
|
||||||
--- a/lib/Makefile.inc
|
|
||||||
+++ b/lib/Makefile.inc
|
|
||||||
@@ -22,7 +22,7 @@ CSOURCES = file.c timeval.c base64.c hostip.c progress.c formdata.c \
|
|
||||||
pingpong.c rtsp.c curl_threads.c warnless.c hmac.c polarssl.c \
|
|
||||||
curl_rtmp.c openldap.c curl_gethostname.c gopher.c axtls.c \
|
|
||||||
idn_win32.c http_negotiate_sspi.c cyassl.c http_proxy.c non-ascii.c \
|
|
||||||
- asyn-ares.c asyn-thread.c
|
|
||||||
+ asyn-ares.c asyn-thread.c curl_gssapi.c
|
|
||||||
|
|
||||||
HHEADERS = arpa_telnet.h netrc.h file.h timeval.h qssl.h hostip.h \
|
|
||||||
progress.h formdata.h cookie.h http.h sendf.h ftp.h url.h dict.h \
|
|
||||||
@@ -37,4 +37,4 @@ HHEADERS = arpa_telnet.h netrc.h file.h timeval.h qssl.h hostip.h \
|
|
||||||
curl_base64.h rawstr.h curl_addrinfo.h curl_sspi.h slist.h nonblock.h \
|
|
||||||
curl_memrchr.h imap.h pop3.h smtp.h pingpong.h rtsp.h curl_threads.h \
|
|
||||||
warnless.h curl_hmac.h polarssl.h curl_rtmp.h curl_gethostname.h \
|
|
||||||
- gopher.h axtls.h cyassl.h http_proxy.h non-ascii.h asyn.h
|
|
||||||
+ gopher.h axtls.h cyassl.h http_proxy.h non-ascii.h asyn.h curl_gssapi.h
|
|
||||||
diff --git a/lib/curl_gssapi.c b/lib/curl_gssapi.c
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..e55c9cc
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/lib/curl_gssapi.c
|
|
||||||
@@ -0,0 +1,44 @@
|
|
||||||
+/***************************************************************************
|
|
||||||
+ * _ _ ____ _
|
|
||||||
+ * Project ___| | | | _ \| |
|
|
||||||
+ * / __| | | | |_) | |
|
|
||||||
+ * | (__| |_| | _ <| |___
|
|
||||||
+ * \___|\___/|_| \_\_____|
|
|
||||||
+ *
|
|
||||||
+ * Copyright (C) 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
|
||||||
+ *
|
|
||||||
+ * 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 http://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.
|
|
||||||
+ *
|
|
||||||
+ ***************************************************************************/
|
|
||||||
+
|
|
||||||
+#include "setup.h"
|
|
||||||
+
|
|
||||||
+#ifdef HAVE_GSSAPI
|
|
||||||
+
|
|
||||||
+#include "curl_gssapi.h"
|
|
||||||
+
|
|
||||||
+void Curl_gss_req_flags(OM_uint32 *req_flags, const struct SessionHandle *data)
|
|
||||||
+{
|
|
||||||
+ if(data->set.gssapi_delegation & CURLGSSAPI_DELEGATION_POLICY_FLAG) {
|
|
||||||
+#ifdef GSS_C_DELEG_POLICY_FLAG
|
|
||||||
+ *req_flags |= GSS_C_DELEG_POLICY_FLAG;
|
|
||||||
+#else
|
|
||||||
+ infof(data, "warning: support for CURLGSSAPI_DELEGATION_POLICY_FLAG not "
|
|
||||||
+ "compiled in\n");
|
|
||||||
+#endif
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ if(data->set.gssapi_delegation & CURLGSSAPI_DELEGATION_FLAG)
|
|
||||||
+ *req_flags |= GSS_C_DELEG_FLAG;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+#endif /* HAVE_GSSAPI */
|
|
||||||
diff --git a/lib/curl_gssapi.h b/lib/curl_gssapi.h
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..02aa527
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/lib/curl_gssapi.h
|
|
||||||
@@ -0,0 +1,46 @@
|
|
||||||
+#ifndef HEADER_CURL_GSSAPI_H
|
|
||||||
+#define HEADER_CURL_GSSAPI_H
|
|
||||||
+/***************************************************************************
|
|
||||||
+ * _ _ ____ _
|
|
||||||
+ * Project ___| | | | _ \| |
|
|
||||||
+ * / __| | | | |_) | |
|
|
||||||
+ * | (__| |_| | _ <| |___
|
|
||||||
+ * \___|\___/|_| \_\_____|
|
|
||||||
+ *
|
|
||||||
+ * Copyright (C) 2011, Daniel Stenberg, <daniel@haxx.se>, et al.
|
|
||||||
+ *
|
|
||||||
+ * 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 http://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.
|
|
||||||
+ *
|
|
||||||
+ ***************************************************************************/
|
|
||||||
+
|
|
||||||
+#include "setup.h"
|
|
||||||
+#include "urldata.h"
|
|
||||||
+
|
|
||||||
+#ifdef HAVE_GSSAPI
|
|
||||||
+
|
|
||||||
+#ifdef HAVE_GSSGNU
|
|
||||||
+# include <gss.h>
|
|
||||||
+#elif defined HAVE_GSSMIT
|
|
||||||
+ /* MIT style */
|
|
||||||
+# include <gssapi/gssapi.h>
|
|
||||||
+# include <gssapi/gssapi_generic.h>
|
|
||||||
+# include <gssapi/gssapi_krb5.h>
|
|
||||||
+#else
|
|
||||||
+ /* Heimdal-style */
|
|
||||||
+# include <gssapi.h>
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
+void Curl_gss_req_flags(OM_uint32 *req_flags, const struct SessionHandle *data);
|
|
||||||
+
|
|
||||||
+#endif /* HAVE_GSSAPI */
|
|
||||||
+
|
|
||||||
+#endif /* HEADER_CURL_GSSAPI_H */
|
|
||||||
diff --git a/lib/http_negotiate.c b/lib/http_negotiate.c
|
|
||||||
index 5127e64..8cb69fe 100644
|
|
||||||
--- a/lib/http_negotiate.c
|
|
||||||
+++ b/lib/http_negotiate.c
|
|
||||||
@@ -40,6 +40,7 @@
|
|
||||||
#include "curl_base64.h"
|
|
||||||
#include "http_negotiate.h"
|
|
||||||
#include "curl_memory.h"
|
|
||||||
+#include "curl_gssapi.h"
|
|
||||||
|
|
||||||
#ifdef HAVE_SPNEGO
|
|
||||||
# include <spnegohelp.h>
|
|
||||||
@@ -144,6 +145,9 @@ int Curl_input_negotiate(struct connectdata *conn, bool proxy,
|
|
||||||
bool gss;
|
|
||||||
const char* protocol;
|
|
||||||
|
|
||||||
+ OM_uint32 req_flags = 0;
|
|
||||||
+ Curl_gss_req_flags(&req_flags, conn->data);
|
|
||||||
+
|
|
||||||
while(*header && ISSPACE(*header))
|
|
||||||
header++;
|
|
||||||
if(checkprefix("GSS-Negotiate", header)) {
|
|
||||||
@@ -243,7 +247,7 @@ int Curl_input_negotiate(struct connectdata *conn, bool proxy,
|
|
||||||
&neg_ctx->context,
|
|
||||||
neg_ctx->server_name,
|
|
||||||
GSS_C_NO_OID,
|
|
||||||
- 0,
|
|
||||||
+ req_flags,
|
|
||||||
0,
|
|
||||||
GSS_C_NO_CHANNEL_BINDINGS,
|
|
||||||
&input_token,
|
|
||||||
diff --git a/lib/krb5.c b/lib/krb5.c
|
|
||||||
index f128d51..08f70f9 100644
|
|
||||||
--- a/lib/krb5.c
|
|
||||||
+++ b/lib/krb5.c
|
|
||||||
@@ -65,6 +65,7 @@
|
|
||||||
#include "sendf.h"
|
|
||||||
#include "krb4.h"
|
|
||||||
#include "curl_memory.h"
|
|
||||||
+#include "curl_gssapi.h"
|
|
||||||
|
|
||||||
#define _MPRINTF_REPLACE /* use our functions only */
|
|
||||||
#include <curl/mprintf.h>
|
|
||||||
@@ -185,6 +186,9 @@ krb5_auth(void *app_data, struct connectdata *conn)
|
|
||||||
gss_ctx_id_t *context = app_data;
|
|
||||||
struct gss_channel_bindings_struct chan;
|
|
||||||
|
|
||||||
+ OM_uint32 req_flags = GSS_C_MUTUAL_FLAG | GSS_C_REPLAY_FLAG;
|
|
||||||
+ Curl_gss_req_flags(&req_flags, data);
|
|
||||||
+
|
|
||||||
if(getsockname(conn->sock[FIRSTSOCKET],
|
|
||||||
(struct sockaddr *)LOCAL_ADDR, &l) < 0)
|
|
||||||
perror("getsockname()");
|
|
||||||
@@ -247,7 +251,7 @@ krb5_auth(void *app_data, struct connectdata *conn)
|
|
||||||
context,
|
|
||||||
gssname,
|
|
||||||
GSS_C_NO_OID,
|
|
||||||
- GSS_C_MUTUAL_FLAG | GSS_C_REPLAY_FLAG,
|
|
||||||
+ req_flags,
|
|
||||||
0,
|
|
||||||
&chan,
|
|
||||||
gssresp,
|
|
||||||
diff --git a/lib/socks_gssapi.c b/lib/socks_gssapi.c
|
|
||||||
index 653306c..57048be 100644
|
|
||||||
--- a/lib/socks_gssapi.c
|
|
||||||
+++ b/lib/socks_gssapi.c
|
|
||||||
@@ -43,6 +43,7 @@
|
|
||||||
#include "timeval.h"
|
|
||||||
#include "socks.h"
|
|
||||||
#include "warnless.h"
|
|
||||||
+#include "curl_gssapi.h"
|
|
||||||
|
|
||||||
#define _MPRINTF_REPLACE /* use our functions only */
|
|
||||||
#include <curl/mprintf.h>
|
|
||||||
@@ -137,6 +138,9 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
|
|
||||||
unsigned char socksreq[4]; /* room for gssapi exchange header only */
|
|
||||||
char *serviceptr = data->set.str[STRING_SOCKS5_GSSAPI_SERVICE];
|
|
||||||
|
|
||||||
+ OM_uint32 req_flags = GSS_C_MUTUAL_FLAG | GSS_C_REPLAY_FLAG;
|
|
||||||
+ Curl_gss_req_flags(&req_flags, data);
|
|
||||||
+
|
|
||||||
/* get timeout */
|
|
||||||
timeout = Curl_timeleft(data, NULL, TRUE);
|
|
||||||
|
|
||||||
@@ -187,8 +191,7 @@ CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
|
|
||||||
GSS_C_NO_CREDENTIAL,
|
|
||||||
&gss_context, server,
|
|
||||||
GSS_C_NULL_OID,
|
|
||||||
- GSS_C_MUTUAL_FLAG |
|
|
||||||
- GSS_C_REPLAY_FLAG,
|
|
||||||
+ req_flags,
|
|
||||||
0,
|
|
||||||
NULL,
|
|
||||||
gss_token,
|
|
||||||
diff --git a/lib/url.c b/lib/url.c
|
|
||||||
index c5b642f..39e04af 100644
|
|
||||||
--- a/lib/url.c
|
|
||||||
+++ b/lib/url.c
|
|
||||||
@@ -1985,6 +1985,12 @@ CURLcode Curl_setopt(struct SessionHandle *data, CURLoption option,
|
|
||||||
va_arg(param, char *));
|
|
||||||
data->set.krb = (bool)(NULL != data->set.str[STRING_KRB_LEVEL]);
|
|
||||||
break;
|
|
||||||
+ case CURLOPT_GSSAPI_DELEGATION:
|
|
||||||
+ /*
|
|
||||||
+ * GSSAPI credential delegation
|
|
||||||
+ */
|
|
||||||
+ data->set.gssapi_delegation = va_arg(param, long);
|
|
||||||
+ break;
|
|
||||||
case CURLOPT_SSL_VERIFYPEER:
|
|
||||||
/*
|
|
||||||
* Enable peer SSL verifying.
|
|
||||||
diff --git a/lib/urldata.h b/lib/urldata.h
|
|
||||||
index d256968..d3cfec3 100644
|
|
||||||
--- a/lib/urldata.h
|
|
||||||
+++ b/lib/urldata.h
|
|
||||||
@@ -1517,6 +1517,9 @@ struct UserDefined {
|
|
||||||
curl_fnmatch_callback fnmatch; /* callback to decide which file corresponds
|
|
||||||
to pattern (e.g. if WILDCARDMATCH is on) */
|
|
||||||
void *fnmatch_data;
|
|
||||||
+
|
|
||||||
+ long gssapi_delegation; /* GSSAPI credential delegation, see the
|
|
||||||
+ documentation of CURLOPT_GSSAPI_DELEGATION */
|
|
||||||
};
|
|
||||||
|
|
||||||
struct Names {
|
|
||||||
--
|
|
||||||
1.7.4.4
|
|
||||||
|
|
||||||
|
|
||||||
From d4ea7258b1703497fd0c06e08369a6bd3e37d2e8 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Kamil Dudka <kdudka@redhat.com>
|
|
||||||
Date: Wed, 3 Aug 2011 18:00:07 +0200
|
|
||||||
Subject: [PATCH 2/2] curl_gssapi: add a missing include of sendf.h
|
|
||||||
|
|
||||||
... to avoid build failure when GSS_C_DELEG_POLICY_FLAG is not defined.
|
|
||||||
|
|
||||||
Reported by: Paul Howarth
|
|
||||||
---
|
|
||||||
lib/curl_gssapi.c | 3 ++-
|
|
||||||
lib/curl_gssapi.h | 2 +-
|
|
||||||
2 files changed, 3 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/lib/curl_gssapi.c b/lib/curl_gssapi.c
|
|
||||||
index e55c9cc..d1b1715 100644
|
|
||||||
--- a/lib/curl_gssapi.c
|
|
||||||
+++ b/lib/curl_gssapi.c
|
|
||||||
@@ -25,8 +25,9 @@
|
|
||||||
#ifdef HAVE_GSSAPI
|
|
||||||
|
|
||||||
#include "curl_gssapi.h"
|
|
||||||
+#include "sendf.h"
|
|
||||||
|
|
||||||
-void Curl_gss_req_flags(OM_uint32 *req_flags, const struct SessionHandle *data)
|
|
||||||
+void Curl_gss_req_flags(OM_uint32 *req_flags, struct SessionHandle *data)
|
|
||||||
{
|
|
||||||
if(data->set.gssapi_delegation & CURLGSSAPI_DELEGATION_POLICY_FLAG) {
|
|
||||||
#ifdef GSS_C_DELEG_POLICY_FLAG
|
|
||||||
diff --git a/lib/curl_gssapi.h b/lib/curl_gssapi.h
|
|
||||||
index 02aa527..c8ffefc 100644
|
|
||||||
--- a/lib/curl_gssapi.h
|
|
||||||
+++ b/lib/curl_gssapi.h
|
|
||||||
@@ -39,7 +39,7 @@
|
|
||||||
# include <gssapi.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
-void Curl_gss_req_flags(OM_uint32 *req_flags, const struct SessionHandle *data);
|
|
||||||
+void Curl_gss_req_flags(OM_uint32 *req_flags, struct SessionHandle *data);
|
|
||||||
|
|
||||||
#endif /* HAVE_GSSAPI */
|
|
||||||
|
|
||||||
--
|
|
||||||
1.7.4.4
|
|
||||||
|
|
@ -1,30 +0,0 @@
|
|||||||
From 5eb2396cd15cbbf73b02ad6bbcc313167330c2b5 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Daniel Stenberg <daniel@haxx.se>
|
|
||||||
Date: Thu, 4 Aug 2011 23:22:48 +0200
|
|
||||||
Subject: [PATCH] segfault fixed
|
|
||||||
|
|
||||||
When using both -J and a single -O with multiple URLs, a missing init
|
|
||||||
could cause badness.
|
|
||||||
|
|
||||||
Bug: http://curl.haxx.se/mail/lib-2011-07/0126.html and
|
|
||||||
http://bugzilla.redhat.com/723075
|
|
||||||
Reported by: Paul Howarth and Garrett Holmstrom
|
|
||||||
---
|
|
||||||
src/main.c | 1 +
|
|
||||||
1 files changed, 1 insertions(+), 0 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/main.c b/src/main.c
|
|
||||||
index 6dcf333..eae45de 100644
|
|
||||||
--- a/src/main.c
|
|
||||||
+++ b/src/main.c
|
|
||||||
@@ -4898,6 +4898,7 @@ operate(struct Configurable *config, int argc, argv_item_t argv[])
|
|
||||||
outs.stream = stdout;
|
|
||||||
outs.config = config;
|
|
||||||
outs.bytes = 0; /* nothing written yet */
|
|
||||||
+ outs.filename = NULL;
|
|
||||||
|
|
||||||
/* save outfile pattern before expansion */
|
|
||||||
if(urlnode->outfile) {
|
|
||||||
--
|
|
||||||
1.7.4.4
|
|
||||||
|
|
@ -1,131 +0,0 @@
|
|||||||
From 9698db7fd56b08cc8f9bdeb2182bc9afdbcb4f90 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Daniel Stenberg <daniel@haxx.se>
|
|
||||||
Date: Fri, 12 Aug 2011 14:48:32 +0200
|
|
||||||
Subject: [PATCH 1/2] added --delegation
|
|
||||||
|
|
||||||
Using this option with an argument being set to one of
|
|
||||||
none/policy/always instructs libcurl how to deal with GSS
|
|
||||||
credentials. Or rather how it tells the server that delegation is fine
|
|
||||||
or not.
|
|
||||||
|
|
||||||
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
|
||||||
---
|
|
||||||
src/main.c | 29 ++++++++++++++++++++++++++---
|
|
||||||
1 files changed, 26 insertions(+), 3 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/main.c b/src/main.c
|
|
||||||
index d85bf62..3a2595c 100644
|
|
||||||
--- a/src/main.c
|
|
||||||
+++ b/src/main.c
|
|
||||||
@@ -659,6 +659,7 @@ struct Configurable {
|
|
||||||
basically each given URL to transfer */
|
|
||||||
struct OutStruct *outs;
|
|
||||||
bool xattr; /* store metadata in extended attributes */
|
|
||||||
+ long gssapi_delegation;
|
|
||||||
};
|
|
||||||
|
|
||||||
#define WARN_PREFIX "Warning: "
|
|
||||||
@@ -817,6 +818,7 @@ static void help(void)
|
|
||||||
" --data-binary <data> HTTP POST binary data (H)",
|
|
||||||
" --data-urlencode <name=data/name@filename> "
|
|
||||||
"HTTP POST data url encoded (H)",
|
|
||||||
+ " --delegation STRING GSS-API delegation permission",
|
|
||||||
" --digest Use HTTP Digest Authentication (H)",
|
|
||||||
" --disable-eprt Inhibit using EPRT or LPRT (F)",
|
|
||||||
" --disable-epsv Inhibit using EPSV (F)",
|
|
||||||
@@ -1823,6 +1825,18 @@ static int sockoptcallback(void *clientp, curl_socket_t curlfd,
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
+static long delegation(struct Configurable *config,
|
|
||||||
+ char *str)
|
|
||||||
+{
|
|
||||||
+ if(curlx_raw_equal("none", str))
|
|
||||||
+ return CURLGSSAPI_DELEGATION_NONE;
|
|
||||||
+ if(curlx_raw_equal("policy", str))
|
|
||||||
+ return CURLGSSAPI_DELEGATION_POLICY_FLAG;
|
|
||||||
+ if(curlx_raw_equal("always", str))
|
|
||||||
+ return CURLGSSAPI_DELEGATION_FLAG;
|
|
||||||
+ warnf(config, "unrecognized delegation method '%s', using none\n", str);
|
|
||||||
+ return CURLGSSAPI_DELEGATION_NONE;
|
|
||||||
+}
|
|
||||||
|
|
||||||
static ParameterError getparameter(char *flag, /* f or -long-flag */
|
|
||||||
char *nextarg, /* NULL if unset */
|
|
||||||
@@ -1942,6 +1956,7 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */
|
|
||||||
{"$D", "proto", TRUE},
|
|
||||||
{"$E", "proto-redir", TRUE},
|
|
||||||
{"$F", "resolve", TRUE},
|
|
||||||
+ {"$G", "delegation", TRUE},
|
|
||||||
{"0", "http1.0", FALSE},
|
|
||||||
{"1", "tlsv1", FALSE},
|
|
||||||
{"2", "sslv2", FALSE},
|
|
||||||
@@ -2516,6 +2531,9 @@ static ParameterError getparameter(char *flag, /* f or -long-flag */
|
|
||||||
if(err)
|
|
||||||
return err;
|
|
||||||
break;
|
|
||||||
+ case 'G': /* --delegation LEVEL */
|
|
||||||
+ config->gssapi_delegation = delegation(config, nextarg);
|
|
||||||
+ break;
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case '#': /* --progress-bar */
|
|
||||||
@@ -5564,9 +5582,14 @@ operate(struct Configurable *config, int argc, argv_item_t argv[])
|
|
||||||
/* new in 7.21.3 */
|
|
||||||
my_setopt(curl, CURLOPT_RESOLVE, config->resolve);
|
|
||||||
|
|
||||||
- /* TODO: new in ### */
|
|
||||||
- curl_easy_setopt(curl, CURLOPT_TLSAUTH_USERNAME, config->tls_username);
|
|
||||||
- curl_easy_setopt(curl, CURLOPT_TLSAUTH_PASSWORD, config->tls_password);
|
|
||||||
+ /* new in 7.21.4 */
|
|
||||||
+ my_setopt_str(curl, CURLOPT_TLSAUTH_USERNAME, config->tls_username);
|
|
||||||
+ my_setopt_str(curl, CURLOPT_TLSAUTH_PASSWORD, config->tls_password);
|
|
||||||
+
|
|
||||||
+ /* new in 7.22.0 */
|
|
||||||
+ if(config->gssapi_delegation)
|
|
||||||
+ my_setopt_str(curl, CURLOPT_GSSAPI_DELEGATION,
|
|
||||||
+ config->gssapi_delegation);
|
|
||||||
|
|
||||||
retry_numretries = config->req_retry;
|
|
||||||
|
|
||||||
--
|
|
||||||
1.7.4.4
|
|
||||||
|
|
||||||
|
|
||||||
From 8e404e1c3846cc98a1977514af5b0432ae2de755 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Daniel Stenberg <daniel@haxx.se>
|
|
||||||
Date: Fri, 12 Aug 2011 23:51:41 +0200
|
|
||||||
Subject: [PATCH 2/2] docs: --delegation
|
|
||||||
|
|
||||||
|
|
||||||
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
|
||||||
---
|
|
||||||
docs/curl.1 | 12 ++++++++++++
|
|
||||||
1 files changed, 12 insertions(+), 0 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/docs/curl.1 b/docs/curl.1
|
|
||||||
index 812b2eb..eee3481 100644
|
|
||||||
--- a/docs/curl.1
|
|
||||||
+++ b/docs/curl.1
|
|
||||||
@@ -320,6 +320,18 @@ URL-encode that data and pass it on in the POST. The name part gets an equal
|
|
||||||
sign appended, resulting in \fIname=urlencoded-file-content\fP. Note that the
|
|
||||||
name is expected to be URL-encoded already.
|
|
||||||
.RE
|
|
||||||
+.IP "--delegation LEVEL"
|
|
||||||
+Set \fILEVEL\fP to tell the server what it is allowed to delegate when it
|
|
||||||
+comes to user credentials. Used with GSS/kerberos.
|
|
||||||
+.RS
|
|
||||||
+.IP "none"
|
|
||||||
+Don't allow any delegation.
|
|
||||||
+.IP "policy"
|
|
||||||
+Delegates if and only if the OK-AS-DELEGATE flag is set in the Kerberos
|
|
||||||
+service ticket, which is a matter of realm policy.
|
|
||||||
+.IP "always"
|
|
||||||
+Unconditionally allow the server to delegate.
|
|
||||||
+.RE
|
|
||||||
.IP "--digest"
|
|
||||||
(HTTP) Enables HTTP Digest authentication. This is a authentication that
|
|
||||||
prevents the password from being sent over the wire in clear text. Use this in
|
|
||||||
--
|
|
||||||
1.7.4.4
|
|
||||||
|
|
@ -1,118 +0,0 @@
|
|||||||
From 857fed6e245a9620b0f25a2f4ca6d6dc01584674 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Kamil Dudka <kdudka@redhat.com>
|
|
||||||
Date: Mon, 15 Aug 2011 13:48:45 +0200
|
|
||||||
Subject: [PATCH] nss: start with no database if the selected database is
|
|
||||||
broken
|
|
||||||
|
|
||||||
Bug: https://bugzilla.redhat.com/728562
|
|
||||||
|
|
||||||
Signed-off-by: Kamil Dudka <kdudka@redhat.com>
|
|
||||||
---
|
|
||||||
lib/nss.c | 63 +++++++++++++++++++++++++++++++++++++-----------------------
|
|
||||||
1 files changed, 39 insertions(+), 24 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/lib/nss.c b/lib/nss.c
|
|
||||||
index 3dc0ba6..94a530b 100644
|
|
||||||
--- a/lib/nss.c
|
|
||||||
+++ b/lib/nss.c
|
|
||||||
@@ -898,10 +898,42 @@ isTLSIntoleranceError(PRInt32 err)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
-static CURLcode init_nss(struct SessionHandle *data)
|
|
||||||
+static CURLcode nss_init_core(struct SessionHandle *data, const char *cert_dir)
|
|
||||||
+{
|
|
||||||
+ if(NSS_IsInitialized())
|
|
||||||
+ return CURLE_OK;
|
|
||||||
+
|
|
||||||
+ if(cert_dir) {
|
|
||||||
+ SECStatus rv;
|
|
||||||
+ const bool use_sql = NSS_VersionCheck("3.12.0");
|
|
||||||
+ char *certpath = aprintf("%s%s", use_sql ? "sql:" : "", cert_dir);
|
|
||||||
+ if(!certpath)
|
|
||||||
+ return CURLE_OUT_OF_MEMORY;
|
|
||||||
+
|
|
||||||
+ infof(data, "Initializing NSS with certpath: %s\n", certpath);
|
|
||||||
+ rv = NSS_Initialize(certpath, "", "", "", NSS_INIT_READONLY);
|
|
||||||
+ free(certpath);
|
|
||||||
+
|
|
||||||
+ if(rv == SECSuccess)
|
|
||||||
+ return CURLE_OK;
|
|
||||||
+
|
|
||||||
+ infof(data, "Unable to initialize NSS database\n");
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ infof(data, "Initializing NSS with certpath: none\n");
|
|
||||||
+ if(NSS_NoDB_Init(NULL) == SECSuccess)
|
|
||||||
+ return CURLE_OK;
|
|
||||||
+
|
|
||||||
+ infof(data, "Unable to initialize NSS\n");
|
|
||||||
+ return CURLE_SSL_CACERT_BADFILE;
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+static CURLcode nss_init(struct SessionHandle *data)
|
|
||||||
{
|
|
||||||
char *cert_dir;
|
|
||||||
struct_stat st;
|
|
||||||
+ CURLcode rv;
|
|
||||||
+
|
|
||||||
if(initialized)
|
|
||||||
return CURLE_OK;
|
|
||||||
|
|
||||||
@@ -922,31 +954,14 @@ static CURLcode init_nss(struct SessionHandle *data)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
- if(!NSS_IsInitialized()) {
|
|
||||||
- SECStatus rv;
|
|
||||||
- initialized = 1;
|
|
||||||
- infof(data, "Initializing NSS with certpath: %s\n",
|
|
||||||
- cert_dir ? cert_dir : "none");
|
|
||||||
- if(!cert_dir) {
|
|
||||||
- rv = NSS_NoDB_Init(NULL);
|
|
||||||
- }
|
|
||||||
- else {
|
|
||||||
- char *certpath =
|
|
||||||
- PR_smprintf("%s%s", NSS_VersionCheck("3.12.0") ? "sql:" : "",
|
|
||||||
- cert_dir);
|
|
||||||
- rv = NSS_Initialize(certpath, "", "", "", NSS_INIT_READONLY);
|
|
||||||
- PR_smprintf_free(certpath);
|
|
||||||
- }
|
|
||||||
- if(rv != SECSuccess) {
|
|
||||||
- infof(data, "Unable to initialize NSS database\n");
|
|
||||||
- initialized = 0;
|
|
||||||
- return CURLE_SSL_CACERT_BADFILE;
|
|
||||||
- }
|
|
||||||
- }
|
|
||||||
+ rv = nss_init_core(data, cert_dir);
|
|
||||||
+ if(rv)
|
|
||||||
+ return rv;
|
|
||||||
|
|
||||||
if(num_enabled_ciphers() == 0)
|
|
||||||
NSS_SetDomesticPolicy();
|
|
||||||
|
|
||||||
+ initialized = 1;
|
|
||||||
return CURLE_OK;
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -981,7 +996,7 @@ CURLcode Curl_nss_force_init(struct SessionHandle *data)
|
|
||||||
}
|
|
||||||
|
|
||||||
PR_Lock(nss_initlock);
|
|
||||||
- rv = init_nss(data);
|
|
||||||
+ rv = nss_init(data);
|
|
||||||
PR_Unlock(nss_initlock);
|
|
||||||
return rv;
|
|
||||||
}
|
|
||||||
@@ -1184,7 +1199,7 @@ CURLcode Curl_nss_connect(struct connectdata *conn, int sockindex)
|
|
||||||
|
|
||||||
/* FIXME. NSS doesn't support multiple databases open at the same time. */
|
|
||||||
PR_Lock(nss_initlock);
|
|
||||||
- curlerr = init_nss(conn->data);
|
|
||||||
+ curlerr = nss_init(conn->data);
|
|
||||||
if(CURLE_OK != curlerr) {
|
|
||||||
PR_Unlock(nss_initlock);
|
|
||||||
goto error;
|
|
||||||
--
|
|
||||||
1.7.4.4
|
|
||||||
|
|
@ -1,46 +0,0 @@
|
|||||||
From 61ae7e9ce77af86a7290fca8bf73c9798f80845c Mon Sep 17 00:00:00 2001
|
|
||||||
From: Daniel Stenberg <daniel@haxx.se>
|
|
||||||
Date: Sun, 21 Aug 2011 12:59:06 +0200
|
|
||||||
Subject: [PATCH] main: fix segfault
|
|
||||||
|
|
||||||
Follow-up to commit 5eb2396cd as that wasn't complete.
|
|
||||||
|
|
||||||
At times HEADERFUNCTION+HEADERDATA was set only to have only HEADERDATA
|
|
||||||
set in the subsequent loop which could cause a NULL to get sent as
|
|
||||||
userdata to 'header_callback' which wasn't made to handle that.
|
|
||||||
|
|
||||||
Now HEADERFUNCTION is explicitly set to NULL if it isn't set to the
|
|
||||||
callback.
|
|
||||||
---
|
|
||||||
src/main.c | 8 ++++++--
|
|
||||||
1 files changed, 6 insertions(+), 2 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/src/main.c b/src/main.c
|
|
||||||
index 276718b..56cd133 100644
|
|
||||||
--- a/src/main.c
|
|
||||||
+++ b/src/main.c
|
|
||||||
@@ -5415,8 +5415,6 @@ operate(struct Configurable *config, int argc, argv_item_t argv[])
|
|
||||||
my_setopt(curl, CURLOPT_QUOTE, config->quote);
|
|
||||||
my_setopt(curl, CURLOPT_POSTQUOTE, config->postquote);
|
|
||||||
my_setopt(curl, CURLOPT_PREQUOTE, config->prequote);
|
|
||||||
- my_setopt(curl, CURLOPT_HEADERDATA,
|
|
||||||
- config->headerfile?&heads:NULL);
|
|
||||||
my_setopt_str(curl, CURLOPT_COOKIEFILE, config->cookiefile);
|
|
||||||
/* cookie jar was added in 7.9 */
|
|
||||||
if(config->cookiejar)
|
|
||||||
@@ -5621,6 +5619,12 @@ operate(struct Configurable *config, int argc, argv_item_t argv[])
|
|
||||||
my_setopt(curl, CURLOPT_HEADERFUNCTION, header_callback);
|
|
||||||
my_setopt(curl, CURLOPT_HEADERDATA, &outs);
|
|
||||||
}
|
|
||||||
+ else {
|
|
||||||
+ /* if HEADERFUNCTION was set to something in the previous loop, it
|
|
||||||
+ is important that we set it (back) to NULL now */
|
|
||||||
+ my_setopt(curl, CURLOPT_HEADERFUNCTION, NULL);
|
|
||||||
+ my_setopt(curl, CURLOPT_HEADERDATA, config->headerfile?&heads:NULL);
|
|
||||||
+ }
|
|
||||||
|
|
||||||
if(config->resolve)
|
|
||||||
/* new in 7.21.3 */
|
|
||||||
--
|
|
||||||
1.7.6
|
|
||||||
|
|
@ -1,20 +1,13 @@
|
|||||||
curl-config.in | 22 ++++------------------
|
curl-config.in | 16 +++-------------
|
||||||
libcurl.pc.in | 1 +
|
docs/curl-config.1 | 4 +++-
|
||||||
2 files changed, 5 insertions(+), 18 deletions(-)
|
libcurl.pc.in | 1 +
|
||||||
|
3 files changed, 7 insertions(+), 14 deletions(-)
|
||||||
|
|
||||||
diff --git a/curl-config.in b/curl-config.in
|
diff --git a/curl-config.in b/curl-config.in
|
||||||
index ebda129..b404827 100644
|
index 150004d..95d0759 100644
|
||||||
--- a/curl-config.in
|
--- a/curl-config.in
|
||||||
+++ b/curl-config.in
|
+++ b/curl-config.in
|
||||||
@@ -43,7 +43,6 @@ Available values for OPTION include:
|
@@ -74,7 +74,7 @@ while test $# -gt 0; do
|
||||||
--libs library linking information
|
|
||||||
--prefix curl install prefix
|
|
||||||
--protocols newline separated list of enabled protocols
|
|
||||||
- --static-libs static libcurl library linking information
|
|
||||||
--version output version information
|
|
||||||
--vernum output the version information as a number (hexadecimal)
|
|
||||||
EOF
|
|
||||||
@@ -74,7 +73,7 @@ while test $# -gt 0; do
|
|
||||||
;;
|
;;
|
||||||
|
|
||||||
--cc)
|
--cc)
|
||||||
@ -23,7 +16,7 @@ index ebda129..b404827 100644
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
--prefix)
|
--prefix)
|
||||||
@@ -136,25 +135,12 @@ while test $# -gt 0; do
|
@@ -136,24 +136,14 @@ while test $# -gt 0; do
|
||||||
;;
|
;;
|
||||||
|
|
||||||
--libs)
|
--libs)
|
||||||
@ -37,21 +30,36 @@ index ebda129..b404827 100644
|
|||||||
- else
|
- else
|
||||||
- echo ${CURLLIBDIR}-lcurl @LDFLAGS@ @LIBS@
|
- echo ${CURLLIBDIR}-lcurl @LDFLAGS@ @LIBS@
|
||||||
- fi
|
- fi
|
||||||
- ;;
|
|
||||||
-
|
|
||||||
- --static-libs)
|
|
||||||
- echo @libdir@/libcurl.@libext@ @LDFLAGS@ @LIBCURL_LIBS@ @LIBS@
|
|
||||||
+ pkg-config libcurl --libs
|
+ pkg-config libcurl --libs
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
--static-libs)
|
||||||
|
- echo @libdir@/libcurl.@libext@ @LDFLAGS@ @LIBCURL_LIBS@ @LIBS@
|
||||||
|
;;
|
||||||
|
|
||||||
--configure)
|
--configure)
|
||||||
- echo @CONFIGURE_OPTIONS@
|
- echo @CONFIGURE_OPTIONS@
|
||||||
- ;;
|
|
||||||
+ pkg-config libcurl --variable=configure_options | sed 's/^"//;s/"$//'
|
+ pkg-config libcurl --variable=configure_options | sed 's/^"//;s/"$//'
|
||||||
+ ;;
|
;;
|
||||||
|
|
||||||
*)
|
*)
|
||||||
echo "unknown option: $1"
|
diff --git a/docs/curl-config.1 b/docs/curl-config.1
|
||||||
|
index c4f4e2b..3e0ea60 100644
|
||||||
|
--- a/docs/curl-config.1
|
||||||
|
+++ b/docs/curl-config.1
|
||||||
|
@@ -65,7 +65,9 @@ be listed using uppercase and are separated by newlines. There may be none,
|
||||||
|
one, or several protocols in the list. (Added in 7.13.0)
|
||||||
|
.IP "--static-libs"
|
||||||
|
Shows the complete set of libs and other linker options you will need in order
|
||||||
|
-to link your application with libcurl statically. (Added in 7.17.1)
|
||||||
|
+to link your application with libcurl statically. Note that Fedora/RHEL libcurl
|
||||||
|
+packages do not provide any static libraries, thus cannot be linked statically.
|
||||||
|
+(Added in 7.17.1)
|
||||||
|
.IP "--version"
|
||||||
|
Outputs version information about the installed libcurl.
|
||||||
|
.IP "--vernum"
|
||||||
|
diff --git a/libcurl.pc.in b/libcurl.pc.in
|
||||||
|
index 2ba9c39..f8f8b00 100644
|
||||||
--- a/libcurl.pc.in
|
--- a/libcurl.pc.in
|
||||||
+++ b/libcurl.pc.in
|
+++ b/libcurl.pc.in
|
||||||
@@ -29,6 +29,7 @@ libdir=@libdir@
|
@@ -29,6 +29,7 @@ libdir=@libdir@
|
||||||
|
@ -6,7 +6,7 @@ diff --git a/configure b/configure
|
|||||||
index d3ecf69..6d8f085 100755
|
index d3ecf69..6d8f085 100755
|
||||||
--- a/configure
|
--- a/configure
|
||||||
+++ b/configure
|
+++ b/configure
|
||||||
@@ -15006,18 +15006,11 @@ $as_echo "yes" >&6; }
|
@@ -14977,18 +14977,11 @@ $as_echo "yes" >&6; }
|
||||||
gccvhi=`echo $gccver | cut -d . -f1`
|
gccvhi=`echo $gccver | cut -d . -f1`
|
||||||
gccvlo=`echo $gccver | cut -d . -f2`
|
gccvlo=`echo $gccver | cut -d . -f2`
|
||||||
compiler_num=`(expr $gccvhi "*" 100 + $gccvlo) 2>/dev/null`
|
compiler_num=`(expr $gccvhi "*" 100 + $gccvlo) 2>/dev/null`
|
||||||
|
@ -6,25 +6,25 @@ diff --git a/tests/data/Makefile.am b/tests/data/Makefile.am
|
|||||||
index 9370974..b553f54 100644
|
index 9370974..b553f54 100644
|
||||||
--- a/tests/data/Makefile.am
|
--- a/tests/data/Makefile.am
|
||||||
+++ b/tests/data/Makefile.am
|
+++ b/tests/data/Makefile.am
|
||||||
@@ -69,7 +69,7 @@ test1078 test1079 test1080 test1081 test1082 test1083 test1084 test1085 \
|
@@ -70,7 +70,7 @@ test1078 test1079 test1080 test1081 test1082 test1083 test1084 test1085 \
|
||||||
test1086 test1087 test1088 test1089 test1090 test1091 test1092 test1093 \
|
test1086 test1087 test1088 test1089 test1090 test1091 test1092 test1093 \
|
||||||
test1094 test1095 test1096 test1097 test1098 test1099 test1100 test1101 \
|
test1094 test1095 test1096 test1097 test1098 test1099 test1100 test1101 \
|
||||||
test1102 test1103 test1104 test1105 test1106 test1107 test1108 test1109 \
|
test1102 test1103 test1104 test1105 test1106 test1107 test1108 test1109 \
|
||||||
-test1110 test1111 test1112 test1113 test1114 test1115 test1116 test1117 \
|
-test1110 test1111 test1112 test1113 test1114 test1115 test1116 test1117 \
|
||||||
+test1110 test1111 test1113 test1114 test1115 test1116 test1117 \
|
+test1110 test1111 test1113 test1114 test1115 test1116 test1117 \
|
||||||
test1118 test1119 test1120 test1121 test1122 test1123 test1124 test1125 \
|
test1118 test1119 test1120 test1121 test1122 test1123 test1124 test1125 \
|
||||||
test1126 test1127 test1128 test1200 test1201 test1202 test1203 test1300 \
|
test1126 test1127 test1128 test1129 test1130 test1131 test1200 test1201 \
|
||||||
test1301 test1302 test1303 test1304 test1305 test1306 test1307 test1308 \
|
test1202 test1203 test1300 test1301 test1302 test1303 test1304 test1305 \
|
||||||
diff --git a/tests/data/Makefile.in b/tests/data/Makefile.in
|
diff --git a/tests/data/Makefile.in b/tests/data/Makefile.in
|
||||||
index 435b126..1d71c4e 100644
|
index 435b126..1d71c4e 100644
|
||||||
--- a/tests/data/Makefile.in
|
--- a/tests/data/Makefile.in
|
||||||
+++ b/tests/data/Makefile.in
|
+++ b/tests/data/Makefile.in
|
||||||
@@ -317,7 +317,7 @@ test1078 test1079 test1080 test1081 test1082 test1083 test1084 test1085 \
|
@@ -318,7 +318,7 @@ test1078 test1079 test1080 test1081 test1082 test1083 test1084 test1085 \
|
||||||
test1086 test1087 test1088 test1089 test1090 test1091 test1092 test1093 \
|
test1086 test1087 test1088 test1089 test1090 test1091 test1092 test1093 \
|
||||||
test1094 test1095 test1096 test1097 test1098 test1099 test1100 test1101 \
|
test1094 test1095 test1096 test1097 test1098 test1099 test1100 test1101 \
|
||||||
test1102 test1103 test1104 test1105 test1106 test1107 test1108 test1109 \
|
test1102 test1103 test1104 test1105 test1106 test1107 test1108 test1109 \
|
||||||
-test1110 test1111 test1112 test1113 test1114 test1115 test1116 test1117 \
|
-test1110 test1111 test1112 test1113 test1114 test1115 test1116 test1117 \
|
||||||
+test1110 test1111 test1113 test1114 test1115 test1116 test1117 \
|
+test1110 test1111 test1113 test1114 test1115 test1116 test1117 \
|
||||||
test1118 test1119 test1120 test1121 test1122 test1123 test1124 test1125 \
|
test1118 test1119 test1120 test1121 test1122 test1123 test1124 test1125 \
|
||||||
test1126 test1127 test1128 test1200 test1201 test1202 test1203 test1300 \
|
test1126 test1127 test1128 test1129 test1130 test1131 test1200 test1201 \
|
||||||
test1301 test1302 test1303 test1304 test1305 test1306 test1307 test1308 \
|
test1202 test1203 test1300 test1301 test1302 test1303 test1304 test1305 \
|
||||||
|
@ -1,7 +0,0 @@
|
|||||||
-----BEGIN PGP SIGNATURE-----
|
|
||||||
Version: GnuPG v1.4.11 (GNU/Linux)
|
|
||||||
|
|
||||||
iEYEABECAAYFAk4C+RkACgkQeOEcayedXJE+zgCgpoA3RZSH/V7Pt2r+V4vw6XzE
|
|
||||||
l4gAoI6vUkMdpsA0HZb3qVU7xj+UeZAC
|
|
||||||
=XD6y
|
|
||||||
-----END PGP SIGNATURE-----
|
|
7
curl-7.22.0.tar.lzma.asc
Normal file
7
curl-7.22.0.tar.lzma.asc
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
-----BEGIN PGP SIGNATURE-----
|
||||||
|
Version: GnuPG v1.4.11 (GNU/Linux)
|
||||||
|
|
||||||
|
iEYEABECAAYFAk5viyUACgkQeOEcayedXJEaggCg7JyyFFNTACA/n5MGVKXwYHQC
|
||||||
|
ovcAnRO3592IDU38/JT89o7kUWQ9Ae1m
|
||||||
|
=Z547
|
||||||
|
-----END PGP SIGNATURE-----
|
28
curl.spec
28
curl.spec
@ -1,26 +1,13 @@
|
|||||||
Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
|
Summary: A utility for getting files from remote servers (FTP, HTTP, and others)
|
||||||
Name: curl
|
Name: curl
|
||||||
Version: 7.21.7
|
Version: 7.22.0
|
||||||
Release: 4%{?dist}
|
Release: 1%{?dist}
|
||||||
License: MIT
|
License: MIT
|
||||||
Group: Applications/Internet
|
Group: Applications/Internet
|
||||||
Source: http://curl.haxx.se/download/%{name}-%{version}.tar.lzma
|
Source: http://curl.haxx.se/download/%{name}-%{version}.tar.lzma
|
||||||
Source2: curlbuild.h
|
Source2: curlbuild.h
|
||||||
Source3: hide_selinux.c
|
Source3: hide_selinux.c
|
||||||
|
|
||||||
# add a new option CURLOPT_GSSAPI_DELEGATION (#719939)
|
|
||||||
Patch1: 0001-curl-7.21.7-a7864c4.patch
|
|
||||||
|
|
||||||
# fix SIGSEGV of curl -O -J given more than one URLs (#723075)
|
|
||||||
Patch2: 0002-curl-7.21.7-5eb2396.patch
|
|
||||||
Patch5: 0005-curl-7.21.7-61ae7e9.patch
|
|
||||||
|
|
||||||
# introduce the --delegation option of curl (#730444)
|
|
||||||
Patch3: 0003-curl-7.21.7-5538904.patch
|
|
||||||
|
|
||||||
# initialize NSS with no database if the selected database is broken (#728562)
|
|
||||||
Patch4: 0004-curl-7.21.7-d6f319f.patch
|
|
||||||
|
|
||||||
# patch making libcurl multilib ready
|
# patch making libcurl multilib ready
|
||||||
Patch101: 0101-curl-7.21.1-multilib.patch
|
Patch101: 0101-curl-7.21.1-multilib.patch
|
||||||
|
|
||||||
@ -119,13 +106,6 @@ for f in CHANGES README; do
|
|||||||
mv -f ${f}.utf8 ${f}
|
mv -f ${f}.utf8 ${f}
|
||||||
done
|
done
|
||||||
|
|
||||||
# upstream patches (already applied)
|
|
||||||
%patch1 -p1
|
|
||||||
%patch2 -p1
|
|
||||||
%patch3 -p1
|
|
||||||
%patch4 -p1
|
|
||||||
%patch5 -p1
|
|
||||||
|
|
||||||
# Fedora patches
|
# Fedora patches
|
||||||
%patch101 -p1
|
%patch101 -p1
|
||||||
%patch102 -p1
|
%patch102 -p1
|
||||||
@ -238,6 +218,10 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%{_datadir}/aclocal/libcurl.m4
|
%{_datadir}/aclocal/libcurl.m4
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Sep 13 2011 Kamil Dudka <kdudka@redhat.com> 7.22.0-1
|
||||||
|
- new upstream release
|
||||||
|
- curl-config now provides dummy --static-libs option (#733956)
|
||||||
|
|
||||||
* Sun Aug 21 2011 Paul Howarth <paul@city-fan.org> 7.21.7-4
|
* Sun Aug 21 2011 Paul Howarth <paul@city-fan.org> 7.21.7-4
|
||||||
- actually fix SIGSEGV of curl -O -J given more than one URL (#723075)
|
- actually fix SIGSEGV of curl -O -J given more than one URL (#723075)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user