Add modules_path() to construct paths to files in MODULESDIR.
authorMichael Adam <obnox@samba.org>
Thu, 14 Aug 2008 22:44:14 +0000 (00:44 +0200)
committerMichael Adam <obnox@samba.org>
Fri, 15 Aug 2008 21:19:57 +0000 (23:19 +0200)
Michael
(This used to be commit 5ef9da6f4f04b07804b389902862fae0fbbfed13)

source3/include/proto.h
source3/lib/util.c

index 7929033f9178f37336657776f7ddefed0eacdfe2..db1adb64eec57988b351685dddcf5d9f8a255079 100644 (file)
@@ -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 *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);
 char *data_path(const char *name);
 char *state_path(const char *name);
 const char *shlib_ext(void);
index 0fdc9956f1273eb8ffc8e8ac50e9c9c27fb53320..201d87aeb5cf51a9eddea8cdd0d914ecc5e0737f 100644 (file)
@@ -2602,6 +2602,19 @@ char *lib_path(const char *name)
        return talloc_asprintf(talloc_tos(), "%s/%s", get_dyn_LIBDIR(), name);
 }
 
        return talloc_asprintf(talloc_tos(), "%s/%s", get_dyn_LIBDIR(), 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.
  *
 /**
  * @brief Returns an absolute path to a file in the Samba data directory.
  *