diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-12-14 01:46:25 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2007-12-21 05:50:14 +0100 |
commit | bf6d40f271682e87224102afd0855cee8916202e (patch) | |
tree | fdf50f1f64e0672246222e0300794c5ba9c2bddf | |
parent | 864218b6beebaeb337f14398f0544340ad30dd58 (diff) | |
download | samba-bf6d40f271682e87224102afd0855cee8916202e.tar.gz samba-bf6d40f271682e87224102afd0855cee8916202e.tar.bz2 samba-bf6d40f271682e87224102afd0855cee8916202e.zip |
r26449: Support configuration without a known configuration dir.
(This used to be commit d3643c2152a490952e59ee15b7a62ad3ad465462)
-rw-r--r-- | source4/auth/kerberos/krb5_init_context.c | 2 | ||||
-rw-r--r-- | source4/param/util.c | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/source4/auth/kerberos/krb5_init_context.c b/source4/auth/kerberos/krb5_init_context.c index acf26cdbe2..a455fda398 100644 --- a/source4/auth/kerberos/krb5_init_context.c +++ b/source4/auth/kerberos/krb5_init_context.c @@ -403,7 +403,7 @@ krb5_error_code smb_krb5_init_context(void *parent_ctx, } /* Use our local krb5.conf file by default */ - ret = krb5_prepend_config_files_default(config_file, &config_files); + ret = krb5_prepend_config_files_default(config_file == NULL?"":config_file, &config_files); if (ret) { DEBUG(1,("krb5_prepend_config_files_default failed (%s)\n", smb_get_krb5_error_message((*smb_krb5_context)->krb5_context, ret, tmp_ctx))); diff --git a/source4/param/util.c b/source4/param/util.c index 4d4e562590..1cf05d4fa7 100644 --- a/source4/param/util.c +++ b/source4/param/util.c @@ -106,6 +106,9 @@ _PUBLIC_ char *config_path(TALLOC_CTX* mem_ctx, struct loadparm_context *lp_ctx, { char *fname, *config_dir, *p; config_dir = talloc_strdup(mem_ctx, lp_configfile(lp_ctx)); + if (config_dir == NULL) { + return NULL; + } p = strrchr(config_dir, '/'); if (p == NULL) { return NULL; |