summaryrefslogtreecommitdiff
path: root/source3/smbd/mangle.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/smbd/mangle.c')
-rw-r--r--source3/smbd/mangle.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/source3/smbd/mangle.c b/source3/smbd/mangle.c
index d7f2eb8db2..f69c940539 100644
--- a/source3/smbd/mangle.c
+++ b/source3/smbd/mangle.c
@@ -112,6 +112,21 @@ BOOL mangle_check_cache(char *s, size_t maxlen,
return mangle_fns->check_cache(s, maxlen, p);
}
+BOOL mangle_check_cache_alloc(const char *name, char **presult,
+ const struct share_params *p)
+{
+ pstring tmp;
+ char *result;
+ pstrcpy(tmp, name);
+
+ if (!mangle_check_cache(tmp, sizeof(pstring), p)
+ || !(result = SMB_STRDUP(tmp))) {
+ return False;
+ }
+ *presult = result;
+ return True;
+}
+
/*
map a long filename to a 8.3 name.
*/