|
33 | 33 | * @param orig The original file (may be immutable)
|
34 | 34 | * @param copy Updated to contain the filename of the mutable copy
|
35 | 35 | * @param copy_len The size of the buffer to store the filename of the copy
|
| 36 | + * @param override Whether to actually do override (original filename is |
| 37 | + * copied to copy buffer if false) |
36 | 38 | * @return false in case of failure
|
37 | 39 | */
|
38 |
| -bool OverrideImmutableBegin(const char *orig, char *copy, size_t copy_len); |
| 40 | +bool OverrideImmutableBegin( |
| 41 | + const char *orig, char *copy, size_t copy_len, bool override); |
39 | 42 |
|
40 | 43 | /**
|
41 | 44 | * @brief Temporarily clears the immutable bit of the original file and
|
42 | 45 | * replaces it with the mutated copy
|
43 | 46 | * @param orig The original file (may be immutable)
|
44 | 47 | * @param copy The mutated copy to replace the original
|
| 48 | + * @param override Whether to actually do override |
45 | 49 | * @return false in case of failure
|
46 | 50 | * @note The immutable bit is reset to it's original state
|
47 | 51 | */
|
48 |
| -bool OverrideImmutableCommit(const char *orig, const char *copy); |
| 52 | +bool OverrideImmutableCommit( |
| 53 | + const char *orig, const char *copy, bool override); |
49 | 54 |
|
50 | 55 | /**
|
51 | 56 | * @brief Simply unlinks the mutable copy
|
52 | 57 | * @param orig Not used (reserved in for future use)
|
53 | 58 | * @param copy The mutated copy to unlink
|
| 59 | + * @param override NOOP if override is false |
54 | 60 | * @return false in case of failure (but you probably don't care)
|
55 | 61 | */
|
56 |
| -bool OverrideImmutableAbort(const char *orig, const char *copy); |
| 62 | +bool OverrideImmutableAbort(const char *orig, const char *copy, bool override); |
57 | 63 |
|
58 | 64 | #endif /* CFENGINE_OVERRIDE_FSATTRS_H */
|
0 commit comments