diff options
author | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 15:34:30 -0500 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 15:34:30 -0500 |
commit | e5a951325a6cac8567af3a66de6d2df577508ae4 (patch) | |
tree | 34da9fe59f3c2d7f8edb072144443a9704197831 /source3/lib/substitute.c | |
parent | 57482469b32645250e92a7ffd003aeeb4a42235e (diff) | |
download | samba-e5a951325a6cac8567af3a66de6d2df577508ae4.tar.gz samba-e5a951325a6cac8567af3a66de6d2df577508ae4.tar.bz2 samba-e5a951325a6cac8567af3a66de6d2df577508ae4.zip |
[GLUE] Rsync SAMBA_3_2_0 SVN r25598 in order to create the v3-2-test branch.
(This used to be commit 5c6c8e1fe93f340005110a7833946191659d88ab)
Diffstat (limited to 'source3/lib/substitute.c')
-rw-r--r-- | source3/lib/substitute.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/source3/lib/substitute.c b/source3/lib/substitute.c index 80233c5080..57df02f721 100644 --- a/source3/lib/substitute.c +++ b/source3/lib/substitute.c @@ -767,3 +767,21 @@ void standard_sub_advanced(const char *servicename, const char *user, SAFE_FREE( s ); } } + +/**************************************************************************** + * Do some standard substitutions in a string. + * ****************************************************************************/ + +void standard_sub_conn(connection_struct *conn, char *str, size_t len) +{ + char *s; + + s = alloc_sub_advanced(lp_servicename(SNUM(conn)), conn->user, conn->connectpath, + conn->gid, smb_user_name, "", str); + + if ( s ) { + strncpy( str, s, len ); + SAFE_FREE( s ); + } +} + |