Message-ID: <399BB121.2A01868A@softhome.net> Date: Thu, 17 Aug 2000 11:32:17 +0200 From: Laurynas Biveinis X-Mailer: Mozilla 4.74 [en] (Win98; U) X-Accept-Language: lt,en MIME-Version: 1.0 To: Eli Zaretskii CC: djgpp-workers AT delorie DOT com Subject: Re: Symlinks & fstat References: <399B00B3 DOT 1AA2C454 AT softhome DOT net> <1858-Thu17Aug2000010725+0300-eliz AT is DOT elta DOT co DOT il> <399B954E DOT 4BC4ECC AT softhome DOT net> <2950-Thu17Aug2000115242+0300-eliz AT is DOT elta DOT co DOT il> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: djgpp-workers AT delorie DOT com Eli Zaretskii wrote: > What you described above should be a primitive which can be hooked. It was something that has been overlooked. (If you have my old symlink patches, you might check them, if they contain patches for fstat(). I doubt that). And FSEXT just made this little flaw very clear. > > Now if I provide > > int __internal_readlink(const char * path, int fhandle, char * buf, int max); > > Assuming that we won't get the user into trouble by requesting to have > the same hook that is called both from __FSEXT_call_open_handlers and > by a handle-related code, this is okay, I think. I will document that user should call __internal_readlink() from its fstat handler, if he/she does not support his/her own symlink format. > > BTW, if file was opened for write only, __internal_readlink() would > > fail here > > This should be documented. Yes. Laurynas