Samba calling lstat etc with * when DFS referrals being checked ...

Richard Sharpe realrichardsharpe at gmail.com
Wed Apr 15 15:33:43 MDT 2015


Hi folks,

We are seeing this funny problem as well:

-----------------------------
(128975955, 0), class=msdfs] ../source3/smbd/msdfs.c:216(parse_dfs_path)
  parse_dfs_path: rest of the path: *
[2015/04/14 15:13:32.996553, 10, pid=7360, effective(128975955,
128975361), real(128975955, 0), class=msdfs]
../source3/smbd/msdfs.c:650(dfs_path_lookup)
  dfs_path_lookup: Conn path = /home/shares/testshare reqpath = *
[2015/04/14 15:13:32.996567,  5, pid=7360, effective(128975955,
128975361), real(128975955, 0)]
../source3/smbd/filename.c:258(unix_convert)
  unix_convert called on file "*"
[2015/04/14 15:13:32.996583, 10, pid=7360, effective(128975955,
128975361), real(128975955, 0)]
../source3/smbd/statcache.c:244(stat_cache_lookup)
  stat_cache_lookup: lookup failed for name [*]
[2015/04/14 15:13:32.996600,  5, pid=7360, effective(128975955,
128975361), real(128975955, 0)]
../source3/smbd/filename.c:421(unix_convert)
  unix_convert begin: name = *, dirpath = , start = *
[2015/04/14 15:13:32.996616, 10, pid=7360, effective(128975955,
128975361), real(128975955, 0)]
../source3/smbd/mangle_hash2.c:418(is_mangled)
  is_mangled * ?
[2015/04/14 15:13:32.996631, 10, pid=7360, effective(128975955,
128975361), real(128975955, 0)]
../source3/smbd/mangle_hash2.c:357(is_mangled_component)
  is_mangled_component * (len 1) ?
[2015/04/14 15:13:32.996649,  5, pid=7360, effective(128975955,
128975361), real(128975955, 0)]
../source3/smbd/filename.c:621(unix_convert)
  Wildcard *
[2015/04/14 15:13:32.996664, 10, pid=7360, effective(128975955,
128975361), real(128975955, 0)]
../source3/modules/vfs_mymod.c:678(mymod_lstat)
  Share name = testshare
[2015/04/14 15:13:33.001468, 10, pid=7360, effective(128975955,
128975361), real(128975955, 0), class=vfs]
../source3/modules/vfs_default.c:1006(vfswrap_lstat)
  lstat called for *
----------------

This concerns me because it seems possible that someone could create a
symlink to * with the correct stuff in it:

  ln -s msdfs:some-stuff \*


Should we filter these cases out?

-- 
Regards,
Richard Sharpe
(何以解憂?唯有杜康。--曹操)


More information about the samba-technical mailing list