encrypt_tk.o \
etype_list.o \
fast.o \
- free_rtree.o \
fwd_tgt.o \
gc_frm_kdc.o \
gc_via_tkt.o \
$(OUTPRE)encrypt_tk.$(OBJEXT) \
$(OUTPRE)etype_list.$(OBJEXT) \
$(OUTPRE)fast.$(OBJEXT) \
- $(OUTPRE)free_rtree.$(OBJEXT) \
$(OUTPRE)fwd_tgt.$(OBJEXT) \
$(OUTPRE)gc_frm_kdc.$(OBJEXT) \
$(OUTPRE)gc_via_tkt.$(OBJEXT) \
$(srcdir)/encrypt_tk.c \
$(srcdir)/etype_list.c \
$(srcdir)/fast.c \
- $(srcdir)/free_rtree.c \
$(srcdir)/fwd_tgt.c \
$(srcdir)/gc_frm_kdc.c \
$(srcdir)/gc_via_tkt.c \
COMERRLIB=$(TOPLIBD)/libcom_err.a
T_WALK_RTREE_OBJS= t_walk_rtree.o walk_rtree.o tgtname.o unparse.o \
- free_rtree.o bld_pr_ext.o copy_data.o
+ bld_pr_ext.o copy_data.o
T_KERB_OBJS= t_kerb.o conv_princ.o unparse.o set_realm.o str_conv.o
*new_list = list;
return 0;
}
-
+++ /dev/null
-/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
-/*
- * lib/krb5/krb/free_rtree.c
- *
- * Copyright 1990 by the Massachusetts Institute of Technology.
- * All Rights Reserved.
- *
- * Export of this software from the United States of America may
- * require a specific license from the United States Government.
- * It is the responsibility of any person or organization contemplating
- * export to obtain such a license before exporting.
- *
- * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
- * distribute this software and its documentation for any purpose and
- * without fee is hereby granted, provided that the above copyright
- * notice appear in all copies and that both that copyright notice and
- * this permission notice appear in supporting documentation, and that
- * the name of M.I.T. not be used in advertising or publicity pertaining
- * to distribution of the software without specific, written prior
- * permission. Furthermore if you modify this software you must label
- * your software as modified software and not distribute it in such a
- * fashion that it might be confused with the original M.I.T. software.
- * M.I.T. makes no representations about the suitability of
- * this software for any purpose. It is provided "as is" without express
- * or implied warranty.
- *
- *
- * krb5_free_realm_tree()
- */
-
-#include "k5-int.h"
-
-void
-krb5_free_realm_tree(krb5_context context, krb5_principal *realms)
-{
- register krb5_principal *nrealms = realms;
- if (realms == NULL)
- return;
- while (*nrealms) {
- krb5_free_principal(context, *nrealms);
- nrealms++;
- }
- free(realms);
-}
* or implied warranty.
*
* krb5_walk_realm_tree()
+ * krb5_free_realm_tree()
*
* internal function, used by krb5_get_cred_from_kdc()
*/
};
static krb5_error_code
-rtree_capath_tree(
- krb5_context context,
- const krb5_data *client,
- const krb5_data *server,
- char **vals,
- krb5_principal **tree);
+rtree_capath_tree(krb5_context context,
+ const krb5_data *client,
+ const krb5_data *server,
+ char **vals,
+ krb5_principal **tree);
static krb5_error_code
-rtree_capath_vals(
- krb5_context context,
- const krb5_data *client,
- const krb5_data *server,
- char ***vals);
+rtree_capath_vals(krb5_context context,
+ const krb5_data *client,
+ const krb5_data *server,
+ char ***vals);
static krb5_error_code
-rtree_hier_tree(
- krb5_context context,
- const krb5_data *client,
- const krb5_data *server,
- krb5_principal **rettree,
- int sep);
+rtree_hier_tree(krb5_context context,
+ const krb5_data *client,
+ const krb5_data *server,
+ krb5_principal **rettree,
+ int sep);
static krb5_error_code
-rtree_hier_realms(
- krb5_context context,
- const krb5_data *client,
- const krb5_data *server,
- krb5_data **realms,
- size_t *nrealms,
- int sep);
+rtree_hier_realms(krb5_context context,
+ const krb5_data *client,
+ const krb5_data *server,
+ krb5_data **realms,
+ size_t *nrealms,
+ int sep);
static void
-free_realmlist(
- krb5_context context,
- krb5_data *realms,
- size_t nrealms);
+free_realmlist(krb5_context context,
+ krb5_data *realms,
+ size_t nrealms);
static krb5_error_code
-rtree_hier_tweens(
- krb5_context context,
- struct hstate *realm,
- krb5_data **tweens,
- size_t *ntweens,
- int dotail,
- int sep);
+rtree_hier_tweens(krb5_context context,
+ struct hstate *realm,
+ krb5_data **tweens,
+ size_t *ntweens,
+ int dotail,
+ int sep);
static void
adjtail(struct hstate *c, struct hstate *s, int sep);
comtail(struct hstate *c, struct hstate *s, int sep);
krb5_error_code
-krb5_walk_realm_tree(
- krb5_context context,
- const krb5_data *client,
- const krb5_data *server,
- krb5_principal **tree,
- int realm_sep)
+krb5_walk_realm_tree( krb5_context context,
+ const krb5_data *client,
+ const krb5_data *server,
+ krb5_principal **tree,
+ int realm_sep)
{
krb5_error_code retval = 0;
char **capvals;
* walk_rtree_capath_vals().
*/
static krb5_error_code
-rtree_capath_tree(
- krb5_context context,
- const krb5_data *client,
- const krb5_data *server,
- char **vals,
- krb5_principal **rettree)
+rtree_capath_tree(krb5_context context,
+ const krb5_data *client,
+ const krb5_data *server,
+ char **vals,
+ krb5_principal **rettree)
{
krb5_error_code retval = 0;
unsigned int nvals, nlinks, nprincs, i;
* by not finding anything.
*/
static krb5_error_code
-rtree_capath_vals(
- krb5_context context,
- const krb5_data *client,
- const krb5_data *server,
- char ***vals)
+rtree_capath_vals(krb5_context context,
+ const krb5_data *client,
+ const krb5_data *server,
+ char ***vals)
{
krb5_error_code retval = 0;
/* null-terminated realm names */
* Build tree by hierarchical traversal.
*/
static krb5_error_code
-rtree_hier_tree(
- krb5_context context,
- const krb5_data *client,
- const krb5_data *server,
- krb5_principal **rettree,
- int sep)
+rtree_hier_tree(krb5_context context,
+ const krb5_data *client,
+ const krb5_data *server,
+ krb5_principal **rettree,
+ int sep)
{
krb5_error_code retval;
krb5_data *realms;
* Construct list of realms between client and server.
*/
static krb5_error_code
-rtree_hier_realms(
- krb5_context context,
- const krb5_data *client,
- const krb5_data *server,
- krb5_data **realms,
- size_t *nrealms,
- int sep)
+rtree_hier_realms(krb5_context context,
+ const krb5_data *client,
+ const krb5_data *server,
+ krb5_data **realms,
+ size_t *nrealms,
+ int sep)
{
krb5_error_code retval;
struct hstate c, s;
}
static void
-free_realmlist(
- krb5_context context,
- krb5_data *realms,
- size_t nrealms)
+free_realmlist(krb5_context context,
+ krb5_data *realms,
+ size_t nrealms)
{
size_t i;
* make copies as needed and not call krb5_free_data_contents, etc.
*/
static krb5_error_code
-rtree_hier_tweens(
- krb5_context context,
- struct hstate *realm,
- krb5_data **tweens,
- size_t *ntweens,
- int dotail,
- int sep)
+rtree_hier_tweens(krb5_context context,
+ struct hstate *realm,
+ krb5_data **tweens,
+ size_t *ntweens,
+ int dotail,
+ int sep)
{
char *p, *r, *rtail, *lp;
size_t rlen, n;
c->dot = cdot;
s->dot = sdot;
}
+
+void
+krb5_free_realm_tree(krb5_context context, krb5_principal *realms)
+{
+ register krb5_principal *nrealms = realms;
+ if (realms == NULL)
+ return;
+ while (*nrealms) {
+ krb5_free_principal(context, *nrealms);
+ nrealms++;
+ }
+ free(realms);
+}
dnsglue.o \
dnssrv.o \
free_krbhs.o \
- free_hstrl.o \
full_ipadr.o \
get_krbhst.o \
gen_port.o \
$(OUTPRE)dnsglue.$(OBJEXT) \
$(OUTPRE)dnssrv.$(OBJEXT) \
$(OUTPRE)free_krbhs.$(OBJEXT) \
- $(OUTPRE)free_hstrl.$(OBJEXT) \
$(OUTPRE)full_ipadr.$(OBJEXT) \
$(OUTPRE)get_krbhst.$(OBJEXT) \
$(OUTPRE)gen_port.$(OBJEXT) \
$(srcdir)/dnsglue.c \
$(srcdir)/dnssrv.c \
$(srcdir)/free_krbhs.c \
- $(srcdir)/free_hstrl.c \
$(srcdir)/full_ipadr.c \
$(srcdir)/get_krbhst.c \
$(srcdir)/gen_port.c \
+++ /dev/null
-/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
-/*
- * lib/krb5/os/free_hstrl.c
- *
- * Copyright 1990 by the Massachusetts Institute of Technology.
- * All Rights Reserved.
- *
- * Export of this software from the United States of America may
- * require a specific license from the United States Government.
- * It is the responsibility of any person or organization contemplating
- * export to obtain such a license before exporting.
- *
- * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
- * distribute this software and its documentation for any purpose and
- * without fee is hereby granted, provided that the above copyright
- * notice appear in all copies and that both that copyright notice and
- * this permission notice appear in supporting documentation, and that
- * the name of M.I.T. not be used in advertising or publicity pertaining
- * to distribution of the software without specific, written prior
- * permission. Furthermore if you modify this software you must label
- * your software as modified software and not distribute it in such a
- * fashion that it might be confused with the original M.I.T. software.
- * M.I.T. makes no representations about the suitability of
- * this software for any purpose. It is provided "as is" without express
- * or implied warranty.
- *
- *
- * krb5_free_host_realm()
- */
-
-#include "k5-int.h"
-#include <stdio.h>
-
-/*
- Frees the storage taken by a realm list returned by krb5_get_host_realm.
-*/
-
-krb5_error_code KRB5_CALLCONV
-krb5_free_host_realm(krb5_context context, char *const *realmlist)
-{
- /* same format, so why duplicate code? */
- return krb5_free_krbhst(context, realmlist);
-}
/*
* lib/krb5/os/hst_realm.c
*
- * Copyright 1990,1991,2002,2008 by the Massachusetts Institute of Technology.
+ * Copyright 1990,1991,2002,2008,2009 by the Massachusetts Institute of Technology.
* All Rights Reserved.
*
* Export of this software from the United States of America may
*
*
* krb5_get_host_realm()
+ * krb5_get_fallback_host_realm()
+ * krb5int_clean_hostname()
+ * krb5_free_host_realm()
*/
krb5_error_code krb5int_translate_gai_error (int);
static krb5_error_code
-krb5int_get_fq_hostname (char *buf, size_t bufsize, const char *name)
+get_fq_hostname(char *buf, size_t bufsize, const char *name)
{
struct addrinfo *ai, hints;
int err;
Always return a null-terminated string.
Might return an error if gethostname fails. */
krb5_error_code
-krb5int_get_fq_local_hostname (char *buf, size_t bufsiz)
+krb5int_get_fq_local_hostname(char *buf, size_t bufsiz)
{
buf[0] = 0;
if (gethostname (buf, bufsiz) == -1)
return SOCKET_ERRNO;
buf[bufsiz - 1] = 0;
- return krb5int_get_fq_hostname (buf, bufsiz, buf);
+ return get_fq_hostname (buf, bufsiz, buf);
}
krb5_error_code KRB5_CALLCONV
*/
krb5_error_code KRB5_CALLCONV
-krb5_get_fallback_host_realm(krb5_context context, krb5_data *hdata, char ***realmsp)
+krb5_get_fallback_host_realm(krb5_context context,
+ krb5_data *hdata, char ***realmsp)
{
char **retrealms;
char *realm, *cp;
* to do basic sanity checks on supplied hostname.
*/
krb5_error_code KRB5_CALLCONV
-krb5int_clean_hostname(krb5_context context, const char *host, char *local_host, size_t lhsize)
+krb5int_clean_hostname(krb5_context context,
+ const char *host, char *local_host, size_t lhsize)
{
char *cp;
krb5_error_code retval;
free(fqdn);
return retval;
}
+
+/*
+ * Frees the storage taken by a realm list returned by krb5_get_host_realm.
+ */
+
+krb5_error_code KRB5_CALLCONV
+krb5_free_host_realm(krb5_context context, char *const *realmlist)
+{
+ /* same format, so why duplicate code? */
+ return krb5_free_krbhst(context, realmlist);
+}