The branch, master has been updated via 234957a2e44 Fix build after removal of an extra safe_string.h via 91dc9bb6594 s3: smbd: Remove the ignored last parameter 'bool *p_last_component_contains_wcard' from check_path_syntax_internal(). from ab0e5e3c431 samba-tool tests: rename 'contact create' to 'contact add'
https://git.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit 234957a2e4408537c5722edf04dfe03dd31bd1b1 Author: Alexander Bokovoy <a...@samba.org> Date: Thu Oct 1 15:22:12 2020 +0300 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 <a...@samba.org> Reviewed-by: Jeremy Allison <j...@samba.org> Autobuild-User(master): Jeremy Allison <j...@samba.org> Autobuild-Date(master): Thu Oct 1 22:45:29 UTC 2020 on sn-devel-184 commit 91dc9bb6594ae78fa5109719b66e4c644339e1b7 Author: Jeremy Allison <j...@samba.org> Date: Tue Sep 29 17:22:10 2020 -0700 s3: smbd: Remove the ignored last parameter 'bool *p_last_component_contains_wcard' from check_path_syntax_internal(). Signed-off-by: Jeremy Allison <j...@samba.org> Reviewed-by: Ralph Böhme <s...@samba.org> ----------------------------------------------------------------------- Summary of changes: lib/ldb-samba/ldb_matching_rules.c | 2 ++ source3/smbd/reply.c | 18 +++++++----------- source4/dsdb/common/util.c | 1 + source4/dsdb/pydsdb.c | 1 + source4/dsdb/samdb/ldb_modules/acl_read.c | 2 ++ source4/dsdb/samdb/ldb_modules/anr.c | 2 ++ source4/dsdb/samdb/ldb_modules/dns_notify.c | 2 ++ source4/dsdb/samdb/ldb_modules/objectclass.c | 2 ++ source4/dsdb/samdb/ldb_modules/objectclass_attrs.c | 2 ++ source4/dsdb/samdb/ldb_modules/operational.c | 2 ++ source4/dsdb/samdb/ldb_modules/password_hash.c | 1 + source4/dsdb/samdb/ldb_modules/util.c | 2 ++ source4/lib/registry/ldb.c | 2 ++ source4/rpc_server/drsuapi/dcesrv_drsuapi.c | 1 + source4/torture/drs/rpc/dssync.c | 2 ++ 15 files changed, 31 insertions(+), 11 deletions(-) Changeset truncated at 500 lines: diff --git a/lib/ldb-samba/ldb_matching_rules.c b/lib/ldb-samba/ldb_matching_rules.c index 13edb51daaa..26f4d4ed3b5 100644 --- a/lib/ldb-samba/ldb_matching_rules.c +++ b/lib/ldb-samba/ldb_matching_rules.c @@ -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, diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index e7771e2bc59..a3c992beee2 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -61,16 +61,14 @@ #define IS_PATH_SEP(c,posix_only) ((c) == '/' || (!(posix_only) && (c) == '\\')) static NTSTATUS check_path_syntax_internal(char *path, - bool posix_path, - bool *p_last_component_contains_wcard) + bool posix_path) { char *d = path; const char *s = path; NTSTATUS ret = NT_STATUS_OK; bool start_of_name_component = True; bool stream_started = false; - - *p_last_component_contains_wcard = False; + bool last_component_contains_wcard = false; while (*s) { if (stream_started) { @@ -90,7 +88,7 @@ static NTSTATUS check_path_syntax_internal(char *path, } if ((*s == ':') && !posix_path && !stream_started) { - if (*p_last_component_contains_wcard) { + if (last_component_contains_wcard) { return NT_STATUS_OBJECT_NAME_INVALID; } /* Stream names allow more characters than file names. @@ -124,7 +122,7 @@ static NTSTATUS check_path_syntax_internal(char *path, start_of_name_component = True; /* New component. */ - *p_last_component_contains_wcard = False; + last_component_contains_wcard = false; continue; } @@ -180,7 +178,7 @@ static NTSTATUS check_path_syntax_internal(char *path, case '<': case '>': case '"': - *p_last_component_contains_wcard = True; + last_component_contains_wcard = true; break; default: break; @@ -228,8 +226,7 @@ static NTSTATUS check_path_syntax_internal(char *path, NTSTATUS check_path_syntax(char *path) { - bool ignore; - return check_path_syntax_internal(path, False, &ignore); + return check_path_syntax_internal(path, false); } /**************************************************************************** @@ -240,8 +237,7 @@ NTSTATUS check_path_syntax(char *path) NTSTATUS check_path_syntax_posix(char *path) { - bool ignore; - return check_path_syntax_internal(path, True, &ignore); + return check_path_syntax_internal(path, true); } /**************************************************************************** diff --git a/source4/dsdb/common/util.c b/source4/dsdb/common/util.c index 77b77de887b..08c18c485a3 100644 --- a/source4/dsdb/common/util.c +++ b/source4/dsdb/common/util.c @@ -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 diff --git a/source4/dsdb/pydsdb.c b/source4/dsdb/pydsdb.c index 79015545109..b68d76ada49 100644 --- a/source4/dsdb/pydsdb.c +++ b/source4/dsdb/pydsdb.c @@ -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) \ diff --git a/source4/dsdb/samdb/ldb_modules/acl_read.c b/source4/dsdb/samdb/ldb_modules/acl_read.c index 1e016b970ee..7249a1a6c11 100644 --- a/source4/dsdb/samdb/ldb_modules/acl_read.c +++ b/source4/dsdb/samdb/ldb_modules/acl_read.c @@ -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; diff --git a/source4/dsdb/samdb/ldb_modules/anr.c b/source4/dsdb/samdb/ldb_modules/anr.c index ec9d82512c8..660ba271496 100644 --- a/source4/dsdb/samdb/ldb_modules/anr.c +++ b/source4/dsdb/samdb/ldb_modules/anr.c @@ -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 */ diff --git a/source4/dsdb/samdb/ldb_modules/dns_notify.c b/source4/dsdb/samdb/ldb_modules/dns_notify.c index 014683c80ec..41973ef62b6 100644 --- a/source4/dsdb/samdb/ldb_modules/dns_notify.c +++ b/source4/dsdb/samdb/ldb_modules/dns_notify.c @@ -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; diff --git a/source4/dsdb/samdb/ldb_modules/objectclass.c b/source4/dsdb/samdb/ldb_modules/objectclass.c index 36ab76e19fc..17cb34f4bef 100644 --- a/source4/dsdb/samdb/ldb_modules/objectclass.c +++ b/source4/dsdb/samdb/ldb_modules/objectclass.c @@ -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; diff --git a/source4/dsdb/samdb/ldb_modules/objectclass_attrs.c b/source4/dsdb/samdb/ldb_modules/objectclass_attrs.c index 0b9725e2767..6ab46a729a2 100644 --- a/source4/dsdb/samdb/ldb_modules/objectclass_attrs.c +++ b/source4/dsdb/samdb/ldb_modules/objectclass_attrs.c @@ -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; diff --git a/source4/dsdb/samdb/ldb_modules/operational.c b/source4/dsdb/samdb/ldb_modules/operational.c index 5eaebf98141..50e913cdd5c 100644 --- a/source4/dsdb/samdb/ldb_modules/operational.c +++ b/source4/dsdb/samdb/ldb_modules/operational.c @@ -80,6 +80,8 @@ #define ARRAY_SIZE(a) (sizeof(a)/sizeof(a[0])) #endif +#undef strcasecmp + struct operational_data { struct ldb_dn *aggregate_dn; }; diff --git a/source4/dsdb/samdb/ldb_modules/password_hash.c b/source4/dsdb/samdb/ldb_modules/password_hash.c index 5a05bf2952e..5bdd23c13e9 100644 --- a/source4/dsdb/samdb/ldb_modules/password_hash.c +++ b/source4/dsdb/samdb/ldb_modules/password_hash.c @@ -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. diff --git a/source4/dsdb/samdb/ldb_modules/util.c b/source4/dsdb/samdb/ldb_modules/util.c index 20c854f0b9a..8bc17030500 100644 --- a/source4/dsdb/samdb/ldb_modules/util.c +++ b/source4/dsdb/samdb/ldb_modules/util.c @@ -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 */ diff --git a/source4/lib/registry/ldb.c b/source4/lib/registry/ldb.c index 15419a65f64..e089355975b 100644 --- a/source4/lib/registry/ldb.c +++ b/source4/lib/registry/ldb.c @@ -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 diff --git a/source4/rpc_server/drsuapi/dcesrv_drsuapi.c b/source4/rpc_server/drsuapi/dcesrv_drsuapi.c index 7e2b6174d2f..d0fc3d2e4c3 100644 --- a/source4/rpc_server/drsuapi/dcesrv_drsuapi.c +++ b/source4/rpc_server/drsuapi/dcesrv_drsuapi.c @@ -33,6 +33,7 @@ #include "param/param.h" #include "lib/messaging/irpc.h" +#undef strcasecmp #undef DBGC_CLASS #define DBGC_CLASS DBGC_DRS_REPL diff --git a/source4/torture/drs/rpc/dssync.c b/source4/torture/drs/rpc/dssync.c index 6a8a8b5492b..cde9f78692b 100644 --- a/source4/torture/drs/rpc/dssync.c +++ b/source4/torture/drs/rpc/dssync.c @@ -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; -- Samba Shared Repository