The branch, master has been updated
       via  a730155 pyldb: fix a bug in the unit test which prevented 
ldb.python to run all the tests in the testsuite
       via  f8a156d librpc: add bindings for dnsp in python
       via  17fdee0 ldb: use the sizeof of the control variable as offset 
instead of hardcoded values, helps to avoid bugs
       via  ad9b670 ldb: remove "magic" string in ldb_controls, replace them 
with constants defined in ldb.h
      from  91cad71 tdb: Fix a C++ warning

http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit a7301556d29ce7c2e637380da00a2ee640234fcc
Author: Matthieu Patou <[email protected]>
Date:   Wed Feb 9 10:18:02 2011 +0300

    pyldb: fix a bug in the unit test which prevented ldb.python to run all the 
tests in the testsuite
    
    Autobuild-User: Matthieu Patou <[email protected]>
    Autobuild-Date: Sun Feb 13 00:14:24 CET 2011 on sn-devel-104

commit f8a156dbe649177b9672d364908ef3355508c690
Author: Matthieu Patou <[email protected]>
Date:   Sat Feb 12 23:18:29 2011 +0300

    librpc: add bindings for dnsp in python

commit 17fdee0e92e09c1e5bf6319dfddf7b014b19f314
Author: Matthieu Patou <[email protected]>
Date:   Tue Feb 8 02:54:09 2011 +0300

    ldb: use the sizeof of the control variable as offset instead of hardcoded 
values, helps to avoid bugs

commit ad9b670f47c1abd8e3d737fdc0869b463ac57e87
Author: Matthieu Patou <[email protected]>
Date:   Thu Feb 10 13:49:26 2011 +0300

    ldb: remove "magic" string in ldb_controls, replace them with constants 
defined in ldb.h
    
    Allow to have less magic value in the control code and will allow not to
    duplicate names when doing a function that marshal a control to it's
    string representation

-----------------------------------------------------------------------

Summary of changes:
 librpc/idl/wscript_build              |    7 ++-
 librpc/wscript_build                  |    5 ++
 source4/lib/ldb/common/ldb_controls.c |   95 ++++++++++++++++++---------------
 source4/lib/ldb/include/ldb.h         |   23 ++++++++
 source4/lib/ldb/tests/python/api.py   |    3 +
 source4/librpc/wscript_build          |    6 ++
 6 files changed, 94 insertions(+), 45 deletions(-)


Changeset truncated at 500 lines:

diff --git a/librpc/idl/wscript_build b/librpc/idl/wscript_build
index c8402c6..33dd4c9 100644
--- a/librpc/idl/wscript_build
+++ b/librpc/idl/wscript_build
@@ -25,6 +25,11 @@ bld.SAMBA_PIDL_LIST('PIDL',
                     output_dir='../gen_ndr')
 
 bld.SAMBA_PIDL_LIST('PIDL',
-                    'rap.idl dnsp.idl ntprinting.idl preg.idl',
+                    'rap.idl ntprinting.idl preg.idl',
                     options='--header --ndr-parser',
                     output_dir='../gen_ndr')
+
+bld.SAMBA_PIDL_LIST('PIDL',
+                    'dnsp.idl',
+                    options='--header --ndr-parser --client --python',
+                    output_dir='../gen_ndr')
diff --git a/librpc/wscript_build b/librpc/wscript_build
index c9737fb..2870388 100644
--- a/librpc/wscript_build
+++ b/librpc/wscript_build
@@ -498,6 +498,11 @@ bld.SAMBA_SUBSYSTEM('RPC_NDR_BACKUPKEY',
        public_deps='dcerpc NDR_BACKUPKEY'
        )
 
+bld.SAMBA_SUBSYSTEM('RPC_NDR_DNSP',
+       source='gen_ndr/ndr_dnsp_c.c',
+       public_deps='dcerpc NDR_DNSP'
+       )
+
 # a grouping library for NDR subsystems that may be used by more than one 
