Dump msDS-SupportedEncryptionTypes in adssearch.
authorGünther Deschner <gd@samba.org>
Mon, 28 Jan 2008 18:22:17 +0000 (19:22 +0100)
committerGünther Deschner <gd@samba.org>
Mon, 28 Jan 2008 18:22:17 +0000 (19:22 +0100)
Guenther
(This used to be commit bc0b68709cbbdd71996a39e23fe8305e1f144f31)

examples/misc/adssearch.pl

index a63ae31..d17e680 100755 (executable)
@@ -3,7 +3,7 @@
 # adssearch.pl         - query an Active Directory server and
 #                display objects in a human readable format
 #
-# Copyright (C) Guenther Deschner <gd@samba.org> 2003-2007
+# Copyright (C) Guenther Deschner <gd@samba.org> 2003-2008
 #
 # TODO: add range retrieval
 #      write sddl-converter, decode userParameters
@@ -230,6 +230,7 @@ my %ads_mixed_domain = (
 my %ads_ds_func = (
 "DS_BEHAVIOR_WIN2000"                  => 0,   # untested
 "DS_BEHAVIOR_WIN2003"                  => 2,
+"DS_BEHAVIOR_WIN2008"                  => 3,
 );
 
 my %ads_instance_type = (
@@ -244,6 +245,14 @@ my %ads_uacc = (
        "ACCOUNT_LOCKED_OUT"            => 0x800010, # 8388624
 );
 
+my %ads_enctypes = (
+       "DES-CBC-CRC"                           => 0x01,
+       "DES-CBC-MD5"                           => 0x02,
+       "RC4_HMAC_MD5"                          => 0x04,
+       "AES128_CTS_HMAC_SHA1_96"               => 0x08,
+       "AES128_CTS_HMAC_SHA1_128"              => 0x10,
+);
+
 my %ads_gpoptions = (
        "GPOPTIONS_INHERIT"             => 0,
        "GPOPTIONS_BLOCK_INHERITANCE"   => 1,
@@ -518,6 +527,7 @@ my %attr_handler = (
        "modifyTimeStamp"               => \&dump_timestr,
        "msDS-Behavior-Version"         => \&dump_ds_func,      #unsure
        "msDS-User-Account-Control-Computed" => \&dump_uacc,
+       "msDS-SupportedEncryptionTypes" => \&dump_enctypes,
        "mS-DS-CreatorSID"              => \&dump_sid,
 #      "msRADIUSFramedIPAddress"       => \&dump_ipaddr,
 #      "msRASSavedFramedIPAddress"     => \&dump_ipaddr,
@@ -1209,6 +1219,10 @@ sub dump_uacc {
        return dump_bitmask_equal(@_,%ads_uacc); 
 }
 
+sub dump_enctypes {
+       return dump_bitmask_and(@_,%ads_enctypes);
+}
+
 sub dump_uf {
        return dump_bitmask_and(@_,%ads_uf);
 }