summaryrefslogtreecommitdiff
path: root/source3/lib/util.c
diff options
context:
space:
mode:
authorMartin Pool <mbp@samba.org>2001-11-19 03:35:27 +0000
committerMartin Pool <mbp@samba.org>2001-11-19 03:35:27 +0000
commitcaef2d2884fb202bd6184f9a676ecff94c7ab600 (patch)
treed092a13a127929ef7255bbc2e69a9dd36c2f00fe /source3/lib/util.c
parent4ea31fb67595ae8705701bd9fb8d8a993c4013fb (diff)
downloadsamba-caef2d2884fb202bd6184f9a676ecff94c7ab600.tar.gz
samba-caef2d2884fb202bd6184f9a676ecff94c7ab600.tar.bz2
samba-caef2d2884fb202bd6184f9a676ecff94c7ab600.zip
LIBDIR and LOCKDIR are dynamically configured too.
(This used to be commit 868999ad3c82ad72f11d5b3208b0e42b1ed95096)
Diffstat (limited to 'source3/lib/util.c')
-rw-r--r--source3/lib/util.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/source3/lib/util.c b/source3/lib/util.c
index 81e30aa8e3..ea39d8a05b 100644
--- a/source3/lib/util.c
+++ b/source3/lib/util.c
@@ -1782,13 +1782,18 @@ char *lock_path(char *name)
return fname;
}
-/*****************************************************************
-a useful function for returning a path in the Samba lib directory
- *****************************************************************/
+
+/**
+ * @brief Returns an absolute path to a file in the Samba lib directory.
+ *
+ * @param name File to find, relative to LIBDIR.
+ *
+ * @retval Pointer to a static #pstring containing the full path.
+ **/
char *lib_path(char *name)
{
static pstring fname;
- snprintf(fname, sizeof(fname), "%s/%s", LIBDIR, name);
+ snprintf(fname, sizeof(fname), "%s/%s", dyn_LIBDIR, name);
return fname;
}