]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
Fix build after removal of an extra safe_string.h
authorAlexander Bokovoy <ab@samba.org>
Thu, 1 Oct 2020 12:22:12 +0000 (15:22 +0300)
committerJeremy Allison <jra@samba.org>
Thu, 1 Oct 2020 22:45:29 +0000 (22:45 +0000)
Move of strcasecmp redefine to lib/util/safe_string.h in
https://gitlab.com/samba-team/samba/-/merge_requests/1507 broke build on
Fedora 33 with GCC 10.2.1 for those compilation units that use
ldb_att_cmp().

The reason for that is that ldb_attr_cmp() defined as

   #define ldb_attr_cmp(a, b) strcasecmp(a, b)

because attribute names restricted to be ASCII by RFC2251 (LDAPv3 spec).

A solution is to add

   #undef strcasecmp

to all source code files which use ldb_attr_cmp().

Signed-off-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Thu Oct  1 22:45:29 UTC 2020 on sn-devel-184

14 files changed:
lib/ldb-samba/ldb_matching_rules.c
source4/dsdb/common/util.c
source4/dsdb/pydsdb.c
source4/dsdb/samdb/ldb_modules/acl_read.c
source4/dsdb/samdb/ldb_modules/anr.c
source4/dsdb/samdb/ldb_modules/dns_notify.c
source4/dsdb/samdb/ldb_modules/objectclass.c
source4/dsdb/samdb/ldb_modules/objectclass_attrs.c
source4/dsdb/samdb/ldb_modules/operational.c
source4/dsdb/samdb/ldb_modules/password_hash.c
source4/dsdb/samdb/ldb_modules/util.c
source4/lib/registry/ldb.c
source4/rpc_server/drsuapi/dcesrv_drsuapi.c
source4/torture/drs/rpc/dssync.c

index 13edb51daaaa5ecfb9c600acc480297f75bcdeb2..26f4d4ed3b510ad243fcc82fda02ac5b41fde61b 100644 (file)
@@ -29,6 +29,8 @@
 #include "librpc/gen_ndr/ndr_dnsp.h"
 #include "lib/util/smb_strtox.h"
 
