summaryrefslogtreecommitdiffstats
path: root/source3/lib/substitute.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-11-27 14:35:30 -0800
committerJeremy Allison <jra@samba.org>2007-11-27 14:35:30 -0800
commit6b6655edd90850d09c7711fc3b9fe98271e3e625 (patch)
treefd0247dcf84688d1f6bdba2253d05f6dd0fe0787 /source3/lib/substitute.c
parentf642ae837507e755d5949a61ea5ad70c7b334385 (diff)
downloadsamba-6b6655edd90850d09c7711fc3b9fe98271e3e625.tar.gz
samba-6b6655edd90850d09c7711fc3b9fe98271e3e625.tar.xz
samba-6b6655edd90850d09c7711fc3b9fe98271e3e625.zip
Remove pstrings from everything except srv_spoolss_nt.c.
Jeremy. (This used to be commit 0002a9e96b0ef78316295a6eb94ff29b64e2f988)
Diffstat (limited to 'source3/lib/substitute.c')
-rw-r--r--source3/lib/substitute.c34
1 files changed, 16 insertions, 18 deletions
diff --git a/source3/lib/substitute.c b/source3/lib/substitute.c
index db79a9f2b5c..09604f84426 100644
--- a/source3/lib/substitute.c
+++ b/source3/lib/substitute.c
@@ -831,8 +831,8 @@ static char *alloc_sub_advanced(const char *servicename, const char *user,
*/
char *talloc_sub_advanced(TALLOC_CTX *mem_ctx,
- const char *servicename, const char *user,
- const char *connectpath, gid_t gid,
+ const char *servicename, const char *user,
+ const char *connectpath, gid_t gid,
const char *smb_name, const char *domain_name,
const char *str)
{
@@ -848,13 +848,13 @@ char *talloc_sub_advanced(TALLOC_CTX *mem_ctx,
}
-void standard_sub_advanced(const char *servicename, const char *user,
- const char *connectpath, gid_t gid,
+void standard_sub_advanced(const char *servicename, const char *user,
+ const char *connectpath, gid_t gid,
const char *smb_name, const char *domain_name,
char *str, size_t len)
{
char *s;
-
+
s = alloc_sub_advanced(servicename, user, connectpath,
gid, smb_name, domain_name, str);
@@ -865,19 +865,17 @@ void standard_sub_advanced(const char *servicename, const char *user,
}
/****************************************************************************
- * Do some standard substitutions in a string.
- * ****************************************************************************/
+ Do some standard substitutions in a string.
+****************************************************************************/
-void standard_sub_conn(connection_struct *conn, char *str, size_t len)
+char *standard_sub_conn(TALLOC_CTX *ctx, connection_struct *conn, const char *str)
{
- char *s;
-
- s = alloc_sub_advanced(lp_servicename(SNUM(conn)), conn->user, conn->connectpath,
- conn->gid, get_smb_user_name(), "", str);
-
- if ( s ) {
- strncpy( str, s, len );
- SAFE_FREE( s );
- }
+ return talloc_sub_advanced(ctx,
+ lp_servicename(SNUM(conn)),
+ conn->user,
+ conn->connectpath,
+ conn->gid,
+ get_smb_user_name(),
+ "",
+ str);
}
-