msdfs broken in some code paths

Eric Horst erich at cac.washington.edu
Tue May 25 04:37:16 GMT 2004


I'm not an expert on the internal protocol workings of CIFS/SMB so forgive
me if my wording is wrong. I'll try to explain clearly and maybe it'll
click with somebody.

Simple explanation: Samba 3.0.4 and a Dfs root. One link. Windows XP
client. The Dfs link redirects fine when connecting to the server in a way
that uses NTLM auth.  The Dfs link does not redirect and gives error when
connecting to the server in a way that uses Kerberos auth.

Here is the critical point of the failure in the logfile for the Kerberos
case (audioj is the name of the symlink):

[2004/05/24 17:54:07, 3, pid=27889]
smbd/trans2.c:call_trans2qfilepathinfo(2353)
  call_trans2qfilepathinfo: SMB_VFS_STAT of audioj failed (No such file or directory)
[2004/05/24 17:54:07, 10, pid=27889] smbd/trans2.c:set_bad_path_error(2213)
  set_bad_path_error: err = 2 bad_path = 0
[2004/05/24 17:54:07, 3, pid=27889] smbd/error.c:error_packet(94)
  error string = No such file or directory

Maybe everything above gives somebody a clue what's up. Beyond here I'm
speculating...

I studied smbd/trans2.c and see differences between
get_lanman2_dir_entry() and call_trans2qfilepathinfo(). I assume these
have similar functions for different protocol versions.


In get_lanman2_dir_entry(): (Success case)

   } else if (SMB_VFS_STAT(conn,pathreal,&sbuf) != 0) {
             /* Needed to show the msdfs symlinks as directories */
                 if(lp_host_msdfs() &&
                    lp_msdfs_root(SNUM(conn)) &&
                    is_msdfs_link(conn, pathreal, NULL, NULL, &sbuf)) {
                           DEBUG(5,("get_lanman2_dir_entry:
                 Masquerading msdfs link %s as a directory\n", pathreal));
   }


In call_trans2qfilepathinfo(): (Failure case)
    } else if (!VALID_STAT(sbuf) && SMB_VFS_STAT(conn,fname, &sbuf)) {
        DEBUG(3,("call_trans2qfilepathinfo: SMB_VFS_STAT
                  of %s failed (%s)\n",fname,strerror(errno)));
        return set_bad_path_error(errno, bad_path, outbuf, ERRDOS,ERRbadpath);
    }


The the call_trans2qfilepathinfo() case, that's the error I get. On the
surface it seems that it just needs some of the msdfs tests that the
get_lanman2_dir_entry() function has. Am I close? Maybe I'm way off.

Of course I can provide full log files if it's helpful. I can also enter
in bugzilla but was lacking a concise description of the bug.

--Eric


More information about the samba-technical mailing list