diff options
author | Matthias Dieter Wallnöfer <mdw@samba.org> | 2010-10-16 20:46:20 +0200 |
---|---|---|
committer | Matthias Dieter Wallnöfer <mdw@samba.org> | 2010-10-16 20:48:01 +0200 |
commit | 02d9d8eeaff4337e28a8ad061c028f31bf214773 (patch) | |
tree | 6950d56812a4fbb826251a567e0b9db82660541e /source4 | |
parent | c4739f7be88bb7ef1da48cfef07b47cc351a1cb8 (diff) | |
download | samba-02d9d8eeaff4337e28a8ad061c028f31bf214773.tar.gz samba-02d9d8eeaff4337e28a8ad061c028f31bf214773.tar.bz2 samba-02d9d8eeaff4337e28a8ad061c028f31bf214773.zip |
s4:libcli/ldap/ldap_controls.c - fix up the controls list
- add missing private controls and comments
- use control defines rather than hardcoded values -> easier to comprehend
- reorder controls
Diffstat (limited to 'source4')
-rw-r--r-- | source4/libcli/ldap/ldap_controls.c | 78 |
1 files changed, 49 insertions, 29 deletions
diff --git a/source4/libcli/ldap/ldap_controls.c b/source4/libcli/ldap/ldap_controls.c index b8becb8955..8cc0a61cb3 100644 --- a/source4/libcli/ldap/ldap_controls.c +++ b/source4/libcli/ldap/ldap_controls.c @@ -22,7 +22,6 @@ #include "includes.h" #include "../lib/util/asn1.h" #include "libcli/ldap/libcli_ldap.h" -#include "lib/ldb/include/ldb.h" #include "libcli/ldap/ldap_proto.h" #include "dsdb/samdb/samdb.h" @@ -1138,41 +1137,62 @@ static bool decode_flag_request(void *mem_ctx, DATA_BLOB in, void *_out) } static const struct ldap_control_handler ldap_known_controls[] = { - { "1.2.840.113556.1.4.319", decode_paged_results_request, encode_paged_results_request }, - { "1.2.840.113556.1.4.529", decode_extended_dn_request, encode_extended_dn_request }, - { "1.2.840.113556.1.4.473", decode_server_sort_request, encode_server_sort_request }, - { "1.2.840.113556.1.4.474", decode_server_sort_response, encode_server_sort_response }, - { "1.2.840.113556.1.4.1504", decode_asq_control, encode_asq_control }, - { "1.2.840.113556.1.4.841", decode_dirsync_request, encode_dirsync_request }, - { "1.2.840.113556.1.4.528", decode_flag_request, encode_flag_request }, - { "1.2.840.113556.1.4.805", decode_flag_request, encode_flag_request }, - { "1.2.840.113556.1.4.417", decode_flag_request, encode_flag_request }, - { "1.2.840.113556.1.4.2064", decode_flag_request, encode_flag_request }, - { "1.2.840.113556.1.4.2065", decode_flag_request, encode_flag_request }, - { "1.2.840.113556.1.4.1413", decode_flag_request, encode_flag_request }, - { "1.2.840.113556.1.4.801", decode_sd_flags_request, encode_sd_flags_request }, - { "1.2.840.113556.1.4.1339", decode_flag_request, encode_flag_request }, - { "1.2.840.113556.1.4.1340", decode_search_options_request, encode_search_options_request }, - { "2.16.840.1.113730.3.4.2", decode_flag_request, encode_flag_request }, - { "2.16.840.1.113730.3.4.9", decode_vlv_request, encode_vlv_request }, - { "2.16.840.1.113730.3.4.10", decode_vlv_response, encode_vlv_response }, + { LDB_CONTROL_PAGED_RESULTS_OID, decode_paged_results_request, encode_paged_results_request }, + { LDB_CONTROL_SD_FLAGS_OID, decode_sd_flags_request, encode_sd_flags_request }, + { LDB_CONTROL_DOMAIN_SCOPE_OID, decode_flag_request, encode_flag_request }, + { LDB_CONTROL_SEARCH_OPTIONS_OID, decode_search_options_request, encode_search_options_request }, + { LDB_CONTROL_NOTIFICATION_OID, decode_flag_request, encode_flag_request }, + { LDB_CONTROL_TREE_DELETE_OID, decode_flag_request, encode_flag_request }, + { LDB_CONTROL_SHOW_DELETED_OID, decode_flag_request, encode_flag_request }, + { LDB_CONTROL_SHOW_RECYCLED_OID, decode_flag_request, encode_flag_request }, + { LDB_CONTROL_SHOW_DEACTIVATED_LINK_OID, decode_flag_request, encode_flag_request }, + { LDB_CONTROL_EXTENDED_DN_OID, decode_extended_dn_request, encode_extended_dn_request }, + { LDB_CONTROL_SERVER_SORT_OID, decode_server_sort_request, encode_server_sort_request }, + { LDB_CONTROL_SORT_RESP_OID, decode_server_sort_response, encode_server_sort_response }, + { LDB_CONTROL_ASQ_OID, decode_asq_control, encode_asq_control }, + { LDB_CONTROL_DIRSYNC_OID, decode_dirsync_request, encode_dirsync_request }, + { LDB_CONTROL_VLV_REQ_OID, decode_vlv_request, encode_vlv_request }, + { LDB_CONTROL_VLV_RESP_OID, decode_vlv_response, encode_vlv_response }, + { LDB_CONTROL_PERMISSIVE_MODIFY_OID, decode_flag_request, encode_flag_request }, + { LDB_CONTROL_SERVER_LAZY_COMMIT, decode_flag_request, encode_flag_request }, + { LDB_CONTROL_RODC_DCPROMO_OID, decode_flag_request, encode_flag_request }, + { LDB_CONTROL_RELAX_OID, decode_flag_request, encode_flag_request }, + { DSDB_OPENLDAP_DEREFERENCE_CONTROL, decode_openldap_dereference, encode_openldap_dereference }, + /* DSDB_CONTROL_CURRENT_PARTITION_OID is internal only, and has no network representation */ - { "1.3.6.1.4.1.7165.4.3.2", NULL, NULL }, + { DSDB_CONTROL_CURRENT_PARTITION_OID, NULL, NULL }, +/* DSDB_CONTROL_REPLICATED_UPDATE_OID is internal only, and has no network representation */ + { DSDB_CONTROL_REPLICATED_UPDATE_OID, NULL, NULL }, /* DSDB_CONTROL_DN_STORAGE_FORMAT_OID is internal only, and has no network representation */ - { "1.3.6.1.4.1.7165.4.3.4", NULL, NULL }, + { DSDB_CONTROL_DN_STORAGE_FORMAT_OID, NULL, NULL }, +/* LDB_CONTROL_RECALCULATE_SD_OID is internal only, and has no network representation */ + { LDB_CONTROL_RECALCULATE_SD_OID, NULL, NULL }, /* LDB_CONTROL_REVEAL_INTERNALS is internal only, and has no network representation */ - { "1.3.6.1.4.1.7165.4.3.6", NULL, NULL }, + { LDB_CONTROL_REVEAL_INTERNALS, NULL, NULL }, /* LDB_CONTROL_AS_SYSTEM_OID is internal only, and has no network representation */ - { "1.3.6.1.4.1.7165.4.3.7", NULL, NULL }, + { LDB_CONTROL_AS_SYSTEM_OID, NULL, NULL }, /* DSDB_CONTROL_PASSWORD_CHANGE_STATUS_OID is internal only, and has no network representation */ - { "1.3.6.1.4.1.7165.4.3.8", NULL, NULL }, + { DSDB_CONTROL_PASSWORD_CHANGE_STATUS_OID, NULL, NULL }, +/* DSDB_CONTROL_PASSWORD_HASH_VALUES_OID is internal only, and has no network representation */ + { DSDB_CONTROL_PASSWORD_HASH_VALUES_OID, NULL, NULL }, +/* DSDB_CONTROL_PASSWORD_CHANGE_OID is internal only, and has no network representation */ + { DSDB_CONTROL_PASSWORD_CHANGE_OID, NULL, NULL }, +/* DSDB_CONTROL_APPLY_LINKS is internal only, and has no network representation */ + { DSDB_CONTROL_APPLY_LINKS, NULL, NULL }, +/* DSDB_CONTROL_BYPASS_PASSWORD_HASH_OID is internal only, and has no network representation */ + { DSDB_CONTROL_BYPASS_PASSWORD_HASH_OID, NULL, NULL }, +/* LDB_CONTROL_BYPASSOPERATIONAL_OID is internal only, and has no network representation */ + { LDB_CONTROL_BYPASSOPERATIONAL_OID, NULL, NULL }, +/* DSDB_CONTROL_CHANGEREPLMETADATA_OID is internal only, and has no network representation */ + { DSDB_CONTROL_CHANGEREPLMETADATA_OID, NULL, NULL }, /* DSDB_CONTROL_SEARCH_APPLY_ACCESS is internal only, and has no network representation */ - { "1.3.6.1.4.1.7165.4.3.15", NULL, NULL }, + { DSDB_CONTROL_SEARCH_APPLY_ACCESS, NULL, NULL }, /* DSDB_EXTENDED_REPLICATED_OBJECTS_OID is internal only, and has no network representation */ - { "1.3.6.1.4.1.7165.4.4.1", NULL, NULL }, - { DSDB_OPENLDAP_DEREFERENCE_CONTROL, decode_openldap_dereference, encode_openldap_dereference}, - { LDB_CONTROL_RELAX_OID, decode_flag_request, encode_flag_request }, - { LDB_CONTROL_RODC_DCPROMO_OID, decode_flag_request, encode_flag_request }, + { DSDB_EXTENDED_REPLICATED_OBJECTS_OID, NULL, NULL }, +/* DSDB_EXTENDED_SCHEMA_UPDATE_NOW_OID is internal only, and has no network representation */ + { DSDB_EXTENDED_SCHEMA_UPDATE_NOW_OID, NULL, NULL }, +/* DSDB_EXTENDED_ALLOCATE_RID_POOL is internal only, and has no network representation */ + { DSDB_EXTENDED_ALLOCATE_RID_POOL, NULL, NULL }, { NULL, NULL, NULL } }; |