Username map issue with 1.9.18p8

Jeremy Allison jallison at whistle.com
Mon Jun 15 23:26:21 GMT 1998


Hi All,

	Sorry to be posting this :-(, but if you're
using the 'username map' parameter with Samba 1.9.18p8,
here's a small patch you may need. Without it the username
map will work once per smbd and then refuse to map subsequent
names. This isn't a big problem as normally, on a single
user NT or 95 system, username map will only be called
once per session (in the sessionsetup_and_X SMB call).

Sorry our testing didn't catch this (it's one of those
multi-user things). It's already fixed in the master
sources. I wasn't sure how many people are using the
username map parameter but I thought I'd be on the
safe side and broadcast the fix anyway, in case people
run into it.

Apologies,

	Jeremy Allison.
	Samba Team.

-------------------cut here----------------------------
--- /home/jallison/tmp/samba-1.9.18p8/source/username.c	Fri Jun 12 18:44:21 1998
+++ username.c	Mon Jun 15 14:51:32 1998
@@ -46,7 +46,6 @@
 ********************************************************************/
 BOOL map_username(char *user)
 {
-  static int depth=0;
   static BOOL initialised=False;
   static fstring last_from,last_to;
   FILE *f;
@@ -54,7 +53,7 @@
   pstring buf;
   char *mapfile = lp_username_map();
 
-  if (!*mapfile || depth)
+  if (!*mapfile)
     return False;
 
   if (!*user)
@@ -82,8 +81,6 @@
 
   DEBUG(4,("Scanning username map %s\n",mapfile));
 
-  depth++;
-
   while((s=fgets_slash(buf,sizeof(buf),f))!=NULL) {
     char *unixname = s;
     char *dosname = strchr(unixname,'=');
@@ -132,8 +129,6 @@
    */
   fstrcpy(last_from,user);
   fstrcpy(last_to,user);
-
-  depth--;
 
   return False;
 }

-------------------end patch---------------------------


-- 
--------------------------------------------------------
Buying an operating system without source is like buying
a self-assembly Space Shuttle with no instructions.
--------------------------------------------------------


More information about the samba-technical mailing list