Failure of findfirst system call by DOS application

Jeremy Malcolm Jeremy at Malcolm.wattle.id.au
Wed Jan 12 00:46:08 GMT 2000


I am not a developer, but I believe a problem that I am experiencing is the
result of a bug in Samba rather than a configuration error.  I am running
Samba 2.0.5 (a precompiled package for Caldera Openlinux 2.2) under Linux
kernel version 2.2.5.

There is a Samba share on my network which can be accessed from Windows
machines on the network without difficulty using Windows Explorer or the DOS
prompt.  The files are readable, writable, and display only the "archive"
attribute.

I use a DOS application which needs to access files on a Samba share, and
which according to the programmer uses the DOS "findfirst" and "findnext"
function calls to array a list of the files with the extension *.NED on the
share.

This application cannot "see" any of the files, and changing the filespec to
*.*  makes no difference.  The application is written in Turbo Pascal,
although this should be irrelevant, and it works perfectly reading from a
Windows NT or 95 share.

Here is what happens at debug level 100 when I try to access the files:

[2000/01/11 14:26:05, 3] lib/doscalls.c:dos_ChDir(336)
  dos_ChDir to /mnt/mrdrives/programs
[2000/01/11 14:26:05, 5] smbd/reply.c:reply_search(1175)
  reply_search: path=\NED\????????.NED status_len=0
[2000/01/11 14:26:05, 5] smbd/filename.c:unix_convert(351)
  unix_convert called on file "\NED\????????.NED"
[2000/01/11 14:26:05, 3] lib/util.c:unix_clean_name(609)
  unix_clean_name [/NED/????????.NED]
[2000/01/11 14:26:05, 5] smbd/mangle.c:is_8_3(338)
  Checking ????????.NED for 8.3
[2000/01/11 14:26:05, 10] smbd/filename.c:stat_cache_lookup(274)
  stat_cache_lookup: cache miss on NED/????????.NED
[2000/01/11 14:26:05, 5] smbd/filename.c:unix_convert(460)
  unix_convert begin: name = NED/????????.NED, dirpath = , start =
NED/????????.NED
[2000/01/11 14:26:05, 5] smbd/filename.c:unix_convert(588)
  New file ????????.NED
[2000/01/11 14:26:05, 8] lib/util.c:is_in_path(2476)
  is_in_path: NED/????????.NED
[2000/01/11 14:26:05, 8] lib/util.c:is_in_path(2481)
  is_in_path: no name list.
[2000/01/11 14:26:05, 3] lib/util.c:unix_clean_name(609)
  unix_clean_name [NED/????????.NED]
[2000/01/11 14:26:05, 5] smbd/reply.c:reply_search(1274)
  mask=????????.NED directory=NED
[2000/01/11 14:26:05, 5] smbd/dir.c:start_dir(336)
  start_dir dir=NED
[2000/01/11 14:26:05, 8] lib/util.c:is_in_path(2476)
  is_in_path: NED
[2000/01/11 14:26:05, 8] lib/util.c:is_in_path(2481)
  is_in_path: no name list.
[2000/01/11 14:26:05, 3] lib/util.c:unix_clean_name(609)
  unix_clean_name [NED]
[2000/01/11 14:26:05, 8] lib/util.c:is_in_path(2476)
  is_in_path: .
[2000/01/11 14:26:05, 8] lib/util.c:is_in_path(2481)
  is_in_path: no name list.
[2000/01/11 14:26:05, 8] lib/util.c:is_in_path(2476)
  is_in_path: ..
[2000/01/11 14:26:05, 8] lib/util.c:is_in_path(2481)
  is_in_path: no name list.
[2000/01/11 14:26:05, 8] lib/util.c:is_in_path(2476)
  is_in_path: C1686.ned
[2000/01/11 14:26:05, 8] lib/util.c:is_in_path(2481)
  is_in_path: no name list.
[2000/01/11 14:26:05, 8] lib/util.c:is_in_path(2476)
  is_in_path: C1866.ned
[2000/01/11 14:26:05, 8] lib/util.c:is_in_path(2481)
  is_in_path: no name list.
[2000/01/11 14:26:05, 8] lib/util.c:is_in_path(2476)
  is_in_path: C2534.ned
