X-Git-Url: http://git.samba.org/?a=blobdiff_plain;f=source3%2Flib%2Futil.c;h=303fa8b4bc64910439cda631762d9f3d85bdc372;hb=640870ee2089536d2f7bda035668c96e8b364e54;hp=320fdc2e0e49b2916564fae315edaea760b41ea0;hpb=c281573399584228e2a1b567a5507f459c94f6ad;p=obnox%2Fsamba%2Fsamba-obnox.git diff --git a/source3/lib/util.c b/source3/lib/util.c index 320fdc2e0e4..303fa8b4bc6 100644 --- a/source3/lib/util.c +++ b/source3/lib/util.c @@ -1496,71 +1496,6 @@ char *myhostname_upper(void) return ret; } -/** - * @brief Returns an absolute path to a file concatenating the provided - * @a rootpath and @a basename - * - * @param name Filename, relative to @a rootpath - * - * @retval Pointer to a string containing the full path. - **/ - -static char *xx_path(const char *name, const char *rootpath) -{ - char *fname = NULL; - - fname = talloc_strdup(talloc_tos(), rootpath); - if (!fname) { - return NULL; - } - trim_string(fname,"","/"); - - if (!directory_create_or_exist(fname, 0755)) { - return NULL; - } - - return talloc_asprintf_append(fname, "/%s", name); -} - -/** - * @brief Returns an absolute path to a file in the Samba lock directory. - * - * @param name File to find, relative to LOCKDIR. - * - * @retval Pointer to a talloc'ed string containing the full path. - **/ - -char *lock_path(const char *name) -{ - return xx_path(name, lp_lock_directory()); -} - -/** - * @brief Returns an absolute path to a file in the Samba state directory. - * - * @param name File to find, relative to STATEDIR. - * - * @retval Pointer to a talloc'ed string containing the full path. - **/ - -char *state_path(const char *name) -{ - return xx_path(name, lp_state_directory()); -} - -/** - * @brief Returns an absolute path to a file in the Samba cache directory. - * - * @param name File to find, relative to CACHEDIR. - * - * @retval Pointer to a talloc'ed string containing the full path. - **/ - -char *cache_path(const char *name) -{ - return xx_path(name, lp_cache_directory()); -} - /******************************************************************* Given a filename - get its directory name ********************************************************************/