EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Implementing OnGetFileNameByFileId

Also by EldoS: SecureBlackbox
200+ components and classes for digital security, signing, encryption and secure networking.
#26586
Posted: 09/24/2013 09:10:34
by david atkins (Basic support level)
Joined: 06/12/2013
Posts: 13

I have implemented the OnGetFileNameByFileId callback but am receiving more calls to it than I would expect (up to 80 for a single file) which come one after another in a quick manor.

Can you please clarify what the callback is used for, is it something that is only used by the CBFS driver or is it a call made by windows that is passed through by the driver?

Also what exactly is expected to be returned in the path field the path of the file in the back end file system or the windows side file system?
#26588
Posted: 09/24/2013 09:44:27
by Volodymyr Zinin (EldoS Corp.)

FileID is usually used by Windows to support UNIX programs (like NFS server), that often do file opening not by the use of file name, but specifying FileID. They get to know FileIDs either by enumerating directory (the OnEnumerateDirectory callback is called) or by getting file attributes for a file (the OnGetFileInfo callback is called).
FileIDs must be unique for files on a volume, but it isn't required to be unique over time, because file systems are free to reuse them (after a file deletion).

Quote
david atkins wrote:
Also what exactly is expected to be returned in the path field the path of the file in the back end file system or the windows side file system?

It must be the windows side file system path. The path must be started from the root folder (i.e. without a mounting point name). Something like "\folder1\folder2\file.ext"
#26589
Posted: 09/24/2013 09:49:56
by Volodymyr Zinin (EldoS Corp.)

BTW I'm working on adding full NFS support for the Mapper sample. I.e. it will contain correct FileID as well as file security implementation. I hope it will be done in the nearest CBFS v5 build.
#26643
Posted: 09/27/2013 04:22:01
by david atkins (Basic support level)
Joined: 06/12/2013
Posts: 13

I have implemented it such that the callback returns the windows file path without the drive letter e.g. "/file_name.ext" (for a file in the root directory) but I am still receiving many more calls to it that I would have thought.

The problem now is that the drive mounts fine after being shared via NFS and I can browse the files but as soon as I copy a file from the share onto the local machine a folder with the same name appears where the file should of copied to and then suddenly all the files in the share turn into folders.
#26644
Posted: 09/27/2013 05:11:58
by Volodymyr Zinin (EldoS Corp.)

Quote
david atkins wrote:
I am still receiving many more calls to it that I would have thought.

It's not CBFS but programs (NFS server, etc) which send such many requests. CBFS only passes them to the callbacks. Of course it's possible implement some kind of caching in order to correspond FileIDs with real file names, but now it isn't present in CBFS .

Quote
david atkins wrote:
The problem now is that the drive mounts fine after being shared via NFS and I can browse the files but as soon as I copy a file from the share onto the local machine a folder with the same name appears where the file should of copied to and then suddenly all the files in the share turn into folders.

I suggest the following. Next week we will make a new CBFS v5 build where the NFS sharing will be completely supported in the Mapper sample. So if the problem occurs to be reproducible there (I'll check it before the release too) then we will continue working on it.
#26718
Posted: 10/04/2013 04:00:41
by david atkins (Basic support level)
Joined: 06/12/2013
Posts: 13

Any update on when this new build will be available?
#26719
Posted: 10/04/2013 04:21:28
by Volodymyr Zinin (EldoS Corp.)

It's expected next week.
#26787
Posted: 10/11/2013 03:05:27
by david atkins (Basic support level)
Joined: 06/12/2013
Posts: 13

Is there any further information regarding the time-scale of a new build?
#26788
Posted: 10/11/2013 03:25:30
by Eugene Mayevski (EldoS Corp.)

The next beta of CBFS 5 should be available within 3-4 days.


Sincerely yours
Eugene Mayevski
#26804
Posted: 10/14/2013 04:14:13
by david atkins (Basic support level)
Joined: 06/12/2013
Posts: 13

I am trying to update my code to work with the latest build of cbfs (5.0.141) and have noticed that you have removed the Attributes property from your TCbFsFilInfo class which I am currently using to determine if it is a file or a folder in my OncanBeDeleted callback.

I cant see how else I can retrieve this information as normally it is passed into the function by your code.

Can you tell me the best way this can be corrected.

Thanks
Also by EldoS: BizCrypto
Components for BizTalk® and SQL Server® Integration Services that let you securely store and transfer information in your business automation solutions.

Reply

Statistics

Topic viewed 5349 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!