summaryrefslogtreecommitdiffstats
path: root/source3/lib/substitute.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2002-09-25 15:19:00 +0000
committerGerald Carter <jerry@samba.org>2002-09-25 15:19:00 +0000
commita834a73e341059be154426390304a42e4a011f72 (patch)
tree7f53b0f7819238e0ee0396daccf5d924cb9b8d29 /source3/lib/substitute.c
parent115a39775cb923d026dde58633b6ba6aef3a1943 (diff)
downloadsamba-a834a73e341059be154426390304a42e4a011f72.tar.gz
samba-a834a73e341059be154426390304a42e4a011f72.tar.xz
samba-a834a73e341059be154426390304a42e4a011f72.zip
sync'ing up for 3.0alpha20 release
(This used to be commit 65e7b5273bb58802bf0c389b77f7fcae0a1f6139)
Diffstat (limited to 'source3/lib/substitute.c')
-rw-r--r--source3/lib/substitute.c22
1 files changed, 20 insertions, 2 deletions
diff --git a/source3/lib/substitute.c b/source3/lib/substitute.c
index 026df0f67f1..2550d00d14c 100644
--- a/source3/lib/substitute.c
+++ b/source3/lib/substitute.c
@@ -297,8 +297,13 @@ void standard_sub_basic(const char *smb_name, char *str,size_t len)
case 'L' :
if (local_machine_name && *local_machine_name)
string_sub(p,"%L", local_machine_name,l);
- else
- string_sub(p,"%L", global_myname,l);
+ else {
+ pstring temp_name;
+
+ pstrcpy(temp_name, global_myname);
+ strlower(temp_name);
+ string_sub(p,"%L", temp_name,l);
+ }
break;
case 'M' :
string_sub(p,"%M", client_name(),l);
@@ -675,6 +680,19 @@ void standard_sub_conn(connection_struct *conn, char *str, size_t len)
conn->gid, current_user_info.smb_name, str, len);
}
+char *talloc_sub_conn(TALLOC_CTX *mem_ctx, connection_struct *conn, char *str)
+{
+ return talloc_sub_advanced(mem_ctx, SNUM(conn), conn->user,
+ conn->connectpath, conn->gid,
+ current_user_info.smb_name, str);
+}
+
+char *alloc_sub_conn(connection_struct *conn, char *str)
+{
+ return alloc_sub_advanced(SNUM(conn), conn->user, conn->connectpath,
+ conn->gid, current_user_info.smb_name, str);
+}
+
/****************************************************************************
Like standard_sub but by snum.
****************************************************************************/