diff options
Diffstat (limited to 'source3')
-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. |