Revert "ldb: support raw OIDs in control string parsing"
authorStefan Metzmacher <metze@samba.org>
Fri, 7 Oct 2011 07:58:29 +0000 (09:58 +0200)
committerStefan Metzmacher <metze@samba.org>
Fri, 7 Oct 2011 10:20:49 +0000 (12:20 +0200)
This reverts commit ea41860d32d38448e08cefd79d30ee1150317a9e.

This is not needed, because we already have the 'local_oid' magic.

metze

lib/ldb/common/ldb_controls.c
lib/ldb/include/ldb_private.h

index d4fc21f58edc2f473ec0dc299b78c996c7a1bbb1..5b5f3578d61208f4208f3f7d666a465f0278a25d 100644 (file)
@@ -1018,27 +1018,9 @@ struct ldb_control *ldb_parse_control_from_string(struct ldb_context *ldb, TALLO
 
                return ctrl;
        }
-
-       /* support a raw OID */
-       if (isdigit(control_strings[0])) {
-               const char *p = strchr(control_strings, ':');
-               if (p == NULL) {
-                       goto failed;
-               }
-               if (strspn(control_strings, "0123456789.") != (p-control_strings)) {
-                       goto failed;
-               }
-               ctrl->oid = talloc_strndup(ctrl, control_strings, p-control_strings);
-               ctrl->critical = (p[1]=='1'?1:0);
-               ctrl->data = NULL;
-               return ctrl;
-       }
-
        /*
         * When no matching control has been found.
         */
-failed:
-       talloc_free(ctrl);
        return NULL;
 }
 
index db2457d6df027c99890b70ecd1eaab9035d2d311..cafc020e29137dcd9907256315a02b077ec0126c 100644 (file)
@@ -40,7 +40,6 @@
 #include "replace.h"
 #include "system/filesys.h"
 #include "system/time.h"
-#include "system/locale.h"
 #include "ldb.h"
 #include "ldb_module.h"