From d5bbd817fe83aed1ee48ed4f478f3887c059f7b9 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 24 Jan 2007 02:48:40 +0000 Subject: r20988: Call out to Heimdal's krb5.conf processing to configure many aspects of KDC behaviour. This should allow PKINIT to be turned on and managed with reasonable sanity. This also means that the krb5.conf in the same directory as the smb.conf will always have priority in Samba4, which I think will be useful. Andrew Bartlett (This used to be commit a50bbde81b010bc5d06e3fc3417ade44627eb771) --- source4/param/util.c | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'source4/param') diff --git a/source4/param/util.c b/source4/param/util.c index 2453094798..82f57a605b 100644 --- a/source4/param/util.c +++ b/source4/param/util.c @@ -122,6 +122,28 @@ _PUBLIC_ char *data_path(TALLOC_CTX* mem_ctx, const char *name) return fname; } +/** + * @brief Returns an absolute path to a file in the directory containing the current config file + * + * @param name File to find, relative to the config file directory. + * + * @retval Pointer to a talloc'ed string containing the full path. + **/ + +_PUBLIC_ char *config_path(TALLOC_CTX* mem_ctx, const char *name) +{ + char *fname, *config_dir, *p; + config_dir = talloc_strdup(mem_ctx, lp_configfile()); + p = strrchr(config_dir, '/'); + if (!p) { + return NULL; + } + p[0] = '\0'; + fname = talloc_asprintf(mem_ctx, "%s/%s", config_dir, name); + talloc_free(config_dir); + return fname; +} + /** * @brief Returns an absolute path to a file in the Samba private directory. * -- cgit