From: Tim Beale Date: Wed, 4 Apr 2018 22:40:03 +0000 (+1200) Subject: dsdb: Use attribute-name parameter for error message X-Git-Tag: ldb-1.4.0~358 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fcdb935e3749cab5bc7dcbb83414032c683640ef;p=thirdparty%2Fsamba.git dsdb: Use attribute-name parameter for error message We'll reuse this code for working out the msDS-ResultantPSO, so references to 'tokenGroups' in error messages would be misleading. Reviewed-by: Andrew Bartlett Reviewed-by: Garming Sam Signed-off-by: Tim Beale --- diff --git a/source4/dsdb/samdb/ldb_modules/operational.c b/source4/dsdb/samdb/ldb_modules/operational.c index 576cf861574..3fe61edcfd1 100644 --- a/source4/dsdb/samdb/ldb_modules/operational.c +++ b/source4/dsdb/samdb/ldb_modules/operational.c @@ -249,8 +249,9 @@ static int construct_generic_token_groups(struct ldb_module *module, tmp_ctx, &groupSIDs, &num_groupSIDs); if (!NT_STATUS_IS_OK(status)) { - ldb_asprintf_errstring(ldb, "Failed to construct tokenGroups: expanding groups of SID %s failed: %s", - account_sid_string, nt_errstr(status)); + ldb_asprintf_errstring(ldb, "Failed to construct %s: expanding groups of SID %s failed: %s", + attribute_string, account_sid_string, + nt_errstr(status)); talloc_free(tmp_ctx); return LDB_ERR_OPERATIONS_ERROR; } @@ -264,8 +265,9 @@ static int construct_generic_token_groups(struct ldb_module *module, status = dsdb_expand_nested_groups(ldb, &primary_group_blob, false, filter, tmp_ctx, &groupSIDs, &num_groupSIDs); if (!NT_STATUS_IS_OK(status)) { - ldb_asprintf_errstring(ldb, "Failed to construct tokenGroups: expanding groups of SID %s failed: %s", - account_sid_string, nt_errstr(status)); + ldb_asprintf_errstring(ldb, "Failed to construct %s: expanding groups of SID %s failed: %s", + attribute_string, account_sid_string, + nt_errstr(status)); talloc_free(tmp_ctx); return LDB_ERR_OPERATIONS_ERROR; }