r8493: According to MSKB 141714 the %LOGONSERVER% variable should be
authorGünther Deschner <gd@samba.org>
Fri, 15 Jul 2005 11:56:16 +0000 (11:56 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 16:00:06 +0000 (11:00 -0500)
substituted like our %L-variable.

Guenther
(This used to be commit 294fdbccba9835b6abe5f26f22a0a05adb27564e)

source3/lib/substitute.c

index af30e900ace87bba0e9f1b5730487f2128fb3b15..f25e5468aad2b8b79d1da51f8c0a09f0a1e2a737 100644 (file)
@@ -386,13 +386,18 @@ void standard_sub_basic(const char *smb_name, char *str,size_t len)
                        string_sub(p,"%i", client_socket_addr(),l);
                        break;
                case 'L' : 
-                       if (local_machine_name && *local_machine_name)
+                       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); 
-                       else {
+                       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); 
                        }
                        break;