EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Network Mounting Points vs. Old Style Mounting Points

Also by EldoS: SecureBlackbox
200+ components and classes for digital security, signing, encryption and secure networking.
#9001
Posted: 02/20/2009 15:51:04
by Volodymyr Zinin (EldoS Corp.)

I have attached the corrected driver and network redirector dll. Please check the problem with them. Both have the version 0.0.0.1. Ensure that it is so after the installation.
The driver cbfs.sys is located in <win_root>\system32\drivers. And the network redirector dll VSNetRdr.dll is in <win_root>\system32.
Thanks.

PS: I have checked the WNetAddConnection2 call and it works with the attached binaries. Here is the code:
Code
CbFs->AddNetworkMountingPoint(L";cbfs;qwerty", FALSE, NULL, CallbackFileSystem::nsmAllowMapAsDrive);

NETRESOURCE NetResource;
ZeroMemory(&NetResource, sizeof(NETRESOURCE));
NetResource.dwType = RESOURCETYPE_DISK;
NetResource.lpLocalName = L"s:";
NetResource.lpRemoteName = L"\\\\cbfs\\qwerty";
NetResource.lpProvider = NULL;

DWORD dwReturn = WNetAddConnection2(&NetResource, NULL, NULL, CONNECT_REDIRECT);


[ Download ]
#9008
Posted: 02/23/2009 11:34:36
by Sid Schipper (Standard support level)
Joined: 03/14/2008
Posts: 285

Now I think it may be a permissions thing. I re-installed the new driver and dll that you sent me and I still do not see the S: drive in Windows Explorer. The reason I think it may be a permissions thing is that when I type the address \\P125252 into the address box of Windows Explorer I get the error message that tells me that \\P1252252 is not accessible and I may not have permission to use this network resource. But, if I type the share name
\\P125252\Srb_S into the Windows Explorer address box I can get at it with no problems.

So, I am speculating that somewhere in the AddNetworkMountiongPoint process there is some authentication that is failing. My user logs on to the machine as part of a domain, it is not a local user account, but it does have administrator rights, so I figured I could do anything I wanted to, but that may not be true for network stuff.

Any thoughts on this speculation?
#9009
Posted: 02/23/2009 11:37:07
by Sid Schipper (Standard support level)
Joined: 03/14/2008
Posts: 285

Sorry, I was mistaken about something I just told you. The actual process that is doing the AddNetworkMountingPoint is a program that is running as a Windows Service, so the user it is logged in to is the local System account
(WINDOWS NT\SYSTEM).
#9010
Posted: 02/23/2009 11:50:58
by Sid Schipper (Standard support level)
Joined: 03/14/2008
Posts: 285

More information for you. When I get the error message from Windows telling me I cannot access the \\P125252 network resource it says "Network provider name invalid". Maybe the domain I am logging in under can't get at your shares?
#9012
Posted: 02/23/2009 13:50:36
by Volodymyr Zinin (EldoS Corp.)

Quote
Sid Schipper wrote:
The actual process that is doing the AddNetworkMountingPoint is a program that is running as a Windows Service, so the user it is logged in to is the local System account

That's why the drive letter is not visible. It is created in the SYSTEM user logon session. Create either the global type of mounting point or specify authentication id (instead of NULL) for a session where the mounting point must be created. For details read the topic "Mounting Points and Authentication IDs" in the product's documentation. And don't forget to install the Explorer Notification helper DLL.

Quote
Sid Schipper wrote:
when I type the address \\P125252 into the address box of Windows Explorer I get the error message that tells me that \\P1252252 is not accessible and I may not have permission to use this network resource. But, if I type the share name \\P125252\Srb_S into the Windows Explorer address box I can get at it with no problems.

But after the share is opened in the right pane of Explorer, do you see the server P125252 in the left Explorer's pane (like on the attached snapshot)? And is it possible to enumerate shares of this server (by clicking on its icon)?
Also please check that it's really the version 0.0.0.1 of VSNetRdr.dll is placed in <win_root>\system32.
Thanks.


#9013
Posted: 02/23/2009 14:00:01
by Sid Schipper (Standard support level)
Joined: 03/14/2008
Posts: 285

OK, I fixed the call to WNetAddConnection2, I wasn't zeroing out the NetResource block first, so I did that and now I can see the S: drive in Windows Explorer.

That solves much of my problem, although I still think it would be nicer if you did the WNetAddConnection2 for me, rather than me having to do it myself, but I can live with that.

I noticed you changed the name of the Network node for the CbFs shares to "Virtual Network Shares" and that is certainly better than what it was. I also noticed that for the drive itself you call it "Network Drive". That again is OK, but it would be nice if we had the ability to rename it, like we did with the old Mounting Points in the CbFsGetVolumeLabel callback.
#9014
Posted: 02/23/2009 14:24:32
by Volodymyr Zinin (EldoS Corp.)

Quote
Sid Schipper wrote:
That solves much of my problem, although I still think it would be nicer if you did the WNetAddConnection2 for me, rather than me having to do it myself, but I can live with that.

It isn't necessary to call WNetAddConnection2 (but you can do it). AddNetworkMountingPoint does the same work. The problem is because you call this function from the other logon session (from the local System account). To fix it either create the the global type of mounting point or if you want to use the local type of mounting points then specify the authentication id for a destination session.

Quote
Sid Schipper wrote:
I also noticed that for the drive itself you call it "Network Drive". That again is OK, but it would be nice if we had the ability to rename it, like we did with the old Mounting Points in the CbFsGetVolumeLabel callback.

It isn't possible to change the network drive label. Explorer composes it itself using the server and the share names. For example see in the screenshot attached above the network drive with label "Srb_q on P125252".
#9015
Posted: 02/23/2009 15:04:03
by Sid Schipper (Standard support level)
Joined: 03/14/2008
Posts: 285

I'm sorry, Vladimir, but if you look at the call to AddNetworkMountingPoint that I use in my code snippet, I have the LocalLink parameter set to FALSE, which I understood meant that it was a global mounting point. Do I need to set that parameter to TRUE? And if so, then I think your doc for it is very confusing. Local = FALSE should mean global, shouldn't it?
#9016
Posted: 02/23/2009 15:07:39
by Sid Schipper (Standard support level)
Joined: 03/14/2008
Posts: 285

Also, I have verified that the driver is the 0.0.0.1 driver.
#9018
Posted: 02/23/2009 15:28:16
by Sid Schipper (Standard support level)
Joined: 03/14/2008
Posts: 285

Never Mind!, Vladimir. I must have had some leftover stuff from before, because I just pulled out the WNetAddConnection2 call from my code and I still can see the S; drive in Windows Explorer. I can't understand why it wasn't working earlier, but it probably was just a misunderstanding on my part, sorry.

So, now everything is working as it should and I think this thread of messages is closed.
Also by EldoS: Rethync
The cross-platform framework that simplifies synchronizing data between mobile and desktop applications and servers and cloud storages

Reply

Statistics

Topic viewed 34300 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!