[2000/01/11 14:26:05, 8] lib/util.c:is_in_path(2481)
  is_in_path: no name list.
...snip...
[2000/01/11 14:26:05, 8] lib/util.c:is_in_path(2476)
  is_in_path: M6977.ned
[2000/01/11 14:26:05, 8] lib/util.c:is_in_path(2481)
  is_in_path: no name list.
[2000/01/11 14:26:05, 3] smbd/dir.c:dptr_create(474)
  creating new dirptr 1 for path NED, expect_close = 0
[2000/01/11 14:26:05, 4] smbd/reply.c:reply_search(1300)
  dptr_num is 1
[2000/01/11 14:26:05, 8] smbd/reply.c:reply_search(1318)
  dirpath=<NED> dontdescend=<>
[2000/01/11 14:26:05, 6] smbd/dir.c:get_dir_entry(593)
  readdir on dirptr 0x8165eb8 now at offset 1
[2000/01/11 14:26:05, 5] smbd/mangle.c:name_map_mangle(983)
  name_map_mangle( ., need83 = TRUE, cache83 = FALSE, 0 )
[2000/01/11 14:26:05, 5] smbd/mangle.c:is_8_3(338)
  Checking . for 8.3
[2000/01/11 14:26:05, 5] smbd/mangle.c:name_map_mangle(1017)
  name_map_mangle() ==> [.]
[2000/01/11 14:26:05, 8] lib/util.c:mask_match(1385)
  mask_match str=<.> regexp=<????????.NED>, case_sig = 0
[2000/01/11 14:26:05, 8] lib/util.c:mask_match(1575)
  mask_match returning 0
[2000/01/11 14:26:05, 6] smbd/dir.c:get_dir_entry(593)
  readdir on dirptr 0x8165eb8 now at offset 2
[2000/01/11 14:26:05, 5] smbd/mangle.c:name_map_mangle(983)
  name_map_mangle( .., need83 = TRUE, cache83 = FALSE, 0 )
[2000/01/11 14:26:05, 5] smbd/mangle.c:is_8_3(338)
  Checking .. for 8.3
[2000/01/11 14:26:05, 5] smbd/mangle.c:name_map_mangle(1017)
  name_map_mangle() ==> [..]
[2000/01/11 14:26:05, 8] lib/util.c:mask_match(1385)
  mask_match str=<..> regexp=<????????.NED>, case_sig = 0
[2000/01/11 14:26:05, 8] lib/util.c:mask_match(1575)
  mask_match returning 0
[2000/01/11 14:26:05, 6] smbd/dir.c:get_dir_entry(593)
  readdir on dirptr 0x8165eb8 now at offset 3
[2000/01/11 14:26:05, 5] smbd/mangle.c:name_map_mangle(983)
  name_map_mangle( C1686.ned, need83 = TRUE, cache83 = FALSE, 0 )
[2000/01/11 14:26:05, 5] smbd/mangle.c:is_8_3(338)
  Checking C1686.ned for 8.3
[2000/01/11 14:26:05, 5] smbd/mangle.c:name_map_mangle(1017)
  name_map_mangle() ==> [C1686.ned]
[2000/01/11 14:26:05, 8] lib/util.c:mask_match(1385)
  mask_match str=<C1686.ned> regexp=<????????.NED>, case_sig = 0
[2000/01/11 14:26:05, 8] lib/util.c:mask_match(1575)
  mask_match returning 0
[2000/01/11 14:26:05, 6] smbd/dir.c:get_dir_entry(593)
  readdir on dirptr 0x8165eb8 now at offset 4
[2000/01/11 14:26:05, 5] smbd/mangle.c:name_map_mangle(983)
  name_map_mangle( C1866.ned, need83 = TRUE, cache83 = FALSE, 0 )
[2000/01/11 14:26:05, 5] smbd/mangle.c:is_8_3(338)
  Checking C1866.ned for 8.3
[2000/01/11 14:26:05, 5] smbd/mangle.c:name_map_mangle(1017)
  name_map_mangle() ==> [C1866.ned]
[2000/01/11 14:26:05, 8] lib/util.c:mask_match(1385)
  mask_match str=<C1866.ned> regexp=<????????.NED>, case_sig = 0
