| 91 | } |
| 92 | |
| 93 | NTSTATUS |
| 94 | Ext2QueryEa ( |
| 95 | IN PEXT2_IRP_CONTEXT IrpContext |
| 96 | ) |
| 97 | { |
| 98 | PIRP Irp = NULL; |
| 99 | PIO_STACK_LOCATION IrpSp; |
| 100 | |
| 101 | PDEVICE_OBJECT DeviceObject; |
| 102 | |
| 103 | PEXT2_VCB Vcb = NULL; |
| 104 | PEXT2_FCB Fcb = NULL; |
| 105 | PEXT2_CCB Ccb = NULL; |
| 106 | PEXT2_MCB Mcb = NULL; |
| 107 | |
| 108 | PUCHAR UserEaList; |
| 109 | ULONG UserEaListLength; |
| 110 | ULONG UserEaIndex; |
| 111 | |
| 112 | BOOLEAN RestartScan; |
| 113 | BOOLEAN ReturnSingleEntry; |
| 114 | BOOLEAN IndexSpecified; |
| 115 | |
| 116 | BOOLEAN MainResourceAcquired = FALSE; |
| 117 | BOOLEAN XattrRefAcquired = FALSE; |
| 118 | |
| 119 | NTSTATUS Status = STATUS_UNSUCCESSFUL; |
| 120 | |
| 121 | struct ext4_xattr_ref xattr_ref; |
| 122 | PCHAR UserBuffer; |
| 123 | |
| 124 | ULONG UserBufferLength = 0; |
| 125 | ULONG RemainingUserBufferLength = 0; |
| 126 | |
| 127 | PFILE_FULL_EA_INFORMATION FullEa, LastFullEa = NULL; |
| 128 | |
| 129 | __try { |
| 130 | |
| 131 | Ccb = IrpContext->Ccb; |
| 132 | ASSERT(Ccb != NULL); |
| 133 | ASSERT((Ccb->Identifier.Type == EXT2CCB) && |
| 134 | (Ccb->Identifier.Size == sizeof(EXT2_CCB))); |
| 135 | DeviceObject = IrpContext->DeviceObject; |
| 136 | Vcb = (PEXT2_VCB)DeviceObject->DeviceExtension; |
| 137 | Fcb = IrpContext->Fcb; |
| 138 | Mcb = Fcb->Mcb; |
| 139 | Irp = IrpContext->Irp; |
| 140 | IrpSp = IoGetCurrentIrpStackLocation(Irp); |
| 141 | |
| 142 | Irp->IoStatus.Information = 0; |
| 143 | |
| 144 | // |
| 145 | // Receive input parameter from caller |
| 146 | // |
| 147 | UserBuffer = Ext2GetUserBuffer(Irp); |
| 148 | if (!UserBuffer) { |
| 149 | Status = STATUS_INSUFFICIENT_RESOURCES; |
| 150 | __leave; |
no test coverage detected