From 44b58472378097faf9632d0dd9b4e478fb3433ed Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Wed, 13 Jul 2011 22:54:54 +0200 Subject: gssapi: rename our files to avoid conflicts gssapi.h is used as a header name by Heimdal-style GSSAPI so it would conflict with a private header using that name, and while renaming the header I figured we should name the .c file accordingly as well. Bug: http://curl.haxx.se/mail/lib-2011-07/0071.html Reported by: Ben Greear --- lib/Makefile.inc | 4 ++-- lib/curl_gssapi.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ lib/curl_gssapi.h | 47 +++++++++++++++++++++++++++++++++++++++++++++++ lib/gssapi.c | 48 ------------------------------------------------ lib/gssapi.h | 47 ----------------------------------------------- lib/http_negotiate.c | 2 +- lib/krb5.c | 2 +- lib/socks_gssapi.c | 2 +- 8 files changed, 100 insertions(+), 100 deletions(-) create mode 100644 lib/curl_gssapi.c create mode 100644 lib/curl_gssapi.h delete mode 100644 lib/gssapi.c delete mode 100644 lib/gssapi.h (limited to 'lib') diff --git a/lib/Makefile.inc b/lib/Makefile.inc index 1727a173c..51fc9191d 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 gssapi.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 gssapi.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 000000000..69c3c88d7 --- /dev/null +++ b/lib/curl_gssapi.c @@ -0,0 +1,48 @@ +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) 2011, Daniel Stenberg, , 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 "curl_gssapi.h" + +OM_uint32 Curl_gss_init_sec_context( + OM_uint32 * minor_status, + gss_ctx_id_t * context, + gss_name_t target_name, + gss_channel_bindings_t input_chan_bindings, + gss_buffer_t input_token, + gss_buffer_t output_token, + OM_uint32 * ret_flags) +{ + return gss_init_sec_context(minor_status, + GSS_C_NO_CREDENTIAL, /* cred_handle */ + context, + target_name, + GSS_C_NO_OID, /* mech_type */ + /* req_flags */ + GSS_C_MUTUAL_FLAG | GSS_C_REPLAY_FLAG, + 0, /* time_req */ + input_chan_bindings, + input_token, + NULL, /* actual_mech_type */ + output_token, + ret_flags, + NULL /* time_rec */); +} diff --git a/lib/curl_gssapi.h b/lib/curl_gssapi.h new file mode 100644 index 000000000..c5b58db58 --- /dev/null +++ b/lib/curl_gssapi.h @@ -0,0 +1,47 @@ +/*************************************************************************** + * _ _ ____ _ + * Project ___| | | | _ \| | + * / __| | | | |_) | | + * | (__| |_| | _ <| |___ + * \___|\___/|_| \_\_____| + * + * Copyright (C) 2011, Daniel Stenberg, , 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_GSSGNU +# include +#elif defined HAVE_GSSMIT + /* MIT style */ +# include +# include +# include +#else + /* Heimdal-style */ +# include +#endif + + +/* Common method for using gss api */ + +OM_uint32 Curl_gss_init_sec_context( + OM_uint32 * minor_status, + gss_ctx_id_t * context, + gss_name_t target_name, + gss_channel_bindings_t input_chan_bindings, + gss_buffer_t input_token, + gss_buffer_t output_token, + OM_uint32 * ret_flags); diff --git a/lib/gssapi.c b/lib/gssapi.c deleted file mode 100644 index 8911f5f32..000000000 --- a/lib/gssapi.c +++ /dev/null @@ -1,48 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 2011, Daniel Stenberg, , 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 "gssapi.h" - -OM_uint32 Curl_gss_init_sec_context( - OM_uint32 * minor_status, - gss_ctx_id_t * context, - gss_name_t target_name, - gss_channel_bindings_t input_chan_bindings, - gss_buffer_t input_token, - gss_buffer_t output_token, - OM_uint32 * ret_flags) -{ - return gss_init_sec_context(minor_status, - GSS_C_NO_CREDENTIAL, /* cred_handle */ - context, - target_name, - GSS_C_NO_OID, /* mech_type */ - /* req_flags */ - GSS_C_MUTUAL_FLAG | GSS_C_REPLAY_FLAG, - 0, /* time_req */ - input_chan_bindings, - input_token, - NULL, /* actual_mech_type */ - output_token, - ret_flags, - NULL /* time_rec */); -} diff --git a/lib/gssapi.h b/lib/gssapi.h deleted file mode 100644 index c5b58db58..000000000 --- a/lib/gssapi.h +++ /dev/null @@ -1,47 +0,0 @@ -/*************************************************************************** - * _ _ ____ _ - * Project ___| | | | _ \| | - * / __| | | | |_) | | - * | (__| |_| | _ <| |___ - * \___|\___/|_| \_\_____| - * - * Copyright (C) 2011, Daniel Stenberg, , 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_GSSGNU -# include -#elif defined HAVE_GSSMIT - /* MIT style */ -# include -# include -# include -#else - /* Heimdal-style */ -# include -#endif - - -/* Common method for using gss api */ - -OM_uint32 Curl_gss_init_sec_context( - OM_uint32 * minor_status, - gss_ctx_id_t * context, - gss_name_t target_name, - gss_channel_bindings_t input_chan_bindings, - gss_buffer_t input_token, - gss_buffer_t output_token, - OM_uint32 * ret_flags); diff --git a/lib/http_negotiate.c b/lib/http_negotiate.c index e4a8ff259..36823f8cf 100644 --- a/lib/http_negotiate.c +++ b/lib/http_negotiate.c @@ -36,7 +36,7 @@ #include "urldata.h" #include "sendf.h" -#include "gssapi.h" +#include "curl_gssapi.h" #include "rawstr.h" #include "curl_base64.h" #include "http_negotiate.h" diff --git a/lib/krb5.c b/lib/krb5.c index 34329dc6a..5c60c8dc4 100644 --- a/lib/krb5.c +++ b/lib/krb5.c @@ -50,7 +50,7 @@ #include "urldata.h" #include "curl_base64.h" #include "ftp.h" -#include "gssapi.h" +#include "curl_gssapi.h" #include "sendf.h" #include "krb4.h" #include "curl_memory.h" diff --git a/lib/socks_gssapi.c b/lib/socks_gssapi.c index 8af26c26a..872efb0e1 100644 --- a/lib/socks_gssapi.c +++ b/lib/socks_gssapi.c @@ -37,7 +37,7 @@ #include #endif -#include "gssapi.h" +#include "curl_gssapi.h" #include "urldata.h" #include "sendf.h" #include "connect.h" -- cgit v1.2.3