target
 bld.SAMBA_LIBRARY('ndr-samba',
        source=[],
diff --git a/source4/lib/ldb/common/ldb_controls.c 
b/source4/lib/ldb/common/ldb_controls.c
index e3b2870..f3770b0 100644
--- a/source4/lib/ldb/common/ldb_controls.c
+++ b/source4/lib/ldb/common/ldb_controls.c
@@ -256,8 +256,15 @@ int ldb_request_replace_control(struct ldb_request *req, 
const char *oid, bool c
        return LDB_ERR_OPERATIONS_ERROR;
 }
 
-/* Parse controls from the format used on the command line and in ejs */
+/*
+ * A little trick to allow to use constants defined in headers rather than
+ * hardwritten in the file hardwritten in the file
+ * sizeof will return the \0 char as well so it will take the place of ":" in 
the
+ * length of the string
+ */
+#define LDB_CONTROL_CMP(control, NAME) strncmp(control, NAME ":", sizeof(NAME))
 
+/* Parse controls from the format used on the command line and in ejs */
 struct ldb_control **ldb_parse_control_strings(struct ldb_context *ldb, 
TALLOC_CTX *mem_ctx, const char **control_strings)
 {
        unsigned int i;
@@ -273,7 +280,8 @@ struct ldb_control **ldb_parse_control_strings(struct 
ldb_context *ldb, TALLOC_C
        ctrl = talloc_array(mem_ctx, struct ldb_control *, i + 1);
 
        for (i = 0; control_strings[i]; i++) {
-               if (strncmp(control_strings[i], "vlv:", 4) == 0) {
+               if (LDB_CONTROL_CMP(control_strings[i],
+                                       LDB_CONTROL_VLV_REQ_NAME) == 0) {
                        struct ldb_vlv_req_control *control;
                        const char *p;
                        char attr[1024];
@@ -282,7 +290,7 @@ struct ldb_control **ldb_parse_control_strings(struct 
ldb_context *ldb, TALLOC_C
 
                        attr[0] = '\0';
                        ctxid[0] = '\0';
-                       p = &(control_strings[i][4]);
+                       p = 
&(control_strings[i][sizeof(LDB_CONTROL_VLV_REQ_NAME)]);
                        ret = sscanf(p, "%d:%d:%d:%d:%d:%1023[^$]", &crit, &bc, 
&ac, &os, &cc, ctxid);
                        if (ret < 5) {
                                ret = sscanf(p, "%d:%d:%d:%1023[^:]:%1023[^$]", 
&crit, &bc, &ac, attr, ctxid);
@@ -330,14 +338,14 @@ struct ldb_control **ldb_parse_control_strings(struct 
ldb_context *ldb, TALLOC_C
                        continue;
                }
 
-               if (strncmp(control_strings[i], "dirsync:", 8) == 0) {
+               if (LDB_CONTROL_CMP(control_strings[i], 
LDB_CONTROL_DIRSYNC_NAME) == 0) {
                        struct ldb_dirsync_control *control;
                        const char *p;
                        char cookie[1024];
                        int crit, flags, max_attrs, ret;
                       
                        cookie[0] = '\0';
-                       p = &(control_strings[i][8]);
+                       p = 
&(control_strings[i][sizeof(LDB_CONTROL_DIRSYNC_NAME)]);
                        ret = sscanf(p, "%d:%d:%d:%1023[^$]", &crit, &flags, 
&max_attrs, cookie);
 
                        if ((ret < 3) || (crit < 0) || (crit > 1) || (flags < 
0) || (max_attrs < 0)) {
@@ -374,14 +382,14 @@ struct ldb_control **ldb_parse_control_strings(struct 
ldb_context *ldb, TALLOC_C
                        continue;
                }
 
-               if (strncmp(control_strings[i], "asq:", 4) == 0) {
+               if (LDB_CONTROL_CMP(control_strings[i], LDB_CONTROL_ASQ_NAME) 
== 0) {
                        struct ldb_asq_control *control;
                        const char *p;
                        char attr[256];
                        int crit, ret;
 
                        attr[0] = '\0';
-                       p = &(control_strings[i][4]);
+                       p = &(control_strings[i][sizeof(LDB_CONTROL_ASQ_NAME)]);
                        ret = sscanf(p, "%d:%255[^$]", &crit, attr);
                        if ((ret != 2) || (crit < 0) || (crit > 1) || (attr[0] 
== '\0')) {
                                error_string = talloc_asprintf(mem_ctx, 
"invalid asq control syntax\n");
@@ -408,12 +416,12 @@ struct ldb_control **ldb_parse_control_strings(struct 
ldb_context *ldb, TALLOC_C
                        continue;
                }
 
-               if (strncmp(control_strings[i], "extended_dn:", 12) == 0) {
+               if (LDB_CONTROL_CMP(control_strings[i], 
LDB_CONTROL_EXTENDED_DN_NAME) == 0) {
                        struct ldb_extended_dn_control *control;
                        const char *p;
                        int crit, type, ret;
 
-                       p = &(control_strings[i][12]);
+                       p = 
&(control_strings[i][sizeof(LDB_CONTROL_EXTENDED_DN_NAME)]);
                        ret = sscanf(p, "%d:%d", &crit, &type);
                        if ((ret != 2) || (crit < 0) || (crit > 1) || (type < 
0) || (type > 1)) {
                                ret = sscanf(p, "%d", &crit);
@@ -446,13 +454,13 @@ struct ldb_control **ldb_parse_control_strings(struct 
ldb_context *ldb, TALLOC_C
                        continue;
                }
 
-               if (strncmp(control_strings[i], "sd_flags:", 9) == 0) {
+               if (LDB_CONTROL_CMP(control_strings[i], 
LDB_CONTROL_SD_FLAGS_NAME) == 0) {
                        struct ldb_sd_flags_control *control;
                        const char *p;
                        int crit, ret;
                        unsigned secinfo_flags;
 
-                       p = &(control_strings[i][9]);
+                       p = 
&(control_strings[i][sizeof(LDB_CONTROL_SD_FLAGS_NAME)]);
                        ret = sscanf(p, "%d:%u", &crit, &secinfo_flags);
                        if ((ret != 2) || (crit < 0) || (crit > 1) || 
(secinfo_flags < 0) || (secinfo_flags > 0xF)) {
                                error_string = talloc_asprintf(mem_ctx, 
"invalid sd_flags control syntax\n");
@@ -477,13 +485,13 @@ struct ldb_control **ldb_parse_control_strings(struct 
ldb_context *ldb, TALLOC_C
                        continue;
                }
 
-               if (strncmp(control_strings[i], "search_options:", 15) == 0) {
+               if (LDB_CONTROL_CMP(control_strings[i], 
LDB_CONTROL_SEARCH_OPTIONS_NAME) == 0) {
                        struct ldb_search_options_control *control;
                        const char *p;
                        int crit, ret;
                        unsigned search_options;
 
-                       p = &(control_strings[i][15]);
+                       p = 
&(control_strings[i][sizeof(LDB_CONTROL_SEARCH_OPTIONS_NAME)]);
                        ret = sscanf(p, "%d:%u", &crit, &search_options);
                        if ((ret != 2) || (crit < 0) || (crit > 1) || 
(search_options < 0) || (search_options > 0xF)) {
                                error_string = talloc_asprintf(mem_ctx, 
"invalid search_options control syntax\n");
@@ -508,11 +516,11 @@ struct ldb_control **ldb_parse_control_strings(struct 
ldb_context *ldb, TALLOC_C
                        continue;
                }
 
-               if (strncmp(control_strings[i], "bypassoperational:", 18) == 0) 
{
+               if (LDB_CONTROL_CMP(control_strings[i], 
LDB_CONTROL_BYPASS_OPERATIONAL_NAME) == 0) {
                        const char *p;
                        int crit, ret;
 
-                       p = &(control_strings[i][18]);
+                       p = 
&(control_strings[i][sizeof(LDB_CONTROL_BYPASS_OPERATIONAL_NAME)]);
                        ret = sscanf(p, "%d", &crit);
                        if ((ret != 1) || (crit < 0) || (crit > 1)) {
                                error_string = talloc_asprintf(mem_ctx, 
"invalid bypassopreational control syntax\n");
@@ -535,11 +543,11 @@ struct ldb_control **ldb_parse_control_strings(struct 
ldb_context *ldb, TALLOC_C
                        continue;
                }
 
-               if (strncmp(control_strings[i], "relax:", 6) == 0) {
+               if (LDB_CONTROL_CMP(control_strings[i], LDB_CONTROL_RELAX_NAME) 
== 0) {
                        const char *p;
                        int crit, ret;
 
-                       p = &(control_strings[i][6]);
+                       p = 
&(control_strings[i][sizeof(LDB_CONTROL_RELAX_NAME)]);
                        ret = sscanf(p, "%d", &crit);
                        if ((ret != 1) || (crit < 0) || (crit > 1)) {
                                error_string = talloc_asprintf(mem_ctx, 
"invalid relax control syntax\n");
@@ -562,11 +570,11 @@ struct ldb_control **ldb_parse_control_strings(struct 
ldb_context *ldb, TALLOC_C
                        continue;
                }
 
-               if (strncmp(control_strings[i], "recalculate_sd:", 15) == 0) {
+               if (LDB_CONTROL_CMP(control_strings[i], 
LDB_CONTROL_RECALCULATE_SD_NAME) == 0) {
                        const char *p;
                        int crit, ret;
 
-                       p = &(control_strings[i][15]);
+                       p = 
&(control_strings[i][sizeof(LDB_CONTROL_RECALCULATE_SD_NAME)]);
                        ret = sscanf(p, "%d", &crit);
                        if ((ret != 1) || (crit < 0) || (crit > 1)) {
                                error_string = talloc_asprintf(mem_ctx, 
"invalid recalculate_sd control syntax\n");
@@ -589,11 +597,11 @@ struct ldb_control **ldb_parse_control_strings(struct 
ldb_context *ldb, TALLOC_C
                        continue;
                }
 
-               if (strncmp(control_strings[i], "domain_scope:", 13) == 0) {
+               if (LDB_CONTROL_CMP(control_strings[i], 
LDB_CONTROL_DOMAIN_SCOPE_NAME) == 0) {
                        const char *p;
                        int crit, ret;
 
-                       p = &(control_strings[i][13]);
+                       p = 
&(control_strings[i][sizeof(LDB_CONTROL_DOMAIN_SCOPE_NAME)]);
                        ret = sscanf(p, "%d", &crit);
                        if ((ret != 1) || (crit < 0) || (crit > 1)) {
                                error_string = talloc_asprintf(mem_ctx, 
"invalid domain_scope control syntax\n");
@@ -616,14 +624,13 @@ struct ldb_control **ldb_parse_control_strings(struct 
ldb_context *ldb, TALLOC_C
                        continue;
                }
 
-               if (strncmp(control_strings[i], "paged_results:", 14) == 0) {
+               if (LDB_CONTROL_CMP(control_strings[i], 
LDB_CONTROL_PAGED_RESULTS_NAME) == 0) {
                        struct ldb_paged_control *control;
                        const char *p;
                        int crit, size, ret;
                       
-                       p = &(control_strings[i][14]);
+                       p = 
&(control_strings[i][sizeof(LDB_CONTROL_PAGED_RESULTS_NAME)]);
                        ret = sscanf(p, "%d:%d", &crit, &size);
-
                        if ((ret != 2) || (crit < 0) || (crit > 1) || (size < 
0)) {
                                error_string = talloc_asprintf(mem_ctx, 
"invalid paged_results control syntax\n");
                                error_string = 
talloc_asprintf_append(error_string, " syntax: crit(b):size(n)\n");
@@ -649,7 +656,7 @@ struct ldb_control **ldb_parse_control_strings(struct 
ldb_context *ldb, TALLOC_C
                        continue;
                }
 
-               if (strncmp(control_strings[i], "server_sort:", 12) == 0) {
+               if (LDB_CONTROL_CMP(control_strings[i], 
LDB_CONTROL_SERVER_SORT_NAME) == 0) {
                        struct ldb_server_sort_control **control;
                        const char *p;
                        char attr[256];
@@ -658,7 +665,7 @@ struct ldb_control **ldb_parse_control_strings(struct 
ldb_context *ldb, TALLOC_C
 
                        attr[0] = '\0';
                        rule[0] = '\0';
-                       p = &(control_strings[i][12]);
+                       p = 
&(control_strings[i][sizeof(LDB_CONTROL_SERVER_SORT_NAME)]);
                        ret = sscanf(p, "%d:%d:%255[^:]:%127[^:]", &crit, &rev, 
attr, rule);
                        if ((ret < 3) || (crit < 0) || (crit > 1) || (rev < 0 ) 
|| (rev > 1) ||attr[0] == '\0') {
                                error_string = talloc_asprintf(mem_ctx, 
"invalid server_sort control syntax\n");
@@ -689,11 +696,11 @@ struct ldb_control **ldb_parse_control_strings(struct 
ldb_context *ldb, TALLOC_C
                        continue;
                }
 
-               if (strncmp(control_strings[i], "notification:", 13) == 0) {
+               if (LDB_CONTROL_CMP(control_strings[i], 
LDB_CONTROL_NOTIFICATION_NAME) == 0) {
                        const char *p;
                        int crit, ret;
 
-                       p = &(control_strings[i][13]);
+                       p = 
&(control_strings[i][sizeof(LDB_CONTROL_NOTIFICATION_NAME)]);
                        ret = sscanf(p, "%d", &crit);
                        if ((ret != 1) || (crit < 0) || (crit > 1)) {
                                error_string = talloc_asprintf(mem_ctx, 
"invalid notification control syntax\n");
@@ -716,11 +723,11 @@ struct ldb_control **ldb_parse_control_strings(struct 
ldb_context *ldb, TALLOC_C
                        continue;
                }
 
-               if (strncmp(control_strings[i], "tree_delete:", 12) == 0) {
+               if (LDB_CONTROL_CMP(control_strings[i], 
LDB_CONTROL_TREE_DELETE_NAME) == 0) {
                        const char *p;
                        int crit, ret;
 
-                       p = &(control_strings[i][12]);
+                       p = 
&(control_strings[i][sizeof(LDB_CONTROL_TREE_DELETE_NAME)]);
                        ret = sscanf(p, "%d", &crit);
                        if ((ret != 1) || (crit < 0) || (crit > 1)) {
                                error_string = talloc_asprintf(mem_ctx, 
"invalid tree_delete control syntax\n");
@@ -743,11 +750,11 @@ struct ldb_control **ldb_parse_control_strings(struct 
ldb_context *ldb, TALLOC_C
                        continue;
                }
 
-               if (strncmp(control_strings[i], "show_deleted:", 13) == 0) {
+               if (LDB_CONTROL_CMP(control_strings[i], 
LDB_CONTROL_SHOW_DELETED_NAME) == 0) {
                        const char *p;
                        int crit, ret;
 
-                       p = &(control_strings[i][13]);
+                       p = 
&(control_strings[i][sizeof(LDB_CONTROL_SHOW_DELETED_NAME)]);
                        ret = sscanf(p, "%d", &crit);
                        if ((ret != 1) || (crit < 0) || (crit > 1)) {
                                error_string = talloc_asprintf(mem_ctx, 
"invalid show_deleted control syntax\n");
@@ -770,11 +777,11 @@ struct ldb_control **ldb_parse_control_strings(struct 
ldb_context *ldb, TALLOC_C
                        continue;
                }
 
-               if (strncmp(control_strings[i], "show_deactivated_link:", 22) 
== 0) {
+               if (LDB_CONTROL_CMP(control_strings[i], 
LDB_CONTROL_SHOW_DEACTIVATED_LINK_NAME) == 0) {
                        const char *p;
                        int crit, ret;
 
-                       p = &(control_strings[i][22]);
+                       p = 
&(control_strings[i][sizeof(LDB_CONTROL_SHOW_DEACTIVATED_LINK_NAME)]);
                        ret = sscanf(p, "%d", &crit);
                        if ((ret != 1) || (crit < 0) || (crit > 1)) {
                                error_string = talloc_asprintf(mem_ctx, 
"invalid show_deactivated_link control syntax\n");
@@ -797,11 +804,11 @@ struct ldb_control **ldb_parse_control_strings(struct 
ldb_context *ldb, TALLOC_C
                        continue;
                }
 
-               if (strncmp(control_strings[i], "show_recycled:", 14) == 0) {
+               if (LDB_CONTROL_CMP(control_strings[i], 
LDB_CONTROL_SHOW_RECYCLED_NAME) == 0) {
                        const char *p;
                        int crit, ret;
 
-                       p = &(control_strings[i][14]);
+                       p = 
&(control_strings[i][sizeof(LDB_CONTROL_SHOW_RECYCLED_NAME)]);
                        ret = sscanf(p, "%d", &crit);
                        if ((ret != 1) || (crit < 0) || (crit > 1)) {
                                error_string = talloc_asprintf(mem_ctx, 
"invalid show_recycled control syntax\n");
@@ -824,11 +831,11 @@ struct ldb_control **ldb_parse_control_strings(struct 
ldb_context *ldb, TALLOC_C
                        continue;
                }
 
-               if (strncmp(control_strings[i], "permissive_modify:", 18) == 0) 
{
+               if (LDB_CONTROL_CMP(control_strings[i], 
LDB_CONTROL_PERMISSIVE_MODIFY_NAME) == 0) {
                        const char *p;
                        int crit, ret;
 
-                       p = &(control_strings[i][18]);
+                       p = 
&(control_strings[i][sizeof(LDB_CONTROL_PERMISSIVE_MODIFY_NAME)]);
                        ret = sscanf(p, "%d", &crit);
                        if ((ret != 1) || (crit < 0) || (crit > 1)) {
                                error_string = talloc_asprintf(mem_ctx, 
"invalid permissive_modify control syntax\n");
@@ -851,11 +858,11 @@ struct ldb_control **ldb_parse_control_strings(struct 
ldb_context *ldb, TALLOC_C
                        continue;
                }
 
-               if (strncmp(control_strings[i], "reveal_internals:", 17) == 0) {
+               if (LDB_CONTROL_CMP(control_strings[i], 
LDB_CONTROL_REVEAL_INTERNALS_NAME) == 0) {
                        const char *p;
                        int crit, ret;
 
-                       p = &(control_strings[i][17]);
+                       p = 
&(control_strings[i][sizeof(LDB_CONTROL_REVEAL_INTERNALS_NAME)]);
                        ret = sscanf(p, "%d", &crit);
                        if ((ret != 1) || (crit < 0) || (crit > 1)) {
                                error_string = talloc_asprintf(mem_ctx, 
"invalid reveal_internals control syntax\n");
@@ -912,11 +919,11 @@ struct ldb_control **ldb_parse_control_strings(struct 
ldb_context *ldb, TALLOC_C
                        continue;
                }
 
-               if (strncmp(control_strings[i], "rodc_join:", 10) == 0) {
+               if (LDB_CONTROL_CMP(control_strings[i], 
LDB_CONTROL_RODC_DCPROMO_NAME) == 0) {
                        const char *p;
                        int crit, ret;
 
-                       p = &(control_strings[i][10]);
+                       p = 
&(control_strings[i][sizeof(LDB_CONTROL_RODC_DCPROMO_NAME)]);
                        ret = sscanf(p, "%d", &crit);
                        if ((ret != 1) || (crit < 0) || (crit > 1)) {
                                error_string = talloc_asprintf(mem_ctx, 
"invalid rodc_join control syntax\n");
@@ -939,11 +946,11 @@ struct ldb_control **ldb_parse_control_strings(struct 
ldb_context *ldb, TALLOC_C
                        continue;
                }
 
-               if (strncmp(control_strings[i], "provision:", 10) == 0) {
+               if (LDB_CONTROL_CMP(control_strings[i], 
LDB_CONTROL_PROVISION_NAME) == 0) {
                        const char *p;
                        int crit, ret;
 
-                       p = &(control_strings[i][10]);
+                       p = 
&(control_strings[i][sizeof(LDB_CONTROL_PROVISION_NAME)]);
                        ret = sscanf(p, "%d", &crit);
                        if ((ret != 1) || (crit < 0) || (crit > 1)) {
                                error_string = talloc_asprintf(mem_ctx, 
"invalid provision control syntax\n");
diff --git a/source4/lib/ldb/include/ldb.h b/source4/lib/ldb/include/ldb.h
index ff0ebe7..b52921f 100644
--- a/source4/lib/ldb/include/ldb.h
+++ b/source4/lib/ldb/include/ldb.h
@@ -489,6 +489,7 @@ typedef int (*ldb_qsort_cmp_fn_t) (void *v1, void *v2, void 
*opaque);
   and that are now calculated.
 */
 #define LDB_CONTROL_BYPASS_OPERATIONAL_OID "1.3.6.1.4.1.7165.4.3.13"
+#define LDB_CONTROL_BYPASS_OPERATIONAL_NAME "bypassoperational"
 
 /**
   OID for recalculate SD control. This control force the
@@ -497,12 +498,14 @@ typedef int (*ldb_qsort_cmp_fn_t) (void *v1, void *v2, 
void *opaque);
 
 */
 #define LDB_CONTROL_RECALCULATE_SD_OID "1.3.6.1.4.1.7165.4.3.5"
+#define LDB_CONTROL_RECALCULATE_SD_NAME "recalculate_sd"
 
 /**
    REVEAL_INTERNALS is used to reveal internal attributes and DN
    components which are not normally shown to the user
 */
 #define LDB_CONTROL_REVEAL_INTERNALS "1.3.6.1.4.1.7165.4.3.6"
+#define LDB_CONTROL_REVEAL_INTERNALS_NAME      "reveal_internals"
 
 /**
    LDB_CONTROL_AS_SYSTEM is used to skip access checks on operations
@@ -516,6 +519,7 @@ typedef int (*ldb_qsort_cmp_fn_t) (void *v1, void *v2, void 
*opaque);
    mainly thought to be used for the provisioning.
 */
 #define LDB_CONTROL_PROVISION_OID "1.3.6.1.4.1.7165.4.3.16"
+#define LDB_CONTROL_PROVISION_NAME     "provision"
 
 /* AD controls */
 
@@ -528,6 +532,7 @@ typedef int (*ldb_qsort_cmp_fn_t) (void *v1, void *v2, void 
*opaque);
    \sa <a href="http://www.ietf.org/rfc/rfc2696.txt";>RFC 2696</a>.
 */
 #define LDB_CONTROL_PAGED_RESULTS_OID  "1.2.840.113556.1.4.319"
+#define LDB_CONTROL_PAGED_RESULTS_NAME "paged_result"
 
 /**
    OID for specifying the returned elements of the ntSecurityDescriptor
@@ -535,6 +540,7 @@ typedef int (*ldb_qsort_cmp_fn_t) (void *v1, void *v2, void 
*opaque);
    \sa <a 
href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ldap/ldap/ldap_server_sd_flags_oid.asp";>Microsoft
 documentation of this OID</a>
 */
 #define LDB_CONTROL_SD_FLAGS_OID       "1.2.840.113556.1.4.801"
+#define LDB_CONTROL_SD_FLAGS_NAME      "sd_flags"
 
 /**
    OID for specifying an advanced scope for the search (one partition)
@@ -542,6 +548,7 @@ typedef int (*ldb_qsort_cmp_fn_t) (void *v1, void *v2, void 
*opaque);
    \sa <a 
href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ldap/ldap/ldap_server_domain_scope_oid.asp";>Microsoft
 documentation of this OID</a>
 */
 #define LDB_CONTROL_DOMAIN_SCOPE_OID   "1.2.840.113556.1.4.1339"
+#define LDB_CONTROL_DOMAIN_SCOPE_NAME  "domain_scope"
 
 /**
    OID for specifying an advanced scope for a search
@@ -549,6 +556,7 @@ typedef int (*ldb_qsort_cmp_fn_t) (void *v1, void *v2, void 
*opaque);
    \sa <a 
href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ldap/ldap/ldap_server_search_options_oid.asp";>Microsoft
 documentation of this OID</a>
 */
 #define LDB_CONTROL_SEARCH_OPTIONS_OID "1.2.840.113556.1.4.1340"
+#define LDB_CONTROL_SEARCH_OPTIONS_NAME        "search_options"
 
 /**
    OID for notification
@@ -556,6 +564,7 @@ typedef int (*ldb_qsort_cmp_fn_t) (void *v1, void *v2, void 
*opaque);
    \sa <a 
href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ldap/ldap/ldap_server_notification_oid.asp";>Microsoft
 documentation of this OID</a>
 */
 #define LDB_CONTROL_NOTIFICATION_OID   "1.2.840.113556.1.4.528"
+#define LDB_CONTROL_NOTIFICATION_NAME  "notification"
 
 /**
    OID for performing subtree deletes
@@ -563,6 +572,7 @@ typedef int (*ldb_qsort_cmp_fn_t) (void *v1, void *v2, void 
*opaque);
    \sa <a 
href="http://msdn.microsoft.com/en-us/library/aa366991(v=VS.85).aspx">Microsoft 
documentation of this OID</a>
 */
 #define LDB_CONTROL_TREE_DELETE_OID    "1.2.840.113556.1.4.805"
+#define LDB_CONTROL_TREE_DELETE_NAME   "tree_delete"
 
 /**
    OID for getting deleted objects
@@ -570,6 +580,7 @@ typedef int (*ldb_qsort_cmp_fn_t) (void *v1, void *v2, void 
*opaque);
    \sa <a 
href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ldap/ldap/ldap_server_show_deleted_oid.asp";>Microsoft
 documentation of this OID</a>
 */
 #define LDB_CONTROL_SHOW_DELETED_OID   "1.2.840.113556.1.4.417"
+#define LDB_CONTROL_SHOW_DELETED_NAME  "show_deleted"
 
 /**
    OID for getting recycled objects
@@ -577,6 +588,7 @@ typedef int (*ldb_qsort_cmp_fn_t) (void *v1, void *v2, void 
*opaque);
    \sa <a 
href="http://msdn.microsoft.com/en-us/library/dd304621(PROT.13).aspx">Microsoft 
documentation of this OID</a>
 */
 #define LDB_CONTROL_SHOW_RECYCLED_OID         "1.2.840.113556.1.4.2064"
+#define LDB_CONTROL_SHOW_RECYCLED_NAME "show_recycled"
 
 /**
    OID for getting deactivated linked attributes
@@ -584,6 +596,7 @@ typedef int (*ldb_qsort_cmp_fn_t) (void *v1, void *v2, void 
*opaque);
    \sa <a 
href="http://msdn.microsoft.com/en-us/library/dd302781(PROT.13).aspx">Microsoft 
documentation of this OID</a>
 */
 #define LDB_CONTROL_SHOW_DEACTIVATED_LINK_OID "1.2.840.113556.1.4.2065"
+#define LDB_CONTROL_SHOW_DEACTIVATED_LINK_NAME "show_deactivated_link"
 
 /**
    OID for extended DN
@@ -591,6 +604,7 @@ typedef int (*ldb_qsort_cmp_fn_t) (void *v1, void *v2, void 
*opaque);
    \sa <a 
href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ldap/ldap/ldap_server_extended_dn_oid.asp";>Microsoft
 documentation of this OID</a>
 */
 #define LDB_CONTROL_EXTENDED_DN_OID    "1.2.840.113556.1.4.529"
+#define LDB_CONTROL_EXTENDED_DN_NAME   "extended_dn"
 
 /**
    OID for LDAP server sort result extension.
@@ -605,6 +619,7 @@ typedef int (*ldb_qsort_cmp_fn_t) (void *v1, void *v2, void 
*opaque);
    \sa <a href="http://www.ietf.org/rfc/rfc2891.txt";>RFC 2891</a>.
 */
 #define LDB_CONTROL_SERVER_SORT_OID    "1.2.840.113556.1.4.473"
+#define LDB_CONTROL_SERVER_SORT_NAME   "server_sort"
 
 /**
    OID for LDAP server sort result response extension.
@@ -616,6 +631,7 @@ typedef int (*ldb_qsort_cmp_fn_t) (void *v1, void *v2, void 
*opaque);
    \sa <a href="http://www.ietf.org/rfc/rfc2891.txt";>RFC 2891</a>.
 */
 #define LDB_CONTROL_SORT_RESP_OID      "1.2.840.113556.1.4.474"
+#define LDB_CONTROL_SORT_RESP_NAME     "server_sort_resp"
 


-- 
Samba Shared Repository

Reply via email to