From e91f6912be091a3f43288a228c3713a46170ce37 Mon Sep 17 00:00:00 2001 From: Nick Anderson Date: Thu, 3 Sep 2026 11:55:45 -0500 Subject: [PATCH] Removed the repository destination from LogFileChange() _changes metadata is no longer stored adjacent to the change monitored file and the backup repository is intended for file backups not general meta-data. Ticket: CFE-3275 Changelog: None --- cf-agent/cf-agent-enterprise-stubs.c | 3 +-- cf-agent/cf-agent-enterprise-stubs.h | 4 ++-- cf-agent/verify_files_utils.c | 7 +------ 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/cf-agent/cf-agent-enterprise-stubs.c b/cf-agent/cf-agent-enterprise-stubs.c index 343a5705927..5d835f6ec2b 100644 --- a/cf-agent/cf-agent-enterprise-stubs.c +++ b/cf-agent/cf-agent-enterprise-stubs.c @@ -25,14 +25,13 @@ #include #include -ENTERPRISE_FUNC_8ARG_DEFINE_STUB(PromiseResult, LogFileChange, +ENTERPRISE_FUNC_7ARG_DEFINE_STUB(PromiseResult, LogFileChange, ARG_UNUSED EvalContext *, ctx, ARG_UNUSED const char *, file, ARG_UNUSED int, change, ARG_UNUSED const Attributes *, attr, ARG_UNUSED const Promise *, pp, ARG_UNUSED CopyRegularFileFunction, CopyRegularFilePtr, - ARG_UNUSED const char *, destination, ARG_UNUSED DeleteCompressedArrayFunction, DeleteCompressedArrayPtr) { RecordNoChange(ctx, pp, attr, "Logging file differences requires version Nova or above"); diff --git a/cf-agent/cf-agent-enterprise-stubs.h b/cf-agent/cf-agent-enterprise-stubs.h index aa3a25a8e5c..d2a6b760582 100644 --- a/cf-agent/cf-agent-enterprise-stubs.h +++ b/cf-agent/cf-agent-enterprise-stubs.h @@ -45,14 +45,14 @@ typedef bool (*CopyRegularFileFunction)(EvalContext *ctx, AgentConnection *conn, PromiseResult *result); typedef void (*DeleteCompressedArrayFunction)(CompressedArray *start); -ENTERPRISE_FUNC_8ARG_DECLARE(PromiseResult, LogFileChange, +ENTERPRISE_FUNC_7ARG_DECLARE(PromiseResult, LogFileChange, EvalContext *, ctx, const char *, file, int, change, const Attributes *, attr, const Promise *, pp, CopyRegularFileFunction, CopyRegularFilePtr, - const char *, destination, DeleteCompressedArrayFunction, DeleteCompressedArrayPtr); + DeleteCompressedArrayFunction, DeleteCompressedArrayPtr); ENTERPRISE_VOID_FUNC_1ARG_DECLARE(void, ReportPatches, PackageManager *, list); ENTERPRISE_VOID_FUNC_1ARG_DECLARE(void, Nova_TrackExecution, const char *, input_file); diff --git a/cf-agent/verify_files_utils.c b/cf-agent/verify_files_utils.c index 7931ae87544..e4f4ab7c42d 100644 --- a/cf-agent/verify_files_utils.c +++ b/cf-agent/verify_files_utils.c @@ -3738,12 +3738,7 @@ static PromiseResult VerifyFileIntegrity(EvalContext *ctx, const char *file, con if (attr->change.report_diffs && MakingInternalChanges(ctx, pp, attr, &result, "report diffs in '%s'", file)) { - char destination[CF_BUFSIZE]; - if (!GetRepositoryPath(file, attr, destination)) - { - destination[0] = '\0'; - } - LogFileChange(ctx, file, changed, attr, pp, &CopyRegularFile, destination, &DeleteCompressedArray); + LogFileChange(ctx, file, changed, attr, pp, &CopyRegularFile, &DeleteCompressedArray); } return result;