diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/include/pg_config.h.in | 3 | ||||
-rw-r--r-- | src/interfaces/libpq/fe-auth.c | 16 | ||||
-rw-r--r-- | src/tools/msvc/Solution.pm | 3 |
3 files changed, 19 insertions, 3 deletions
diff --git a/src/include/pg_config.h.in b/src/include/pg_config.h.in index 2381c20da17..e2962d123c7 100644 --- a/src/include/pg_config.h.in +++ b/src/include/pg_config.h.in @@ -214,6 +214,9 @@ /* Define to 1 if `text.data' is member of `krb5_error'. */ #undef HAVE_KRB5_ERROR_TEXT_DATA +/* Define to 1 if you have krb5_free_unparsed_name */ +#undef HAVE_KRB5_FREE_UNPARSED_NAME + /* Define to 1 if `client' is member of `krb5_ticket'. */ #undef HAVE_KRB5_TICKET_CLIENT diff --git a/src/interfaces/libpq/fe-auth.c b/src/interfaces/libpq/fe-auth.c index 8e6dca6fb05..f19ef07671d 100644 --- a/src/interfaces/libpq/fe-auth.c +++ b/src/interfaces/libpq/fe-auth.c @@ -10,7 +10,7 @@ * exceed INITIAL_EXPBUFFER_SIZE (currently 256 bytes). * * IDENTIFICATION - * $PostgreSQL: pgsql/src/interfaces/libpq/fe-auth.c,v 1.124 2007/07/10 13:14:21 mha Exp $ + * $PostgreSQL: pgsql/src/interfaces/libpq/fe-auth.c,v 1.125 2007/07/12 14:10:39 mha Exp $ * *------------------------------------------------------------------------- */ @@ -64,6 +64,18 @@ #endif /* + * Heimdal doesn't have a free function for unparsed names. Just pass it to + * standard free() which should work in these cases. + */ +#ifndef HAVE_KRB5_FREE_UNPARSED_NAME +static void +krb5_free_unparsed_name(krb5_context context, char *val) +{ + free(val); +} +#endif + +/* * pg_an_to_ln -- return the local name corresponding to an authentication * name * @@ -180,8 +192,8 @@ pg_krb5_destroy(struct krb5_info * info) { krb5_free_principal(info->pg_krb5_context, info->pg_krb5_client); krb5_cc_close(info->pg_krb5_context, info->pg_krb5_ccache); + krb5_free_unparsed_name(info->pg_krb5_context, info->pg_krb5_name); krb5_free_context(info->pg_krb5_context); - free(info->pg_krb5_name); } diff --git a/src/tools/msvc/Solution.pm b/src/tools/msvc/Solution.pm index d8c883f6767..78844e3d973 100644 --- a/src/tools/msvc/Solution.pm +++ b/src/tools/msvc/Solution.pm @@ -3,7 +3,7 @@ package Solution; # # Package that encapsulates a Visual C++ solution file generation # -# $PostgreSQL: pgsql/src/tools/msvc/Solution.pm,v 1.27 2007/06/20 17:19:00 adunstan Exp $ +# $PostgreSQL: pgsql/src/tools/msvc/Solution.pm,v 1.28 2007/07/12 14:10:39 mha Exp $ # use Carp; use strict; @@ -123,6 +123,7 @@ s{PG_VERSION_STR "[^"]+"}{__STRINGIFY(x) #x\n#define __STRINGIFY2(z) __STRINGIFY print O "#define KRB5 1\n"; print O "#define HAVE_KRB5_ERROR_TEXT_DATA 1\n"; print O "#define HAVE_KRB5_TICKET_ENC_PART2 1\n"; + print O "#define HAVE_KRB5_FREE_UNPARSED_NAME 1\n"; print O "#define PG_KRB_SRVNAM \"postgres\"\n"; } if (my $port = $self->{options}->{"--with-pgport"}) |