s4:heimdal: import lorikeet-heimdal-200908052208 (commit 370a73a74199a5a55188340906e1...
authorAndrew Bartlett <abartlet@samba.org>
Wed, 5 Aug 2009 22:17:09 +0000 (08:17 +1000)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 5 Aug 2009 22:44:53 +0000 (08:44 +1000)
This removes some of the portability changes made to code under
heimdal/

If these are still required, then we will re-add them with code under
heimdal_build/ (so that we can simply 'drop in' future heimdal
releases).

Andrew Bartlett

33 files changed:
source4/heimdal/kuser/kinit.c
source4/heimdal/kuser/kuser_locl.h
source4/heimdal/lib/gssapi/krb5/cfx.c
source4/heimdal/lib/hcrypto/aes.c
source4/heimdal/lib/hcrypto/bn.c
source4/heimdal/lib/hcrypto/des.c
source4/heimdal/lib/hcrypto/dh-imath.c
source4/heimdal/lib/hcrypto/dh.c
source4/heimdal/lib/hcrypto/dsa.c
source4/heimdal/lib/hcrypto/engine.c
source4/heimdal/lib/hcrypto/evp-hcrypto.c
source4/heimdal/lib/hcrypto/md2.c
source4/heimdal/lib/hcrypto/md4.c
source4/heimdal/lib/hcrypto/md5.c
source4/heimdal/lib/hcrypto/pkcs12.c
source4/heimdal/lib/hcrypto/pkcs5.c
source4/heimdal/lib/hcrypto/rand-egd.c
source4/heimdal/lib/hcrypto/rand-fortuna.c
source4/heimdal/lib/hcrypto/rand-timer.c
source4/heimdal/lib/hcrypto/rand-unix.c
source4/heimdal/lib/hcrypto/rand.c
source4/heimdal/lib/hcrypto/rc2.c
source4/heimdal/lib/hcrypto/rc4.c
source4/heimdal/lib/hcrypto/rijndael-alg-fst.c
source4/heimdal/lib/hcrypto/rnd_keys.c
source4/heimdal/lib/hcrypto/rsa-imath.c
source4/heimdal/lib/hcrypto/rsa.c
source4/heimdal/lib/hcrypto/sha.c
source4/heimdal/lib/hcrypto/sha256.c
source4/heimdal/lib/hcrypto/ui.c
source4/heimdal/lib/krb5/context.c
source4/heimdal/lib/krb5/krb5_locl.h
source4/heimdal/lib/roken/vis.hin

index 350988dbac9667e06c091e9a2764c093851d8359..4208fa83e0ca5eb8e89fd78d3c09370773db65bf 100644 (file)
@@ -768,10 +768,8 @@ main (int argc, char **argv)
     setprogname (argv[0]);
 
     setlocale (LC_ALL, "");
-#if defined(HEIMDAL_LOCALEDIR)
     bindtextdomain ("heimdal_kuser", HEIMDAL_LOCALEDIR);
     textdomain("heimdal_kuser");
-#endif
 
     ret = krb5_init_context (&context);
     if (ret == KRB5_CONFIG_BADFORMAT)
index eafffe9bffc99897aa143c451821f65c2e67b6e3..1bf682b1d0fb8fe44d61fa180a7196a751e54019 100644 (file)
@@ -88,7 +88,7 @@
 #include <locale.h>
 #endif
 
-#ifdef HAVE_LIBINTL_H
+#ifdef LIBINTL
 #include <libintl.h>
 #define N_(x,y) gettext(x)
 #define NP_(x,y) (x)
index 35e5a9e45a8787b1f8927a66e05646f281d156f8..7cc7ee1e742fafa07be96347dcbba3c7d9cfa2a6 100755 (executable)
 #define CFXAcceptorSubkey      (1 << 2)
 
 krb5_error_code
-_gsskrb5cfx_wrap_length_cfx(const gsskrb5_ctx context_handle,
-                           krb5_context context,
+_gsskrb5cfx_wrap_length_cfx(krb5_context context,
                            krb5_crypto crypto,
                            int conf_req_flag,
+                           int dce_style,
                            size_t input_length,
                            size_t *output_length,
                            size_t *cksumsize,
@@ -71,7 +71,7 @@ _gsskrb5cfx_wrap_length_cfx(const gsskrb5_ctx context_handle,
        /* Header is concatenated with data before encryption */
        input_length += sizeof(gss_cfx_wrap_token_desc);
 
-       if (IS_DCE_STYLE(context_handle)) {
+       if (dce_style) {
                ret = krb5_crypto_getblocksize(context, crypto, &padsize);
        } else {
                ret = krb5_crypto_getpadsize(context, crypto, &padsize);
@@ -972,8 +972,9 @@ OM_uint32 _gssapi_wrap_cfx(OM_uint32 *minor_status,
     int32_t seq_number;
     u_char *p;
 
-    ret = _gsskrb5cfx_wrap_length_cfx(ctx, context,
+    ret = _gsskrb5cfx_wrap_length_cfx(context,
                                      ctx->crypto, conf_req_flag,
+                                     IS_DCE_STYLE(ctx),
                                      input_message_buffer->length,
                                      &wrapped_len, &cksumsize, &padlength);
     if (ret != 0) {
index bc9c9ca074f3d879ba9be85e1067c429ea2aa655..b3049c165a0256377328f92a26196753dab25de1 100644 (file)
  * SUCH DAMAGE.
  */
 
-#ifdef HAVE_CONFIG_H
 #include "config.h"
 
-RCSID("$Id$");
-#endif
 
 #ifdef KRB5
 #include <krb5-types.h>
index 179595ae5cd3ee62bb908db1456cf906cce5b6f2..545d9529d36ab6eec6bcf4339fa7a896abca22e0 100644 (file)
  * SUCH DAMAGE.
  */
 
-#ifdef HAVE_CONFIG_H
 #include <config.h>
-#endif
 
-RCSID("$Id$");
 
 #include <stdio.h>
 #include <stdlib.h>
index 5e258dfbcc69dff55ba4a098df7d5d9f1be66170..7dc4823b59e7eb6e3b8abdcfc8dba69b4645e96c 100644 (file)
  * thanks to his work. Thank you Richard.
  */
 
-#ifdef HAVE_CONFIG_H
 #include <config.h>
-RCSID("$Id$");
-#endif
 
 #define HC_DEPRECATED
 
index 4725281d192609b9002d0ef813bad6b09bb031f1..822d5a328bc5cb1af3a9f0c928860689115bca47 100644 (file)
@@ -43,8 +43,6 @@
 
 #include "imath/imath.h"
 
-RCSID("$Id$");
-
 static void
 BN2mpz(mpz_t *s, const BIGNUM *bn)
 {
index b0299395a243d1bb167fc12ce77d27e9968f4cf4..d42ac34fd22533bdaa14c6791fe3d259a843782d 100644 (file)
@@ -35,8 +35,6 @@
 #include <config.h>
 #endif
 
-RCSID("$Id$");
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <dh.h>
index 6606a5e7c1ecc90ecb605c53ef227fb3b89bdf1a..a5bdbabad1651dff3d5154c2b512dd30e23a2839 100644 (file)
  * SUCH DAMAGE.
  */
 
-#ifdef HAVE_CONFIG_H
 #include <config.h>
-#endif
-
-RCSID("$Id$");
 
 #include <stdio.h>
 #include <stdlib.h>
index 61d5f9382514b8c8937f71e7c4be099a3e455391..8066d59cf89f2350c42524cbb2d8d83cd5692a7d 100644 (file)
  * SUCH DAMAGE.
  */
 
-#ifdef HAVE_CONFIG_H
 #include <config.h>
-#endif
-
-RCSID("$Id$");
 
 #include <stdio.h>
 #include <stdlib.h>
index 6897385619f88bf063388659f9313df04bf0ce53..d176e2edfae9179421cbf7801e5d2849b48e65a4 100644 (file)
  * SUCH DAMAGE.
  */
 
-#ifdef HAVE_CONFIG_H
 #include <config.h>
-#endif
-
-RCSID("$Id$");
 
 #define HC_DEPRECATED
 
index e82169c705a50c332b6056aa8fe37b118e97d13e..26254acee5a8a4eedf33bf7ba37afb0c7abfb58f 100644 (file)
  * SUCH DAMAGE.
  */
 
-#ifdef HAVE_CONFIG_H
 #include "config.h"
 
-RCSID("$Id$");
-#endif
-
 #include "hash.h"
 #include "md2.h"
 
index 56e2ac97c617bfac0d53cf48239e050949807a46..435e662a42abf99262d5220bab4532af6789e484 100644 (file)
  * SUCH DAMAGE.
  */
 
-#ifdef HAVE_CONFIG_H
 #include "config.h"
 
-RCSID("$Id$");
-#endif
-
 #include "hash.h"
 #include "md4.h"
 
index ffc7bb9ec6987788474645f4623b731768387486..f99078737b9d1279d81d5082b91bc0e73f0765bd 100644 (file)
  * SUCH DAMAGE.
  */
 
-#ifdef HAVE_CONFIG_H
 #include "config.h"
 
-RCSID("$Id$");
-#endif
-
 #include "hash.h"
 #include "md5.h"
 
index 11afa0b68f938ec152d0b7c69818e60a7a846357..92a40fa69abd9e4d4c4bbd17364eef06412b5f60 100644 (file)
  * SUCH DAMAGE.
  */
 
-#ifdef HAVE_CONFIG_H
 #include <config.h>
-#endif
-
-RCSID("$Id$");
 
 #include <stdio.h>
 #include <stdlib.h>
index 6537561e51418ee690fe5f5190bba8207c95847d..18045e236f2c683764c6316321dac92113d9f5d3 100644 (file)
  * SUCH DAMAGE.
  */
 
-#ifdef HAVE_CONFIG_H
 #include <config.h>
-#endif
-
-RCSID("$Id$");
 
 #ifdef KRB5
 #include <krb5-types.h>
index 168c15114a0035876e2d3f5d1de8aa5d4e10e0fd..00d3286f2482716f26567c0b6c67e4ad988204a7 100644 (file)
  * SUCH DAMAGE.
  */
 
-#ifdef HAVE_CONFIG_H
 #include <config.h>
-#endif
-
-RCSID("$Id$");
 
 #include <sys/types.h>
 #ifdef HAVE_SYS_UN_H
index ebb4e6e180ece99581b72f089c1b1a536b2e91be..c39c71390121c01545b427f099f10ee817cc134b 100644 (file)
  * $PostgreSQL: pgsql/contrib/pgcrypto/fortuna.c,v 1.8 2006/10/04 00:29:46 momjian Exp $
  */
 
-#ifdef HAVE_CONFIG_H
 #include <config.h>
-#endif
-
-RCSID("$Id$");
 
 #include <stdio.h>
 #include <stdlib.h>
index 86ff22c300515cf5d8feee93de56866097e7997b..994c3210e9414fb54474e8efe4c1b1e07059a66b 100644 (file)
  * SUCH DAMAGE.
  */
 
-#ifdef HAVE_CONFIG_H
 #include <config.h>
-#endif
-
-RCSID("$Id$");
 
 #include <stdio.h>
 #include <stdlib.h>
index 07d81eb62041a45ec150da1ec45a3829a1a2e508..2bfa265fa48450da78202f2d2a1f9448cad40a0c 100644 (file)
  * SUCH DAMAGE.
  */
 
-#ifdef HAVE_CONFIG_H
 #include <config.h>
-#endif
-
-RCSID("$Id$");
 
 #include <stdio.h>
 #include <stdlib.h>
index a61c9cdfb2d993c2260319a0adea8c28f71dbc8b..3cd65989c60a1be5ec2114822d6a090e3a36561d 100644 (file)
  * SUCH DAMAGE.
  */
 
-#ifdef HAVE_CONFIG_H
 #include <config.h>
-#endif
-
-RCSID("$Id$");
 
 #include <stdio.h>
 #include <stdlib.h>
index 917914968c1390ecfcd9387808f0293e347eb0d2..dcfe42d02dc5259e09bb76b9f76ad8f0311fd1e1 100644 (file)
  * SUCH DAMAGE.
  */
 
-#ifdef HAVE_CONFIG_H
 #include <config.h>
-RCSID("$Id$");
-#endif
 
 #include "rc2.h"
 #include <stdio.h>
index 9e696f78a2a805abe06a3f8185ac32efe2ff8650..81cf093e4d93f166f5a1faede2ed7f00075b727c 100644 (file)
 
 /* implemented from description in draft-kaukonen-cipher-arcfour-03.txt */
 
-#ifdef HAVE_CONFIG_H
 #include "config.h"
 
-RCSID("$Id$");
-#endif
-
 #include <rc4.h>
 
 #define SWAP(k,x,y)                            \
index 57f13177dfc035ab68293d79f8061e9a3a0313e6..3dd2555812030a84394541cd9f04e1e623dbcae1 100644 (file)
 
 /* "$NetBSD: rijndael-alg-fst.c,v 1.5 2001/11/13 01:40:10 lukem Exp $" */
 
-#ifdef HAVE_CONFIG_H
 #include "config.h"
 
-RCSID("$Id$");
-#endif
 
 #ifdef KRB5
 #include <krb5-types.h>
index 94370513e21383347c3d5be8208e0ee6519bca43..9baf00212c72b6887cdf636d36e4bcab0368cf5e 100644 (file)
  * SUCH DAMAGE.
  */
 
-#ifdef HAVE_CONFIG_H
 #include "config.h"
 
-RCSID("$Id$");
-#endif
 
 #define HC_DEPRECATED
 
index 52402797613af6401d6708346554f32cba455828..2641dc1bc484689c0db97e0fd4c6a29946904367 100644 (file)
  * SUCH DAMAGE.
  */
 
-#ifdef HAVE_CONFIG_H
 #include <config.h>
-#endif
-
-RCSID("$Id$");
 
 #include <stdio.h>
 #include <stdlib.h>
index f3095e7d3dd91404173c5d1618e332094d3ebdfa..9b9ecea674b3d694e0f4c4ca498b4d6d1cfcd560 100644 (file)
  * SUCH DAMAGE.
  */
 
-#ifdef HAVE_CONFIG_H
 #include <config.h>
-#endif
-
-RCSID("$Id$");
 
 #include <stdio.h>
 #include <stdlib.h>
index fd48672784d0f2ed9ec5ed6a3002c59a7ee62483..062f70509c024e83b0d4b3933bfc83bb8b1d029e 100644 (file)
  * SUCH DAMAGE.
  */
 
-#ifdef HAVE_CONFIG_H
 #include "config.h"
 
-RCSID("$Id$");
-#endif
-
 #include "hash.h"
 #include "sha.h"
 
index 922fb055afc5d21e358f0be894f3bb0c762859f9..baa87d15ff0259d888ac85c4c4bcc8dd0277d3ba 100644 (file)
  * SUCH DAMAGE.
  */
 
-#ifdef HAVE_CONFIG_H
 #include "config.h"
 
-RCSID("$Id$");
-#endif
-
 #include "hash.h"
 #include "sha.h"
 
index 91abf76371a0c2cf2e90c716c4cb5dddc8a252e6..ca8c8442b5639d184a6f4a009f2dc0115097cd93 100644 (file)
  * SUCH DAMAGE.
  */
 
-#ifdef HAVE_CONFIG_H
 #include <config.h>
-RCSID("$Id$");
-#endif
 
 #include <stdio.h>
 #include <stdlib.h>
index fe941350307e1b535940c1f550f15b60386839bf..9ece38e1450d079a6aa08c4f07440a01cb2d7e1b 100644 (file)
@@ -291,9 +291,7 @@ krb5_init_context(krb5_context *context)
     *context = NULL;
 
     /* should have a run_once */
-#if defined(HEIMDAL_LOCALEDIR)
     bindtextdomain(HEIMDAL_TEXTDOMAIN, HEIMDAL_LOCALEDIR);
-#endif
 
     p = calloc(1, sizeof(*p));
     if(!p)
@@ -837,30 +835,20 @@ krb5_init_ets(krb5_context context)
 {
     if(context->et_list == NULL){
        krb5_add_et_list(context, initialize_krb5_error_table_r);
-#if defined(HEIMDAL_LOCALEDIR)
        bindtextdomain(COM_ERR_BINDDOMAIN_krb5, HEIMDAL_LOCALEDIR);
-#endif
 
        krb5_add_et_list(context, initialize_asn1_error_table_r);
-#if defined(HEIMDAL_LOCALEDIR)
        bindtextdomain(COM_ERR_BINDDOMAIN_asn1, HEIMDAL_LOCALEDIR);
-#endif
 
        krb5_add_et_list(context, initialize_heim_error_table_r);
-#if defined(HEIMDAL_LOCALEDIR)
        bindtextdomain(COM_ERR_BINDDOMAIN_heim, HEIMDAL_LOCALEDIR);
-#endif
 
        krb5_add_et_list(context, initialize_k524_error_table_r);
-#if defined(HEIMDAL_LOCALEDIR)
        bindtextdomain(COM_ERR_BINDDOMAIN_k524, HEIMDAL_LOCALEDIR);
-#endif
 
 #ifdef PKINIT
        krb5_add_et_list(context, initialize_hx_error_table_r);
-#if defined(HEIMDAL_LOCALEDIR)
        bindtextdomain(COM_ERR_BINDDOMAIN_hx, HEIMDAL_LOCALEDIR);
-#endif
 #endif
     }
 }
index 2d8bc07de39204fdc57f195006a0b0d54c471595..b56219cced3bb66853a7e2f292dde339d894ea26 100644 (file)
@@ -116,7 +116,7 @@ struct sockaddr_dl;
 
 #define HEIMDAL_TEXTDOMAIN "heimdal_krb5"
 
-#ifdef HAVE_LIBINTL_H
+#ifdef LIBINTL
 #include <libintl.h>
 #define N_(x,y) dgettext(HEIMDAL_TEXTDOMAIN, x)
 #else
index 737b2eb8f6dd83ba3fc76160e5e2b72b6bcf724e..a1481b789e577748a8523a10dda62af391f91a3b 100644 (file)
@@ -104,21 +104,45 @@ int ROKEN_LIB_FUNCTION
        rk_unvis(char *, int, int *, int);
 ROKEN_CPP_END
 
+#ifndef HAVE_VIS
 #undef vis
 #define vis(a,b,c,d) rk_vis(a,b,c,d)
+#endif
+
+#ifndef HAVE_SVIS
 #undef svis
 #define svis(a,b,c,d,e) rk_svis(a,b,c,d,e)
+#endif
+
+#ifndef HAVE_STRVIS
 #undef strvis
 #define strvis(a,b,c) rk_strvis(a,b,c)
+#endif
+
+#ifndef HAVE_STRSVIS
 #undef strsvis
 #define strsvis(a,b,c,d) rk_strsvis(a,b,c,d)
+#endif
+
+#ifndef HAVE_STRVISX
 #undef strvisx
 #define strvisx(a,b,c,d) rk_strvisx(a,b,c,d)
+#endif
+
+#ifndef HAVE_STRSVISX
 #undef strsvisx
 #define strsvisx(a,b,c,d,e) rk_strsvisx(a,b,c,d,e)
+#endif
+
+#ifndef HAVE_STRUNVIS
 #undef strunvis
 #define strunvis(a,b) rk_strunvis(a,b)
+#endif
+
+
+#ifndef HAVE_UNVIS
 #undef unvis
 #define unvis(a,b,c,d) rk_unvis(a,b,c,d)
+#endif
 
 #endif /* !_VIS_H_ */