svn commit: samba r23745 - in branches: SAMBA_3_0/source/utils SAMBA_3_0_26/source/utils

obnox at samba.org obnox at samba.org
Sat Jul 7 21:33:49 GMT 2007


Author: obnox
Date: 2007-07-07 21:33:48 +0000 (Sat, 07 Jul 2007)
New Revision: 23745

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23745

Log:
Fix: Check whether top subkeyname instead of whole registry key name
is equal to GLOBAL_NAME.

Michael


Modified:
   branches/SAMBA_3_0/source/utils/net_conf.c
   branches/SAMBA_3_0_26/source/utils/net_conf.c


Changeset:
Modified: branches/SAMBA_3_0/source/utils/net_conf.c
===================================================================
--- branches/SAMBA_3_0/source/utils/net_conf.c	2007-07-07 20:40:59 UTC (rev 23744)
+++ branches/SAMBA_3_0/source/utils/net_conf.c	2007-07-07 21:33:48 UTC (rev 23745)
@@ -184,11 +184,12 @@
 		goto done;
 	}
 
-	if (!strequal(key->key->name, GLOBAL_NAME) &&
+	if (!strequal(strrchr_m(key->key->name, '\\')+1, GLOBAL_NAME) &&
 	    lp_parameter_is_global(valname))
 	{
 		d_fprintf(stderr, "Global paramter '%s' not allowed in "
-			  "service definition.\n", valname);
+			  "service definition ('%s').\n", valname,
+			  strrchr_m(key->key->name, '\\')+1);
 		werr = WERR_INVALID_PARAM;
 		goto done;
 	}

Modified: branches/SAMBA_3_0_26/source/utils/net_conf.c
===================================================================
--- branches/SAMBA_3_0_26/source/utils/net_conf.c	2007-07-07 20:40:59 UTC (rev 23744)
+++ branches/SAMBA_3_0_26/source/utils/net_conf.c	2007-07-07 21:33:48 UTC (rev 23745)
@@ -184,11 +184,12 @@
 		goto done;
 	}
 
-	if (!strequal(key->key->name, GLOBAL_NAME) &&
+	if (!strequal(strrchr_m(key->key->name, '\\')+1, GLOBAL_NAME) &&
 	    lp_parameter_is_global(valname))
 	{
 		d_fprintf(stderr, "Global paramter '%s' not allowed in "
-			  "service definition.\n", valname);
+			  "service definition ('%s').\n", valname,
+			  strrchr_m(key->key->name, '\\')+1);
 		werr = WERR_INVALID_PARAM;
 		goto done;
 	}



More information about the samba-cvs mailing list