Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions cf-agent/verify_files.c
Original file line number Diff line number Diff line change
Expand Up @@ -373,8 +373,8 @@ static PromiseResult VerifyFilePromise(EvalContext *ctx, char *path, const Promi
break;
case FS_ATTRS_FAILURE:
RecordFailure(ctx, pp, &a,
"Failed to clear the immutable bit on file '%s'",
changes_path);
"Failed to clear the immutable bit on file '%s': %s",
changes_path, FSAttrsErrorCodeToString(res));
result = PromiseResultUpdate(result, PROMISE_RESULT_FAIL);
break;
case FS_ATTRS_NOT_SUPPORTED:
Expand Down Expand Up @@ -663,14 +663,15 @@ static PromiseResult VerifyFilePromise(EvalContext *ctx, char *path, const Promi
switch (res)
{
case FS_ATTRS_SUCCESS:
Log(LOG_LEVEL_VERBOSE, "Set the immutable bit on file '%s'",
changes_path);
RecordChange(ctx, pp, &a,
"Set the immutable bit on file '%s'",
changes_path);
break;
case FS_ATTRS_FAILURE:
/* Things still may be fine as long as the agent does not try to mutate the file */
Log(LOG_LEVEL_VERBOSE,
"Failed to set the immutable bit on file '%s': %s",
changes_path, FSAttrsErrorCodeToString(res));
RecordFailure(ctx, pp, &a,
"Failed to set the immutable bit on file '%s': %s",
changes_path, FSAttrsErrorCodeToString(res));
break;
case FS_ATTRS_NOT_SUPPORTED:
/* We will not treat this as a promise failure because this
Expand Down
2 changes: 1 addition & 1 deletion libpromises/override_fsattrs.c
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ bool OverrideImmutableRename(
}

ResetTemporarilyClearedImmutableBit(
new_filename, override, res_old, old_is_immutable);
new_filename, override, res_old, new_is_immutable);

return true;
}
Expand Down
Loading