Hello,
I had problem with %U in include tag in configuration file smb.conf.
I try explain the problem. When I connecting from Windows (domain)
the samba server doesn't properly include file.
E.g.: smb.conf
include = smb.conf.%U
It include only smb.conf. at first time.
I find no information about it so I try write patch for it. Please
could you say me, if it's wrong? I have no problem with it for
few days.
I write it again 3.0 CVS branch. I see the problem in 2.2 too.
Please send reply with cc: luf@pzkagis.cz as I'm not list member.
Best regards
Luf
P.S. I attach patch here
-------------- next part --------------
--- source/smbd/password.c 2002-11-13 00:20:49.000000000 +0100
+++ source/smbd/password.c.new 2002-11-21 19:02:54.000000000 +0100
@@ -101,6 +101,7 @@
int register_vuid(auth_serversupplied_info *server_info, const char *smb_name)
{
+ extern userdom_struct current_user_info;
user_struct *vuser = NULL;
/* Ensure no vuid gets registered in share level security. */
@@ -194,6 +195,15 @@
DEBUG(3,("UNIX uid %d is UNIX user %s, and will be vuid
%u\n",(int)vuser->uid,vuser->user.unix_name, vuser->vuid));
+ /*
+ * This hack is here to solve problem with %U in include tag
+ */
+ if (strcmp(vuser->user.smb_name,"") &&
strcmp(current_user_info.smb_name,vuser->user.smb_name)) {
+ DEBUG(0,("Reload services - %U in include\n"));
+ current_user_info = vuser->user;
+ reload_services(True);
+ }
+
next_vuid++;
num_validated_vuids++;