From 62fa60a83a1ffc92aef53646142fbca1f2faf378 Mon Sep 17 00:00:00 2001 From: Casey Bodley Date: Tue, 12 Oct 2010 09:50:04 -0400 Subject: [PATCH] mount: nfs_mount -d removes persistent connections bug: connections created through 'net use' or 'map network drive' are not fully removed by 'nfs_mount -d'. the UNMOUNT upcall completes successfully, but the mount remains visible in net use and windows explorer; the next attempted use of the drive will send a new MOUNT and continue normally solution: added flag CONNECT_UPDATE_PROFILE to WNetCancelConnection2(): "The system updates the user profile with the information that the connection is no longer a persistent one." Signed-off-by: Casey Bodley --- mount/mount.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mount/mount.c b/mount/mount.c index a130684..26608f8 100644 --- a/mount/mount.c +++ b/mount/mount.c @@ -315,7 +315,7 @@ static DWORD DoUnmount( DWORD result; /* disconnect the specified local drive */ - result = WNetCancelConnection2(pLocalName, 0, bForce); + result = WNetCancelConnection2(pLocalName, CONNECT_UPDATE_PROFILE, bForce); /* TODO: verify that this connection uses the nfs41 provider -cbodley */ switch (result) {