summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2006-07-14 22:06:38 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:19:21 -0500
commit2203228c791761bcab07961da725488636bee8df (patch)
tree2245b08d76f4d9d95f4fc97361964cc8f5a3b15d /source3/lib
parent5b474afa74697321a24e952c63e60bcb1e84dced (diff)
downloadsamba-2203228c791761bcab07961da725488636bee8df.tar.gz
samba-2203228c791761bcab07961da725488636bee8df.tar.bz2
samba-2203228c791761bcab07961da725488636bee8df.zip
r17039: Eliminate snum from enumshares and getshareinfo. Get rid of some pstrings.
Volker (This used to be commit c5e393d5eda4e13a844171d9ff319d1f1bac3d84)
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/substitute.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/source3/lib/substitute.c b/source3/lib/substitute.c
index 430c8029b8..25a6a2c4c8 100644
--- a/source3/lib/substitute.c
+++ b/source3/lib/substitute.c
@@ -665,7 +665,7 @@ char *talloc_sub_specified(TALLOC_CTX *mem_ctx,
/****************************************************************************
****************************************************************************/
-char *alloc_sub_advanced(const char *servicename, const char *user,
+static char *alloc_sub_advanced(const char *servicename, const char *user,
const char *connectpath, gid_t gid,
const char *smb_name, const char *domain_name,
const char *str)
@@ -731,6 +731,29 @@ char *alloc_sub_advanced(const char *servicename, const char *user,
return ret_string;
}
+/*
+ * This obviously is inefficient and needs to be merged into
+ * alloc_sub_advanced...
+ */
+
+char *talloc_sub_advanced(TALLOC_CTX *mem_ctx,
+ const char *servicename, const char *user,
+ const char *connectpath, gid_t gid,
+ const char *smb_name, const char *domain_name,
+ const char *str)
+{
+ char *a, *t;
+
+ if (!(a = alloc_sub_advanced(servicename, user, connectpath, gid,
+ smb_name, domain_name, str))) {
+ return NULL;
+ }
+ t = talloc_strdup(mem_ctx, a);
+ SAFE_FREE(a);
+ return t;
+}
+
+
void standard_sub_advanced(const char *servicename, const char *user,
const char *connectpath, gid_t gid,
const char *smb_name, const char *domain_name,