summaryrefslogtreecommitdiff
path: root/source3/lib/substitute.c
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2005-07-21 17:40:20 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:00:15 -0500
commit0b98400cc0b8fa51f995d6cb90382b5f2526b3f5 (patch)
tree580b45a91aab18105b1da5a07bb0eed3cf719c19 /source3/lib/substitute.c
parent728dbab082f2c52d5aea5d16a8ffd84b9a8ab1b1 (diff)
downloadsamba-0b98400cc0b8fa51f995d6cb90382b5f2526b3f5.tar.gz
samba-0b98400cc0b8fa51f995d6cb90382b5f2526b3f5.tar.bz2
samba-0b98400cc0b8fa51f995d6cb90382b5f2526b3f5.zip
r8686: Revert %LOGONSERVER%-substitution. The substition is done on the client,
not on the server. We now preserve this windows variable (important for vampired setups) and correctly substitute only the "%L"s in strings like: "%LOGONSERVER% %L %lOgOnSeRvEr% %L". Guenther (This used to be commit dccf777f42ce1d3f788548842fb8a606bed5708c)
Diffstat (limited to 'source3/lib/substitute.c')
-rw-r--r--source3/lib/substitute.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/source3/lib/substitute.c b/source3/lib/substitute.c
index f25e5468aa..15862f7a96 100644
--- a/source3/lib/substitute.c
+++ b/source3/lib/substitute.c
@@ -385,20 +385,20 @@ void standard_sub_basic(const char *smb_name, char *str,size_t len)
case 'i' :
string_sub(p,"%i", client_socket_addr(),l);
break;
- case 'L' :
+ case 'L' :
+ if (!StrnCaseCmp(p, "\%LOGONSERVER\%", 13)) {
+ p++;
+ break;
+ }
+
if (local_machine_name && *local_machine_name) {
- if (IS_DC)
- string_sub(p, "\%LOGONSERVER\%", local_machine_name, l);
- string_sub(p,"%L", local_machine_name,l);
+ string_sub_once(p, "%L", local_machine_name, l);
} else {
pstring temp_name;
pstrcpy(temp_name, global_myname());
strlower_m(temp_name);
- if (IS_DC)
- string_sub(p, "\%LOGONSERVER\%", temp_name,l);
-
- string_sub(p,"%L", temp_name,l);
+ string_sub_once(p, "%L", temp_name, l);
}
break;
case 'M' :