+#undef strcasecmp
+
 static int ldb_eval_transitive_filter_helper(TALLOC_CTX *mem_ctx,
                                             struct ldb_context *ldb,
                                             const char *attr,
index 77b77de887b77e3bb164149dbab1730864240a65..08c18c485a3c791f3fd8ce8ee7f121d12c9a8ed4 100644 (file)
@@ -52,6 +52,7 @@
 #include "lib/util/smb_strtox.h"
 
 #undef strncasecmp
+#undef strcasecmp
 
 /*
  * This included to allow us to handle DSDB_FLAG_REPLICATED_UPDATE in
index 79015545109f1dce6468c2cf10f1e1377bb1e1f5..b68d76ada4952d2b3b4fb1b76ce705b4be24fa32 100644 (file)
@@ -34,6 +34,7 @@
 #include "dsdb/kcc/garbage_collect_tombstones.h"
 #include "dsdb/kcc/scavenge_dns_records.h"
 
+#undef strcasecmp
 
 /* FIXME: These should be in a header file somewhere */
 #define PyErr_LDB_OR_RAISE(py_ldb, ldb) \
index 1e016b970ee458930c83b219ebf1ffccdd2669e5..7249a1a6c115742bab8b4afe714d263b43b23cd9 100644 (file)
@@ -38,6 +38,8 @@
 #include "param/param.h"
 #include "dsdb/samdb/ldb_modules/util.h"
 
+#undef strcasecmp
+
 struct aclread_context {
        struct ldb_module *module;
        struct ldb_request *req;
index ec9d82512c897f94741b0844d922d45510945c08..660ba2714962c50735a914f6a1759ae5b3965844 100644 (file)
@@ -34,6 +34,8 @@
 #include "dsdb/samdb/samdb.h"
 #include "dsdb/samdb/ldb_modules/util.h"
 
+#undef strcasecmp
+
 /**
  * Make a and 'and' or 'or' tree from the two supplied elements 
  */
index 014683c80ecb1b0d9d7c711000d7738308183bd7..41973ef62b624389a880c0f394b9dec92f4d7be7 100644 (file)
@@ -39,6 +39,8 @@
 #include "param/param.h"
 #include "util/dlinklist.h"
 
+#undef strcasecmp
+
 struct dns_notify_watched_dn {
        struct dns_notify_watched_dn *next, *prev;
        struct ldb_dn *dn;
index 36ab76e19fc79f215a348ce6545e0f2c21bb2c2e..17cb34f4befb7e1fc8514b629bb93313a1a0e604 100644 (file)
@@ -46,6 +46,8 @@
 #include "../libds/common/flags.h"
 #include "dsdb/samdb/ldb_modules/util.h"
 
+#undef strcasecmp
+
 struct oc_context {
 
        struct ldb_module *module;
index 0b9725e2767dd9bdf8da3cb382ab35cbb556ce73..6ab46a729a207530ac5b47c20cdca48a056b6ff0 100644 (file)
@@ -38,6 +38,8 @@
 #include "dsdb/samdb/samdb.h"
 #include "dsdb/samdb/ldb_modules/util.h"
 
+#undef strcasecmp
+
 struct oc_context {
 
        struct ldb_module *module;
index 5eaebf981417547d8a86c839698f6a442ea80d27..50e913cdd5c19ec4992f0c6023f35b4e33d81ac5 100644 (file)
@@ -80,6 +80,8 @@
 #define ARRAY_SIZE(a) (sizeof(a)/sizeof(a[0]))
 #endif
 
+#undef strcasecmp
+
 struct operational_data {
        struct ldb_dn *aggregate_dn;
 };
index 5a05bf2952e2be2531fedd611f49e809a1eab866..5bdd23c13e9e65585568a9f49c27091c603c1fbf 100644 (file)
@@ -66,6 +66,7 @@
 #endif
 
 #undef strncasecmp
+#undef strcasecmp
 
 /* If we have decided there is a reason to work on this request, then
  * setup all the password hash types correctly.
index 20c854f0b9ae453379576e0c1d6beb0ffc3f9cad..8bc170305007b3551d1c80325858260052731716 100644 (file)
@@ -29,6 +29,8 @@
 #include "dsdb/common/util.h"
 #include "libcli/security/security.h"
 
+#undef strcasecmp
+
 /*
   search for attrs on one DN, in the modules below
  */
index 15419a65f642eb7dd39da8af4d4df17fdf9bbbac..e089355975bb0bc4abc1983b466fb7ae0c7457ca 100644 (file)
@@ -27,6 +27,8 @@
 #include "param/param.h"
 #include "lib/util/smb_strtox.h"
 
+#undef strcasecmp
+
 static struct hive_operations reg_backend_ldb;
 
 struct ldb_key_data
index 7e2b6174d2fdd29bd7333260e77744bb6345842f..d0fc3d2e4c3a260c70c9482b9c06a1a39ce6958c 100644 (file)
@@ -33,6 +33,7 @@
 #include "param/param.h"
 #include "lib/messaging/irpc.h"
 
+#undef strcasecmp
 #undef DBGC_CLASS
 #define DBGC_CLASS            DBGC_DRS_REPL
 
index 6a8a8b5492bfce654bd51ffc59e08760ef96119b..cde9f78692b922fdd12730992f53cf832c243c4e 100644 (file)
@@ -36,6 +36,8 @@
 #include "libcli/resolve/resolve.h"
 #include "lib/util/util_paths.h"
 
+#undef strcasecmp
+
 struct DsSyncBindInfo {
        struct dcerpc_pipe *drs_pipe;
        struct dcerpc_binding_handle *drs_handle;