public override RpcReply Call(String clientString, RpcCall call, byte[] callParameters, UInt32 callOffset, UInt32 callMaxOffset, out ISerializer replyParameters) { String nfsMethodName; ISerializer callData; Int32 extraPerfoamanceData = -1; Int64 beforeCall = Stopwatch.GetTimestamp(); Boolean printCall = true, printReply = true; switch (call.procedure) { case (UInt32)Nfs3Command.NULL: nfsMethodName = "NULL"; callData = VoidSerializer.Instance; replyParameters = VoidSerializer.Instance; break; case (UInt32)Nfs3Command.GETATTR: nfsMethodName = "GETATTR"; GetFileAttributesCall getFileAttributesCall = new GetFileAttributesCall(callParameters, callOffset, callMaxOffset); callData = getFileAttributesCall.CreateSerializer(); replyParameters = GETATTR(getFileAttributesCall).CreateSerializer(); break; case (UInt32)Nfs3Command.SETATTR: nfsMethodName = "SETATTR"; SetFileAttributesCall setFileAttributesCall = new SetFileAttributesCall(callParameters, callOffset, callMaxOffset); callData = setFileAttributesCall.CreateSerializer(); replyParameters = SETATTR(setFileAttributesCall).CreateSerializer(); break; case (UInt32)Nfs3Command.LOOKUP: nfsMethodName = "LOOKUP"; printReply = false; LookupCall lookupCall = new LookupCall(callParameters, callOffset, callMaxOffset); callData = lookupCall.CreateSerializer(); replyParameters = LOOKUP(lookupCall).CreateSerializer(); break; case (UInt32)Nfs3Command.ACCESS: nfsMethodName = "ACCESS"; AccessCall accessCall = new AccessCall(callParameters, callOffset, callMaxOffset); callData = accessCall.CreateSerializer(); replyParameters = ACCESS(accessCall).CreateSerializer(); break; case (UInt32)Nfs3Command.READ: nfsMethodName = "READ"; printReply = false; ReadCall readCall = new ReadCall(callParameters, callOffset, callMaxOffset); callData = readCall.CreateSerializer(); replyParameters = READ(readCall).CreateSerializer(); extraPerfoamanceData = (Int32)readCall.count; break; case (UInt32)Nfs3Command.WRITE: nfsMethodName = "WRITE"; printCall = false; WriteCall writeCall = new WriteCall(callParameters, callOffset, callMaxOffset); callData = writeCall.CreateSerializer(); replyParameters = WRITE(writeCall).CreateSerializer(); extraPerfoamanceData = (Int32)writeCall.count; break; case (UInt32)Nfs3Command.CREATE: nfsMethodName = "CREATE"; CreateCall createCall = new CreateCall(callParameters, callOffset, callMaxOffset); callData = createCall.CreateSerializer(); replyParameters = CREATE(createCall).CreateSerializer(); break; case (UInt32)Nfs3Command.MKDIR: nfsMethodName = "MKDIR"; MkdirCall mkdirCall = new MkdirCall(callParameters, callOffset, callMaxOffset); callData = mkdirCall.CreateSerializer(); replyParameters = MKDIR(mkdirCall).CreateSerializer(); break; case (UInt32)Nfs3Command.SYMLINK: nfsMethodName = "SYMLINK"; SymLinkCall symLinkCall = new SymLinkCall(callParameters, callOffset, callMaxOffset); callData = symLinkCall.CreateSerializer(); replyParameters = SYMLINK(symLinkCall).CreateSerializer(); break; case (UInt32)Nfs3Command.REMOVE: case (UInt32)Nfs3Command.RMDIR: nfsMethodName = "REMOVE/RMDIR"; RemoveCall removeCall = new RemoveCall(callParameters, callOffset, callMaxOffset); callData = removeCall.CreateSerializer(); replyParameters = REMOVE(removeCall).CreateSerializer(); break; case (UInt32)Nfs3Command.RENAME: nfsMethodName = "RENAME"; RenameCall renameCall = new RenameCall(callParameters, callOffset, callMaxOffset); callData = renameCall.CreateSerializer(); replyParameters = RENAME(renameCall).CreateSerializer(); break; case (UInt32)Nfs3Command.READDIRPLUS: nfsMethodName = "READDIRPLUS"; printReply = false; ReadDirPlusCall readDirPlusCall = new ReadDirPlusCall(callParameters, callOffset, callMaxOffset); callData = readDirPlusCall.CreateSerializer(); replyParameters = READDIRPLUS(readDirPlusCall).CreateSerializer(); break; case (UInt32)Nfs3Command.FSSTAT: nfsMethodName = "FSSTAT"; FileSystemStatusCall fileSystemInfoCall = new FileSystemStatusCall(callParameters, callOffset, callMaxOffset); callData = fileSystemInfoCall.CreateSerializer(); replyParameters = FSSTAT(fileSystemInfoCall).CreateSerializer(); break; case (UInt32)Nfs3Command.FSINFO: nfsMethodName = "FSINFO"; // // Deserialize // FSInfoCall fsInfoCall = new FSInfoCall(callParameters, callOffset, callMaxOffset); callData = fsInfoCall.CreateSerializer(); replyParameters = FSINFO(fsInfoCall).CreateSerializer(); break; case (UInt32)Nfs3Command.COMMIT: nfsMethodName = "COMMIT"; // Since this server does not perform unstable writes at the moment, this function is unnecessary CommitCall commitCall = new CommitCall(callParameters, callOffset, callMaxOffset); callData = commitCall.CreateSerializer(); //replyParameters = Handle(commitCall).CreateSerializer(); CommitReply commitReply = new CommitReply(BeforeAndAfterAttributes.None, null); replyParameters = commitReply.CreateSerializer(); break; default: if (NfsServerLog.warningLogger != null) { NfsServerLog.warningLogger.WriteLine("[{0}] [Warning] client '{1}' sent unknown procedure number {2}", serviceName, clientString, call.procedure); } replyParameters = VoidSerializer.Instance; return(new RpcReply(RpcVerifier.None, RpcAcceptStatus.ProcedureUnavailable)); } Int64 afterCall = Stopwatch.GetTimestamp(); Int64 callStopwatchTicks = afterCall - beforeCall; if (NfsServerLog.rpcCallLogger != null) { NfsServerLog.rpcCallLogger.WriteLine( #if WindowsCE JediTimer.JediTimerPrefix() + #endif "[{0}] {1} {2} => {3} {4:0.00} milliseconds", serviceName, nfsMethodName, printCall ? DataStringBuilder.DataSmallString(callData, NfsServerLog.sharedDataStringBuilder) : "[Call Ommited From Log]", printReply ? DataStringBuilder.DataSmallString(replyParameters, NfsServerLog.sharedDataStringBuilder) : "[Reply Ommited From Log]", callStopwatchTicks.StopwatchTicksAsDoubleMilliseconds()); } else if (NfsServerLog.warningLogger != null) { Double callMilliseconds = callStopwatchTicks.StopwatchTicksAsDoubleMilliseconds(); if (callMilliseconds >= 40) { NfsServerLog.warningLogger.WriteLine( #if WindowsCE JediTimer.JediTimerPrefix() + #endif "[{0}] [Warning] {1} {2} => {3} {4:0.00} milliseconds", serviceName, nfsMethodName, printCall ? DataStringBuilder.DataSmallString(callData, NfsServerLog.sharedDataStringBuilder) : "[Call Ommited From Log]", printReply ? DataStringBuilder.DataSmallString(replyParameters, NfsServerLog.sharedDataStringBuilder) : "[Reply Ommited From Log]", callMilliseconds); } } if (NfsServerLog.performanceLog != null) { NfsServerLog.performanceLog.Log((Nfs3Command)call.procedure, (UInt32)callStopwatchTicks.StopwatchTicksAsMicroseconds(), extraPerfoamanceData); } //servicesManager.PrintPerformance(); return(new RpcReply(RpcVerifier.None)); }
public ReadDirPlusReply READDIRPLUS(ReadDirPlusCall readDirPlusCall) { ShareObject directoryShareObject; Status status = sharedFileSystem.TryGetSharedObject(readDirPlusCall.directoryHandle, out directoryShareObject); if (status != Status.Ok) { return(new ReadDirPlusReply(status, OptionalFileAttributes.None)); } UInt64 cookie = readDirPlusCall.cookie; EntryPlus lastEntry = null; GenericArrayBuilder <EntryPlus> entriesBuilder = new GenericArrayBuilder <EntryPlus>(); UInt32 directoryInfoByteCount = 0; Boolean foundCookieObject; if (cookie > 0) { if (cookie == directoryShareObject.cookie) { foundCookieObject = true; } else { foundCookieObject = false; } } else { foundCookieObject = true; // This is the first call so there is no cookie to look for // Handle the '.' directory (will always be included if cookie is 0) if (lastEntry != null) { lastEntry.IsNotLastEntry(); } lastEntry = new EntryPlus( directoryShareObject.fileID, ".", directoryShareObject.cookie, directoryShareObject.optionalFileAttributes, directoryShareObject.optionalFileHandleClass); entriesBuilder.Add(lastEntry); directoryInfoByteCount += 16 + (UInt32)directoryShareObject.shareLeafName.Length; } FileType currentFileType = FileType.Directory; String[] objectNames = Directory.GetDirectories(directoryShareObject.localPathAndName); while (true) { for (int i = 0; i < objectNames.Length; i++) { String objectName = objectNames[i]; ShareObject shareObject = sharedFileSystem.TryGetSharedObject(currentFileType, directoryShareObject.localPathAndName, objectName); if (shareObject == null) { if (NfsServerLog.warningLogger != null) { NfsServerLog.warningLogger.WriteLine("[{0}] [Warning] Could not create or access share object for local directory '{1}'", serviceName, objectName); } continue; } if (!foundCookieObject) { if (shareObject.cookie == cookie) { foundCookieObject = true; } } else { UInt32 entryInfoByteCount = 16 + (UInt32)shareObject.shareLeafName.Length; if (directoryInfoByteCount + entryInfoByteCount > readDirPlusCall.maxDirectoryBytes) { return(new ReadDirPlusReply(directoryShareObject.optionalFileAttributes, null, entriesBuilder.Build(), false)); } directoryInfoByteCount += entryInfoByteCount; shareObject.RefreshFileAttributes(sharedFileSystem.permissions); if (lastEntry != null) { lastEntry.IsNotLastEntry(); } lastEntry = new EntryPlus( shareObject.fileID, shareObject.shareLeafName, shareObject.cookie, shareObject.optionalFileAttributes,//OptionalFileAttributes.None, shareObject.optionalFileHandleClass); entriesBuilder.Add(lastEntry); } } if (currentFileType == FileType.Directory) { objectNames = Directory.GetFiles(directoryShareObject.localPathAndName); currentFileType = FileType.Regular; } else { break; } } directoryShareObject.RefreshFileAttributes(sharedFileSystem.permissions); if (!foundCookieObject) { return(new ReadDirPlusReply(Status.ErrorBadCookie, directoryShareObject.optionalFileAttributes)); } return(new ReadDirPlusReply(directoryShareObject.optionalFileAttributes, null, entriesBuilder.Build(), true)); }
static void Main(string[] args) { if (args.Length != 2) { Console.Error.WriteLine("Error: Expected 2 command line arguments but got {0}", args.Length); return; } // // Options // Boolean forceMountToUsePrivelegedSourcePort = false; Boolean forceNfsToUsePrivelegedSourcePort = false; IPAddress serverHost = EndPoints.ParseIPOrResolveHost(args[0], DnsPriority.IPv4ThenIPv6); String remoteMountDirectory = args[1]; // // // RpcTcpClientConnection portmapConnection = null; RpcTcpClientConnection mountConnection = null; RpcTcpClientConnection nfsConnection = null; DateTime epoch = new DateTime(1970, 1, 1); UInt32 stamp = (UInt32)DateTime.Now.Subtract(epoch).TotalSeconds; RpcCredentials portmapCredentials = RpcCredentials.None; RpcCredentials mountCredentials = RpcCredentials.CreateUnixCredentials(new RpcUnixCredentials(stamp, //0x509d4ff4U, "hplx0274.boi.hp.com", 0, 0, new UInt32[] { 0, 1, 1, 2, 3, 4, 6, 10, 101, 10000, 10070, 10091, 39747 })); RpcCredentials nfsCredentials = mountCredentials; try { StringBuilder builder = new StringBuilder(); Buf buffer = new Buf(1024, 1024); // // Make connection to portmap service // portmapConnection = new RpcTcpClientConnection(new Socket(serverHost.AddressFamily, SocketType.Stream, ProtocolType.Tcp), PortMap2.ProgramHeader, portmapCredentials, RpcVerifier.None); //IPEndPoint portmapEndPoint = new IPEndPoint(serverHost, 111); portmapConnection.socket.Connect(serverHost, 111); // // Dump // PortMap2Procedure.DumpReply dumpReply = new PortMap2Procedure.DumpReply(); ISerializer dumpReplySerializer = dumpReply.CreateSerializer(); portmapConnection.CallBlockingTcp(PortMap2.DUMP, VoidSerializer.Instance, dumpReply.CreateSerializer(), buffer); builder.Length = 0; dumpReplySerializer.DataString(builder); Console.WriteLine(builder.ToString()); // // Get Nfs Port // Mapping getNfsPortMapping = new Mapping( Nfs3.ProgramHeader.program, Nfs3.ProgramHeader.programVersion, PortMap.IPProtocolTcp, 0 // Port 0 ); GetPortReply getNfsPortReply = portmapConnection.CallBlockingTcp(PortMap2.GETPORT, getNfsPortMapping.CreateSerializerAdapater(), GetPortReply.Serializer, buffer); Console.WriteLine("Nfs Port: {0}", getNfsPortReply.port); // // Connect to NFS Service // nfsConnection = new RpcTcpClientConnection(new Socket(serverHost.AddressFamily, SocketType.Stream, ProtocolType.Tcp), Nfs3.ProgramHeader, nfsCredentials, RpcVerifier.None); if (forceNfsToUsePrivelegedSourcePort) { nfsConnection.BindToPrivelegedPort(); } nfsConnection.socket.Connect(serverHost, (Int32)getNfsPortReply.port); // // Test NFS Service // nfsConnection.CallBlockingTcp((UInt32)Nfs3Command.NULL, VoidSerializer.Instance, VoidSerializer.Instance, buffer); // // Get Mount Port // Mapping getMountPort = new Mapping( Mount3.ProgramHeader.program, Mount3.ProgramHeader.programVersion, PortMap.IPProtocolTcp, 0 // Port 0 ); GetPortReply getMountPortReply = portmapConnection.CallBlockingTcp(PortMap2.GETPORT, getMountPort.CreateSerializerAdapater(), GetPortReply.Serializer, buffer); Console.WriteLine("Mount Port: {0}", getMountPortReply.port); // // Connect to Mount Service // mountConnection = new RpcTcpClientConnection(new Socket(serverHost.AddressFamily, SocketType.Stream, ProtocolType.Tcp), Mount3.ProgramHeader, mountCredentials, RpcVerifier.None); if (forceMountToUsePrivelegedSourcePort) { mountConnection.BindToPrivelegedPort(); } mountConnection.socket.Connect(serverHost, (Int32)getMountPortReply.port); // // Test Mount Service // mountConnection.CallBlockingTcp <Object>(Mount.NULL, VoidSerializer.Instance, VoidInstanceSerializer.Instance, buffer); // // Mount the remote direcory // Mount3Reply mountReply = new Mount3Reply(Status.ErrorInvalidArgument); ISerializer mountReplySerializer = mountReply.CreateSerializer(); MountCall mountCall = new MountCall(remoteMountDirectory); mountConnection.CallBlockingTcp(Mount.MNT, mountCall.CreateSerializer(), mountReplySerializer, buffer); Console.WriteLine(); Console.WriteLine(DataStringBuilder.DataString(mountReplySerializer, builder)); AssertOK(mountReply.status); Byte[] rootDirectoryHandle = mountReply.fileHandle; ReadDirPlusCall readDirPlusCall = new ReadDirPlusCall(rootDirectoryHandle, 0, null, 512, UInt32.MaxValue); ReadDirPlusReply readDirPlusReply = new ReadDirPlusReply(Status.ErrorInvalidArgument, null); nfsConnection.CallBlockingTcp((UInt32)Nfs3Command.READDIRPLUS, readDirPlusCall.CreateSerializer(), readDirPlusReply.CreateSerializer(), buffer); for (int i = 0; i < readDirPlusReply.entries.Length; i++) { EntryPlus entry = readDirPlusReply.entries[i]; Console.WriteLine("Entry[{0}] = {1}", i, entry.fileName); } //Console.WriteLine(); //Console.WriteLine(ISerializerString.DataString(readDirPlus.reply.CreateSerializer())); /* * * // * // Get FileSystemInfo * // * Nfs3Procedure.FSInfoCall fileSystemInfo = new Nfs3Procedure.FSInfoCall(rootDirectoryHandle); * nfsConnection.CallBlockingTcp(fileSystemInfo.CreateSerializer(), buffer); * Console.WriteLine(); * //Console.WriteLine(fileSystemInfo.reply.ToNiceString()); * * //AssertOK(fileSystemInfo.reply.status); * * // * // Get File Attributes * // * Nfs3Procedure.GetFileAttributes getFileAttributes = new Nfs3Procedure.GetFileAttributes(new Nfs3Procedure.GetFileAttributesCall( * rootDirectoryHandle * )); * nfsConnection.CallBlockingTcp(getFileAttributes, buffer); * Console.WriteLine(); * Console.WriteLine(getFileAttributes.reply.ToNiceString()); * * AssertOK(getFileAttributes.reply.status); * * // * // Access the file * // * Nfs3Procedure.Access access = new Nfs3Procedure.Access(new Nfs3Procedure.AccessCall( * rootDirectoryHandle, * Nfs3Procedure.AccessFlags.Delete | Nfs3Procedure.AccessFlags.Execute | Nfs3Procedure.AccessFlags.Extend | * Nfs3Procedure.AccessFlags.Lookup | Nfs3Procedure.AccessFlags.Modify | Nfs3Procedure.AccessFlags.Read * )); * nfsConnection.CallBlockingTcp(access, buffer); * Console.WriteLine(); * Console.WriteLine(access.reply.ToNiceString()); * * AssertOK(access.reply.status); * * // * // * // * * Nfs3Procedure.ReadDirPlus readDirPlus = new Nfs3Procedure.ReadDirPlus(new Nfs3Procedure.ReadDirPlusCall( * rootDirectoryHandle, 0, null, Int32.MaxValue, Int32.MaxValue)); * nfsConnection.CallBlockingTcp(readDirPlus, buffer); * * AssertOK(readDirPlus.reply.status); * * if (readDirPlus.reply.entriesIncluded) * { * Nfs3Procedure.EntryPlus entryPlus = readDirPlus.reply.entry; * * while(true) * { * Console.WriteLine(); * Console.WriteLine("ID '{0}' Name '{1}' Cookie '{2}'", entryPlus.fileID, entryPlus.fileName, * entryPlus.cookie); * * Nfs3Procedure.Lookup lookup = new Nfs3Procedure.Lookup(new Nfs3Procedure.LookupCall( * rootDirectoryHandle, entryPlus.fileName)); * nfsConnection.CallBlockingTcp(lookup, buffer); * * AssertOK(lookup.reply.status); * * Console.WriteLine(" FileHandle: {0}", BitConverter.ToString(lookup.reply.fileHandle)); * * Nfs3Procedure.Read read = new Nfs3Procedure.Read(new Nfs3Procedure.ReadCall( * lookup.reply.fileHandle, 0, fileSystemInfo.reply.readSizeMax)); * nfsConnection.CallBlockingTcp(read, buffer); * * if(read.reply.status == Nfs3Procedure.Status.Ok) * { * if(read.reply.count <= 0) * { * Console.WriteLine(" FileLength: {0}", read.reply.count); * } * else * { * Console.WriteLine(" FileLength: {0} FirstPart: '{1}'", read.reply.count, * Encoding.UTF8.GetString(read.reply.fileData.bytes, 0, (read.reply.count > 10U)? 10 : (Int32)read.reply.count)); * } * } * * if(!entryPlus.nextEntryIncluded) break; * entryPlus = entryPlus.nextEntry; * } * } * * * // * // * // * * String temporaryTestDirectory = "TemporaryTestDir"; * String temporaryRenameDirectory = "TemporaryTestDirRenamed"; * String temporaryTestFileName = "TemporaryTestFile"; * * // * // check if test directory exists and remove it if it does * // * Lookup lookupTestDirectory = new Lookup(new LookupCall(rootDirectoryHandle, temporaryTestDirectory)); * nfsConnection.CallBlockingTcp(lookupTestDirectory, buffer); * * if (lookupTestDirectory.reply.status == Status.Ok) * { * Rmdir quickFixRmdir = new Rmdir(new RemoveCall(rootDirectoryHandle, temporaryTestDirectory)); * nfsConnection.CallBlockingTcp(quickFixRmdir, buffer); * * AssertOK(quickFixRmdir.reply.status); * } * else * { * if (lookupTestDirectory.reply.status != Status.ErrorNoSuchFileOrDirectory) * throw new InvalidOperationException(String.Format("Expected OK or NoSuchFileOrDirectory but got '{0}'", lookupTestDirectory.reply.status)); * } * * * * * // * // Test MkDir * // * Mkdir mkdir = new Mkdir(new MkdirCall(rootDirectoryHandle, temporaryTestDirectory, new SetAttributesStruct( * false, 0, false, 0, false, 0, false, 0, null, null))); * nfsConnection.CallBlockingTcp(mkdir, buffer); * Console.WriteLine(); * Console.WriteLine(mkdir.reply.ToNiceString()); * * AssertOK(mkdir.reply.status); * if (mkdir.reply.optionalFileHandle.fileHandleIncluded == false) throw new Exception("no file handle returned from mkdir"); * * Byte[] newDirectoryHandle = mkdir.reply.optionalFileHandle.fileHandle; * * * // * // Test Create * // * * Create create = new Create(new CreateCall(newDirectoryHandle, temporaryTestFileName, CreateModeEnum.Unchecked, * new SetAttributesStruct( * false, 0, * false, 0, * false, 0, * false, 0, * null, * null))); * nfsConnection.CallBlockingTcp(create, buffer); * Console.WriteLine(); * Console.WriteLine(create.reply.ToNiceString()); * * AssertOK(create.reply.status); * if (create.reply.optionalFileHandle.fileHandleIncluded == false) throw new Exception("no file handle returned from Create"); * * Byte[] newFileHandle = create.reply.optionalFileHandle.fileHandle; * * // * // Test Write * // * Byte[] testWriteData = Encoding.UTF8.GetBytes("test data\r\nthis is a test write over nfs\r\n"); * Write write = new Write(new WriteCall(newFileHandle, StableHowEnum.Unstable, * testWriteData, 0, (UInt32)testWriteData.Length)); * nfsConnection.CallBlockingTcp(write, buffer); * * AssertOK(write.reply.status); * * // * // Test SetAttr * // * SetFileAttributes setAttributes = new SetFileAttributes(new SetFileAttributesCall( * newFileHandle, * new SetAttributesStruct(false, 0, false, 0, false, 0, false, 0, null, null), * null)); * nfsConnection.CallBlockingTcp(setAttributes, buffer); * Console.WriteLine(); * Console.WriteLine(setAttributes.reply.ToNiceString()); * * AssertOK(setAttributes.reply.status); * * // * // Test Remove * // * Remove remove = new Remove(new RemoveCall(newDirectoryHandle, temporaryTestFileName)); * nfsConnection.CallBlockingTcp(remove, buffer); * * Console.WriteLine(); * Console.WriteLine(remove.reply.ToNiceString()); * * AssertOK(remove.reply.status); * * // remove parent directory * remove = new Remove(new RemoveCall(rootDirectoryHandle, temporaryTestDirectory)); * nfsConnection.CallBlockingTcp(remove, buffer); * * Console.WriteLine(); * Console.WriteLine(remove.reply.ToNiceString()); * * AssertOK(remove.reply.status); * * // make parent directory again * nfsConnection.CallBlockingTcp(mkdir, buffer); * * Console.WriteLine(); * Console.WriteLine(mkdir.reply.ToNiceString()); * * AssertOK(mkdir.reply.status); * if (mkdir.reply.optionalFileHandle.fileHandleIncluded == false) throw new Exception("no file handle returned from mkdir"); * newDirectoryHandle = mkdir.reply.optionalFileHandle.fileHandle; * * * Rename rename = new Rename(new RenameCall(rootDirectoryHandle, temporaryTestDirectory, * rootDirectoryHandle, temporaryRenameDirectory)); * nfsConnection.CallBlockingTcp(rename, buffer); * * Console.WriteLine(); * Console.WriteLine(rename.reply.ToNiceString()); * * AssertOK(rename.reply.status); * * * // remove parent directory again using rmdir instead of remove * Rmdir rmdir = new Rmdir(new RemoveCall(rootDirectoryHandle, temporaryRenameDirectory)); * nfsConnection.CallBlockingTcp(rmdir, buffer); * * Console.WriteLine(); * Console.WriteLine(rmdir.reply.ToNiceString()); * * AssertOK(rmdir.reply.status); */ } finally { if (portmapConnection != null) { portmapConnection.Dispose(); } if (mountConnection != null) { mountConnection.Dispose(); } if (nfsConnection != null) { nfsConnection.Dispose(); } } }