delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2015/04/07/04:00:23

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
X-Received: by 10.182.63.17 with SMTP id c17mr11004205obs.13.1428392656442;
Tue, 07 Apr 2015 00:44:16 -0700 (PDT)
X-Received: by 10.140.93.226 with SMTP id d89mr144468qge.38.1428392656327;
Tue, 07 Apr 2015 00:44:16 -0700 (PDT)
Newsgroups: comp.os.msdos.djgpp
Date: Tue, 7 Apr 2015 00:44:16 -0700 (PDT)
Complaints-To: groups-abuse AT google DOT com
Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=193.248.181.231;
posting-account=mT4CwQoAAACeGCTFZdO8LdCOEWAuVBL8
NNTP-Posting-Host: 193.248.181.231
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <caa55e9e-e825-463f-8afa-75aef74b34d3@googlegroups.com>
Subject: I have found fopen() + network bug
From: =?ISO-8859-1?Q?S=E9bastien_Favier?= <sebastien DOT ordinateur AT gmail DOT com>
Injection-Date: Tue, 07 Apr 2015 07:44:16 +0000
Bytes: 2408
Lines: 45
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id t37804u3025248
Reply-To: djgpp AT delorie DOT com

Hi everybody, hi DJ!

I have found a bug with fopen() function when I want to open a shared file
Wireshark : http://cpcdos.e-monsite.com/medias/files/fopen-freedos.png


For open test.cpc :
- With a normal request (Windows, EDIT.COM(dos), Command.com(dos), or other..) he send 0x0021 request ( offset:0x5D & 0x5E ) (Read only+Archive attribute), so he want open a file, OK !
- With a fopen request he send 0x0017 request ( offset:0x5D & 0x5E ) SO he want search a directory (+hidden, readonly+system attribute) but no a file. BAD!

There are solution for "force" fopen to open/search a file in my path string(char)? add "\n" ?


Best regards
Sébastien FAVIER

PS:

- I use GCC 4.7.3 / DJGPP for dos (Under FreeDos)

- I have all permissions

- I have test multiple combinaisons :
fopen("x:\myfile.abc, "r");
fopen("x:\\myfile.abc, "r");
fopen("x:/myfile.abc, "r");
fopen("x://myfile.abc, "r");

Or directly with server name :
fopen("\\MyServer\myfile.abc, "r");
fopen("\\\\MyServer\\myfile.abc, "r");
fopen("\\MyServer/myfile.abc, "r");
fopen("\\\\MyServer//myfile.abc, "r");
fopen("//MyServer/myfile.abc, "r");
fopen("////MyServer//myfile.abc, "r");
fopen("//MyServer\myfile.abc, "r");
fopen("////MyServer\\myfile.abc, "r");

No success.. :-(



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019