@@ -1616,122 +1616,12 @@ SamrQueryInformationDomain(IN SAMPR_HANDLE DomainHandle,
1616
1616
IN DOMAIN_INFORMATION_CLASS DomainInformationClass ,
1617
1617
OUT PSAMPR_DOMAIN_INFO_BUFFER * Buffer )
1618
1618
{
1619
- PSAM_DB_OBJECT DomainObject ;
1620
- ACCESS_MASK DesiredAccess ;
1621
- NTSTATUS Status ;
1622
-
1623
1619
TRACE ("SamrQueryInformationDomain(%p %lu %p)\n" ,
1624
1620
DomainHandle , DomainInformationClass , Buffer );
1625
1621
1626
- switch (DomainInformationClass )
1627
- {
1628
- case DomainPasswordInformation :
1629
- case DomainLockoutInformation :
1630
- DesiredAccess = DOMAIN_READ_PASSWORD_PARAMETERS ;
1631
- break ;
1632
-
1633
- case DomainGeneralInformation :
1634
- case DomainLogoffInformation :
1635
- case DomainOemInformation :
1636
- case DomainNameInformation :
1637
- case DomainReplicationInformation :
1638
- case DomainServerRoleInformation :
1639
- case DomainModifiedInformation :
1640
- case DomainStateInformation :
1641
- case DomainModifiedInformation2 :
1642
- DesiredAccess = DOMAIN_READ_OTHER_PARAMETERS ;
1643
- break ;
1644
-
1645
- case DomainGeneralInformation2 :
1646
- DesiredAccess = DOMAIN_READ_PASSWORD_PARAMETERS |
1647
- DOMAIN_READ_OTHER_PARAMETERS ;
1648
- break ;
1649
-
1650
- default :
1651
- return STATUS_INVALID_INFO_CLASS ;
1652
- }
1653
-
1654
- RtlAcquireResourceShared (& SampResource ,
1655
- TRUE);
1656
-
1657
- /* Validate the server handle */
1658
- Status = SampValidateDbObject (DomainHandle ,
1659
- SamDbDomainObject ,
1660
- DesiredAccess ,
1661
- & DomainObject );
1662
- if (!NT_SUCCESS (Status ))
1663
- goto done ;
1664
-
1665
- switch (DomainInformationClass )
1666
- {
1667
- case DomainPasswordInformation :
1668
- Status = SampQueryDomainPassword (DomainObject ,
1669
- Buffer );
1670
- break ;
1671
-
1672
- case DomainGeneralInformation :
1673
- Status = SampQueryDomainGeneral (DomainObject ,
1674
- Buffer );
1675
- break ;
1676
-
1677
- case DomainLogoffInformation :
1678
- Status = SampQueryDomainLogoff (DomainObject ,
1679
- Buffer );
1680
- break ;
1681
-
1682
- case DomainOemInformation :
1683
- Status = SampQueryDomainOem (DomainObject ,
1684
- Buffer );
1685
- break ;
1686
-
1687
- case DomainNameInformation :
1688
- Status = SampQueryDomainName (DomainObject ,
1689
- Buffer );
1690
- break ;
1691
-
1692
- case DomainReplicationInformation :
1693
- Status = SampQueryDomainReplication (DomainObject ,
1694
- Buffer );
1695
- break ;
1696
-
1697
- case DomainServerRoleInformation :
1698
- Status = SampQueryDomainServerRole (DomainObject ,
1699
- Buffer );
1700
- break ;
1701
-
1702
- case DomainModifiedInformation :
1703
- Status = SampQueryDomainModified (DomainObject ,
1704
- Buffer );
1705
- break ;
1706
-
1707
- case DomainStateInformation :
1708
- Status = SampQueryDomainState (DomainObject ,
1709
- Buffer );
1710
- break ;
1711
-
1712
- case DomainGeneralInformation2 :
1713
- Status = SampQueryDomainGeneral2 (DomainObject ,
1714
- Buffer );
1715
- break ;
1716
-
1717
- case DomainLockoutInformation :
1718
- Status = SampQueryDomainLockout (DomainObject ,
1719
- Buffer );
1720
- break ;
1721
-
1722
- case DomainModifiedInformation2 :
1723
- Status = SampQueryDomainModified2 (DomainObject ,
1724
- Buffer );
1725
- break ;
1726
-
1727
- default :
1728
- Status = STATUS_NOT_IMPLEMENTED ;
1729
- }
1730
-
1731
- done :
1732
- RtlReleaseResource (& SampResource );
1733
-
1734
- return Status ;
1622
+ return SamrQueryInformationDomain2 (DomainHandle ,
1623
+ DomainInformationClass ,
1624
+ Buffer );
1735
1625
}
1736
1626
1737
1627
@@ -8572,12 +8462,122 @@ SamrQueryInformationDomain2(IN SAMPR_HANDLE DomainHandle,
8572
8462
IN DOMAIN_INFORMATION_CLASS DomainInformationClass ,
8573
8463
OUT PSAMPR_DOMAIN_INFO_BUFFER * Buffer )
8574
8464
{
8465
+ PSAM_DB_OBJECT DomainObject ;
8466
+ ACCESS_MASK DesiredAccess ;
8467
+ NTSTATUS Status ;
8468
+
8575
8469
TRACE ("SamrQueryInformationDomain2(%p %lu %p)\n" ,
8576
8470
DomainHandle , DomainInformationClass , Buffer );
8577
8471
8578
- return SamrQueryInformationDomain (DomainHandle ,
8579
- DomainInformationClass ,
8580
- Buffer );
8472
+ switch (DomainInformationClass )
8473
+ {
8474
+ case DomainPasswordInformation :
8475
+ case DomainLockoutInformation :
8476
+ DesiredAccess = DOMAIN_READ_PASSWORD_PARAMETERS ;
8477
+ break ;
8478
+
8479
+ case DomainGeneralInformation :
8480
+ case DomainLogoffInformation :
8481
+ case DomainOemInformation :
8482
+ case DomainNameInformation :
8483
+ case DomainReplicationInformation :
8484
+ case DomainServerRoleInformation :
8485
+ case DomainModifiedInformation :
8486
+ case DomainStateInformation :
8487
+ case DomainModifiedInformation2 :
8488
+ DesiredAccess = DOMAIN_READ_OTHER_PARAMETERS ;
8489
+ break ;
8490
+
8491
+ case DomainGeneralInformation2 :
8492
+ DesiredAccess = DOMAIN_READ_PASSWORD_PARAMETERS |
8493
+ DOMAIN_READ_OTHER_PARAMETERS ;
8494
+ break ;
8495
+
8496
+ default :
8497
+ return STATUS_INVALID_INFO_CLASS ;
8498
+ }
8499
+
8500
+ RtlAcquireResourceShared (& SampResource ,
8501
+ TRUE);
8502
+
8503
+ /* Validate the server handle */
8504
+ Status = SampValidateDbObject (DomainHandle ,
8505
+ SamDbDomainObject ,
8506
+ DesiredAccess ,
8507
+ & DomainObject );
8508
+ if (!NT_SUCCESS (Status ))
8509
+ goto done ;
8510
+
8511
+ switch (DomainInformationClass )
8512
+ {
8513
+ case DomainPasswordInformation :
8514
+ Status = SampQueryDomainPassword (DomainObject ,
8515
+ Buffer );
8516
+ break ;
8517
+
8518
+ case DomainGeneralInformation :
8519
+ Status = SampQueryDomainGeneral (DomainObject ,
8520
+ Buffer );
8521
+ break ;
8522
+
8523
+ case DomainLogoffInformation :
8524
+ Status = SampQueryDomainLogoff (DomainObject ,
8525
+ Buffer );
8526
+ break ;
8527
+
8528
+ case DomainOemInformation :
8529
+ Status = SampQueryDomainOem (DomainObject ,
8530
+ Buffer );
8531
+ break ;
8532
+
8533
+ case DomainNameInformation :
8534
+ Status = SampQueryDomainName (DomainObject ,
8535
+ Buffer );
8536
+ break ;
8537
+
8538
+ case DomainReplicationInformation :
8539
+ Status = SampQueryDomainReplication (DomainObject ,
8540
+ Buffer );
8541
+ break ;
8542
+
8543
+ case DomainServerRoleInformation :
8544
+ Status = SampQueryDomainServerRole (DomainObject ,
8545
+ Buffer );
8546
+ break ;
8547
+
8548
+ case DomainModifiedInformation :
8549
+ Status = SampQueryDomainModified (DomainObject ,
8550
+ Buffer );
8551
+ break ;
8552
+
8553
+ case DomainStateInformation :
8554
+ Status = SampQueryDomainState (DomainObject ,
8555
+ Buffer );
8556
+ break ;
8557
+
8558
+ case DomainGeneralInformation2 :
8559
+ Status = SampQueryDomainGeneral2 (DomainObject ,
8560
+ Buffer );
8561
+ break ;
8562
+
8563
+ case DomainLockoutInformation :
8564
+ Status = SampQueryDomainLockout (DomainObject ,
8565
+ Buffer );
8566
+ break ;
8567
+
8568
+ case DomainModifiedInformation2 :
8569
+ Status = SampQueryDomainModified2 (DomainObject ,
8570
+ Buffer );
8571
+ break ;
8572
+
8573
+ default :
8574
+ Status = STATUS_NOT_IMPLEMENTED ;
8575
+ }
8576
+
8577
+ done :
8578
+ RtlReleaseResource (& SampResource );
8579
+
8580
+ return Status ;
8581
8581
}
8582
8582
8583
8583
0 commit comments