diff options
author | Michael Adam <obnox@samba.org> | 2008-08-15 00:44:14 +0200 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2008-08-15 23:19:57 +0200 |
commit | 25f31194e5adcf66a8c2599da6be92fff8590d22 (patch) | |
tree | 6fdbdce14262abbf2d43d95ee59b52fb1ba068f1 | |
parent | e069372ef887fdbb2985a926f2c4d4db17835522 (diff) | |
download | samba-25f31194e5adcf66a8c2599da6be92fff8590d22.tar.gz samba-25f31194e5adcf66a8c2599da6be92fff8590d22.tar.bz2 samba-25f31194e5adcf66a8c2599da6be92fff8590d22.zip |
Add modules_path() to construct paths to files in MODULESDIR.
Michael
(This used to be commit 5ef9da6f4f04b07804b389902862fae0fbbfed13)
-rw-r--r-- | source3/include/proto.h | 1 | ||||
-rw-r--r-- | source3/lib/util.c | 13 |
2 files changed, 14 insertions, 0 deletions
diff --git a/source3/include/proto.h b/source3/include/proto.h index 7929033f91..db1adb64ee 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -1340,6 +1340,7 @@ char *myhostname(void); char *lock_path(const char *name); char *pid_path(const char *name); char *lib_path(const char *name); +char *modules_path(const char *name); char *data_path(const char *name); char *state_path(const char *name); const char *shlib_ext(void); diff --git a/source3/lib/util.c b/source3/lib/util.c index 0fdc9956f1..201d87aeb5 100644 --- a/source3/lib/util.c +++ b/source3/lib/util.c @@ -2603,6 +2603,19 @@ char *lib_path(const char *name) } /** + * @brief Returns an absolute path to a file in the Samba modules directory. + * + * @param name File to find, relative to MODULESDIR. + * + * @retval Pointer to a string containing the full path. + **/ + +char *modules_path(const char *name) +{ + return talloc_asprintf(talloc_tos(), "%s/%s", get_dyn_MODULESDIR(), name); +} + +/** * @brief Returns an absolute path to a file in the Samba data directory. * * @param name File to find, relative to CODEPAGEDIR. |