[2000/01/11 14:26:05, 8] lib/util.c:mask_match(1575)
  mask_match returning 0
[2000/01/11 14:26:05, 6] smbd/dir.c:get_dir_entry(593)
  readdir on dirptr 0x8165eb8 now at offset 5
[2000/01/11 14:26:05, 5] smbd/mangle.c:name_map_mangle(983)
  name_map_mangle( C2534.ned, need83 = TRUE, cache83 = FALSE, 0 )
[2000/01/11 14:26:05, 5] smbd/mangle.c:is_8_3(338)
  Checking C2534.ned for 8.3
[2000/01/11 14:26:05, 5] smbd/mangle.c:name_map_mangle(1017)
  name_map_mangle() ==> [C2534.ned]
[2000/01/11 14:26:05, 8] lib/util.c:mask_match(1385)
  mask_match str=<C2534.ned> regexp=<????????.NED>, case_sig = 0
[2000/01/11 14:26:05, 8] lib/util.c:mask_match(1575)
  mask_match returning 0
...snip...
[2000/01/11 14:26:06, 6] smbd/dir.c:get_dir_entry(593)
  readdir on dirptr 0x8165eb8 now at offset 308
[2000/01/11 14:26:06, 5] smbd/mangle.c:name_map_mangle(983)
  name_map_mangle( M6977.ned, need83 = TRUE, cache83 = FALSE, 0 )
[2000/01/11 14:26:06, 5] smbd/mangle.c:is_8_3(338)
  Checking M6977.ned for 8.3
[2000/01/11 14:26:06, 5] smbd/mangle.c:name_map_mangle(1017)
  name_map_mangle() ==> [M6977.ned]
[2000/01/11 14:26:06, 8] lib/util.c:mask_match(1385)
  mask_match str=<M6977.ned> regexp=<????????.NED>, case_sig = 0
[2000/01/11 14:26:06, 8] lib/util.c:mask_match(1575)
  mask_match returning 0
[2000/01/11 14:26:06, 6] smbd/dir.c:get_dir_entry(593)
  readdir on dirptr 0x8165eb8 now at offset 308
[2000/01/11 14:26:06, 4] smbd/dir.c:dptr_close_internal(227)
  closing dptr key 1
[2000/01/11 14:26:06, 4] smbd/reply.c:reply_search(1383)
  SMBsearch mask=????????.NED path=NED dtype=33 nument=0 of 20
[2000/01/11 14:26:06, 5] lib/util.c:show_msg(459)
  size=40
  smb_com=0x81
  smb_rcls=1
  smb_reh=0
  smb_err=18
  smb_flg=128
  smb_flg2=65
[2000/01/11 14:26:06, 5] lib/util.c:show_msg(465)
  smb_tid=1
  smb_pid=16804
  smb_uid=100
  smb_mid=42242
  smt_wct=1
[2000/01/11 14:26:06, 5] lib/util.c:show_msg(470)
  smb_vwv[0]=0 (0x0)
[2000/01/11 14:26:06, 5] lib/util.c:show_msg(475)
  smb_bcc=3
[2000/01/11 14:26:06, 10] lib/util.c:dump_data(2879)
  [000] 05 00 00                                          ...
[2000/01/11 14:26:06, 6] lib/util_sock.c:write_socket(590)
  write_socket(6,44)
[2000/01/11 14:26:06, 6] lib/util_sock.c:write_socket(593)
  write_socket(6,44) wrote 44

If this is indeed a bug, I would appreciate any comments anyone may have.
If you require any more information please let me know.  I posted a similar
message to comp.protocols.smb several days ago but have received no
responses as yet.

--
JEREMY MALCOLM Jeremy at Malcolm.wattle.id.au http://malcolm.wattle.id.au
SIG of the day: [ ] Contact  [ ] Web  [x] PGP  [ ] Taglines #1  [ ] #2
PGP key ID: 0xC3D89001 | Bits: 768 | Date: 1995/12/31 | Algorithm: RSA
Fingerprint: 528643F595149476A9F310B13C471C25 | DSS key ID: 0xD2AB2220
Obtain via finger, Web, or email with subject "Send RSA" or "Send DSS"



More information about the samba mailing list