summaryrefslogtreecommitdiffstats
path: root/crypto/heimdal/lib/krb5/get_default_realm.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/heimdal/lib/krb5/get_default_realm.c')
-rw-r--r--crypto/heimdal/lib/krb5/get_default_realm.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/crypto/heimdal/lib/krb5/get_default_realm.c b/crypto/heimdal/lib/krb5/get_default_realm.c
index 74a880d..09c8577 100644
--- a/crypto/heimdal/lib/krb5/get_default_realm.c
+++ b/crypto/heimdal/lib/krb5/get_default_realm.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997 - 2001 Kungliga Tekniska Högskolan
+ * Copyright (c) 1997 - 2001, 2004 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
@@ -33,14 +33,14 @@
#include "krb5_locl.h"
-RCSID("$Id: get_default_realm.c,v 1.10 2001/07/19 16:55:27 assar Exp $");
+RCSID("$Id: get_default_realm.c 13863 2004-05-25 21:46:46Z lha $");
/*
* Return a NULL-terminated list of default realms in `realms'.
* Free this memory with krb5_free_host_realm.
*/
-krb5_error_code
+krb5_error_code KRB5_LIB_FUNCTION
krb5_get_default_realms (krb5_context context,
krb5_realm **realms)
{
@@ -56,22 +56,22 @@ krb5_get_default_realms (krb5_context context,
}
/*
- * Return the first default realm. For compatability.
+ * Return the first default realm. For compatibility.
*/
-krb5_error_code
+krb5_error_code KRB5_LIB_FUNCTION
krb5_get_default_realm(krb5_context context,
krb5_realm *realm)
{
+ krb5_error_code ret;
char *res;
if (context->default_realms == NULL
|| context->default_realms[0] == NULL) {
- krb5_error_code ret = krb5_set_default_realm (context, NULL);
- if (ret) {
- krb5_set_error_string(context, "no default realm configured");
- return KRB5_CONFIG_NODEFREALM;
- }
+ krb5_clear_error_string(context);
+ ret = krb5_set_default_realm (context, NULL);
+ if (ret)
+ return ret;
}
res = strdup (context->default_realms[0]);
OpenPOWER on IntegriCloud