summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTheodore Tso <tytso@mit.edu>1996-11-07 17:11:19 +0000
committerTheodore Tso <tytso@mit.edu>1996-11-07 17:11:19 +0000
commit7c6b692d6797f18ed55f4c8da89b56cac7cf1da2 (patch)
tree92abdbd6621d774589a1073f2b2415ca2d635e2d /src
parent5974691bb3a558a02b60ee91d4161b6667ce7832 (diff)
downloadkrb5-7c6b692d6797f18ed55f4c8da89b56cac7cf1da2.tar.gz
krb5-7c6b692d6797f18ed55f4c8da89b56cac7cf1da2.tar.xz
krb5-7c6b692d6797f18ed55f4c8da89b56cac7cf1da2.zip
alt_prof.c (krb5_aprof_init): If the user specifies the config file
using a configuration file, it must exist. Otherwise, krb5_aprof_init will return an error. (kadm5_get_config_params): If aprof_init returns an error, it should return an error as well. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@9319 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src')
-rw-r--r--src/lib/kadm5/ChangeLog8
-rw-r--r--src/lib/kadm5/alt_prof.c25
2 files changed, 24 insertions, 9 deletions
diff --git a/src/lib/kadm5/ChangeLog b/src/lib/kadm5/ChangeLog
index 169c2e99f..0d735ce5e 100644
--- a/src/lib/kadm5/ChangeLog
+++ b/src/lib/kadm5/ChangeLog
@@ -1,3 +1,11 @@
+Mon Nov 4 21:16:01 1996 Theodore Y. Ts'o <tytso@mit.edu>
+
+ * alt_prof.c (krb5_aprof_init): If the user specifies the config
+ file using a configuration file, it must exist.
+ Otherwise, krb5_aprof_init will return an error.
+ (kadm5_get_config_params): If aprof_init returns an error,
+ it should return an error as well.
+
Wed Nov 6 17:45:43 1996 Barry Jaspan <bjaspan@mit.edu>
* kadm_rpc_xdr.c (xdr_krb5_principal): handle a NULL principal
diff --git a/src/lib/kadm5/alt_prof.c b/src/lib/kadm5/alt_prof.c
index 374e22706..247050d49 100644
--- a/src/lib/kadm5/alt_prof.c
+++ b/src/lib/kadm5/alt_prof.c
@@ -55,18 +55,24 @@ krb5_aprof_init(fname, envname, acontextp)
profile = (profile_t) NULL;
if (envname) {
if ((namelist[0] = getenv(envname))) {
- if (!(kret = profile_init(namelist, &profile))) {
- *acontextp = (krb5_pointer) profile;
- return(0);
- }
+ kret = profile_init(namelist, &profile);
+ if (kret)
+ return kret;
+ *acontextp = (krb5_pointer) profile;
+ return 0;
}
}
profile = (profile_t) NULL;
- if (fname && !(kret = profile_init_path(fname, &profile))) {
+ if (fname) {
+ kret = profile_init_path(fname, &profile);
+ if (kret == ENOENT) {
+ profile = 0;
+ } else if (kret)
+ return kret;
*acontextp = (krb5_pointer) profile;
- return(0);
+ return 0;
}
- return(kret);
+ return 0;
}
/*
@@ -319,8 +325,9 @@ krb5_error_code kadm5_get_config_params(context, kdcprofile, kdcenv,
if (context->profile_secure == TRUE) envname = 0;
}
- /* ignore failures */
- (void) krb5_aprof_init(filename, envname, &aprofile);
+ kret = krb5_aprof_init(filename, envname, &aprofile);
+ if (kret)
+ goto cleanup;
/* Initialize realm parameters */
hierarchy[0] = "realms";