Thank you Przemek for the clarification and explanation.
Best regards, Mario Message: 1 Date: Tue, 1 Sep 2009 17:18:09 +0200 From: Przemyslaw Czerpak <dru...@acn.waw.pl> Subject: Re: [Harbour] HBNETIO Windows Drive Letter Support To: "Harbour Project Main Developer List." <harbour@harbour-project.org> Message-ID: <20090901151809.ga24...@uran.home.aster.pl> Content-Type: text/plain; charset=utf-8 On Tue, 01 Sep 2009, Mario H. Sabado wrote: Hi,
> Is it possible to have drive letter support for Windows OS when specifying > database file? The root of data starts from where the program was > executed, is this correct?
Yes, it is intentional protection. Otherwise somoone can easy write program to remove all files from your hard disk. You can control default file location using 3-rd parameter in NETIO_LISTEN() function, see the ChangeLog: NETIO_LISTEN( [<nPort>], [<cAddress>], [<cRootDir>] ) -> <pListenSocket> | NIL If you pass empty string "" as <cRootDir> then you will fully disable the protection. Do it for your own risk. Default value for <cRootDir> is the localization of server binaries.
> What if the hierarchy of the data directory is > higher than where the program is executed or in the other directory or > drive (in case of Windows)?
NETIO server control given paths and does not allow to create any file outside root directory. It also controls ".." usage in paths so it cannot be used as workaround for protection but they can be used only to the level of root directory, i.e. cRootDir:="/var/data" and you can access file /var/data/myfs1/../myfs2/mytable using "myfs1/../myfs2/mytable" as file name of course if above directories exists but it's illegal to use "../somedir/somefile". If filesystem support soft or hard links then they can be used to break this protection anyhow for this it's necessary to have direct access to shared paths because NETIO server does not allow to create any links remotely. best regards, Przemek
_______________________________________________ Harbour mailing list Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour