/// <summary> /// Deep copy constructor. /// </summary> public SmbNtTransactQuerySecurityDescResponsePacket(SmbNtTransactQuerySecurityDescResponsePacket packet) : base(packet) { this.InitDefaultValue(); this.NtTransParameters = packet.NtTransParameters; this.ntTransData.SecurityInformation = packet.ntTransData.SecurityInformation; }
public SmbNtTransactQuerySecurityDescResponsePacket CreateNtTransactQuerySecurityDescResponse( CifsServerPerConnection connection, SmbNtTransactQuerySecurityDescRequestPacket request, RawSecurityDescriptor securityInformation) { SmbNtTransactQuerySecurityDescResponsePacket response = new SmbNtTransactQuerySecurityDescResponsePacket(); response.SmbHeader = CifsMessageUtils.CreateSmbHeader(connection, request); NT_TRANSACT_QUERY_SECURITY_DESC_Response_NT_Trans_Parameters ntTransParameters = response.NtTransParameters; ntTransParameters.LengthNeeded = (uint)(securityInformation == null ? 0 : securityInformation.BinaryLength); response.NtTransParameters = ntTransParameters; NT_TRANSACT_QUERY_SECURITY_DESC_Response_NT_Trans_Data ntTransData = response.NtTransData; ntTransData.SecurityInformation = securityInformation; response.NtTransData = ntTransData; response.UpdateCountAndOffset(); return response; }