1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-25 17:57:42 +03:00

Fix build after removal of an extra safe_string.h

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
This commit is contained in:
Alexander Bokovoy 2020-10-01 15:22:12 +03:00 committed by Jeremy Allison
parent 91dc9bb659
commit 234957a2e4
14 changed files with 24 additions and 0 deletions

View 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,

View 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

View 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) \

View 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;

View 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
*/

View 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;

View 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;

View 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;

View 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;
};

View 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.

View 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
*/

View 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

View 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

View 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;