NetAccessGetInfo() on Redirected Drives (93443)
The information in this article applies to:
- Microsoft LAN Manager 2.0
- Microsoft LAN Manager 2.1
This article was previously published under Q93443 SUMMARY
PROBLEM ID: PRLAN9212004
SYMPTOMS
The servername obtained from resolving a redirected drive overrides the
one provided with the NetAccessGetInfo() API.
NetAccessGetInfo() is used to get permission information for a resource.
It is used as follows:
unsigned far pascal
NetAccessGetInfo(
char far * servername, /* where to execute */
char far * resource, /* resource pathname */
short level, /* level of detail */
char far * buf, /* return data buffer */
USHORT buflen, /* size of buf */
USHORT far * btotal /* total bytes available */
)
The API should do the following
if(servername == NULL)
if(IsRedirectedDrive(resource))
return ERROR;
because redirected drives should be resolved only if you say "change
ACLs on my E drive, which just happens to be redirected". If you
actually pass NetAccessGetInfo() a servername, it should not resolve any
drive letters because they are not local.
CAUSE
Suppose \\server1 provides a share
net share share1 = f:\usrs\usrshare
and a workstation connects to this share as follows:
net use e: \\server1\share1
The following NetAccessGetInfo() call from the workstation will not be
resolved as expected:
NetAccessGetInfo("\\server2","e:",parm,...);
What occurs is:
NetAccessGetInfo("\\server1","f:\usrs\usrshare",parm,...);
As a result, the API gets information from the wrong server. This is
undesirable because it is common for servers to have D and E drives and
it is also common for workstations that do not have D or E drives to use
D and E on the server as redirected drives. The validity of ACLs cannot
be guaranteed in this situation.
RESOLUTION
Do not use NetAccessGetInfo() on a drive that is redirected to a server
other than the one mentioned as the first parameter to the call.
STATUS
Microsoft has confirmed this to be a problem in LAN Manager versions 2.0
and 2.1. We are researching this problem and will post new information
here as it becomes available.
Modification Type: | Major | Last Reviewed: | 9/30/2003 |
---|
Keywords: | KB93443 |
---|
|