diff options
author | Theodore Tso <tytso@mit.edu> | 1995-06-07 19:22:30 +0000 |
---|---|---|
committer | Theodore Tso <tytso@mit.edu> | 1995-06-07 19:22:30 +0000 |
commit | 551b55bd3887f8108c5cde71cddf686a078f5bb0 (patch) | |
tree | e55d1db4d195478e0545df15574b97bbc9785a6c /src/lib/krb5/os/def_realm.c | |
parent | ec2a34fa1097ff0a2725fd47596b404ee8e385af (diff) | |
download | krb5-551b55bd3887f8108c5cde71cddf686a078f5bb0.tar.gz krb5-551b55bd3887f8108c5cde71cddf686a078f5bb0.tar.xz krb5-551b55bd3887f8108c5cde71cddf686a078f5bb0.zip |
def_realm.c (krb5_get_default_realm), get_krbhst.c
(krb5_get_krbhst), hst_realm.c (krb5_get_host_realm),
init_os_ctx.c (krb5_os_init_context), osconfig.c,
realm_dom.c (krb5_get_realm_domain): Remove old ifdef'ed
code which read in krb.conf and krb.realms.
read_pwd.c (krb5_read_password): Remove old #ifdef notdef code.
Significantly simplified and cleaned up function.
Removed BSD 4.3 compatibility code. (If we ever need
to make this work on a non-POSIX system, we'll supply
POSIX termios emulation functions in src/lib/krb5/posix.)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@5964 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/lib/krb5/os/def_realm.c')
-rw-r--r-- | src/lib/krb5/os/def_realm.c | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/src/lib/krb5/os/def_realm.c b/src/lib/krb5/os/def_realm.c index f028c65e4b..fbff2d5efe 100644 --- a/src/lib/krb5/os/def_realm.c +++ b/src/lib/krb5/os/def_realm.c @@ -49,10 +49,6 @@ krb5_get_default_realm(context, lrealm) krb5_context context; char **lrealm; { -#ifdef OLD_CONFIG_FILE - FILE *config_file; - char realmbuf[BUFSIZ]; -#endif char *realm; char *cp; @@ -60,32 +56,6 @@ krb5_get_default_realm(context, lrealm) return KV5M_CONTEXT; if (!context->default_realm) { -#ifdef OLD_CONFIG_FILE - krb5_find_config_files(); - if (!(config_file = fopen(krb5_config_file, "r"))) - /* can't open */ - return KRB5_CONFIG_CANTOPEN; - - if (fgets(realmbuf, sizeof(realmbuf), config_file) == NULL) { - fclose(config_file); - return(KRB5_CONFIG_BADFORMAT); - } - fclose(config_file); - - realmbuf[BUFSIZ-1] = '0'; - cp = strchr(realmbuf, '\n'); - if (cp) - *cp = '\0'; - cp = strchr(realmbuf, ' '); - if (cp) - *cp = '\0'; - - context->default_realm = malloc(strlen (realmbuf) + 1); - if (!context->default_realm) - return ENOMEM; - - strcpy(context->default_realm, realmbuf); -#else /* * XXX should try to figure out a reasonable default based * on the host's DNS domain. @@ -96,7 +66,6 @@ krb5_get_default_realm(context, lrealm) &context->default_realm); if (context->default_realm == 0) return(KRB5_CONFIG_BADFORMAT); -#endif } realm = context->default_realm; |