summaryrefslogtreecommitdiffstats
path: root/src/ctx.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ctx.c')
-rw-r--r--src/ctx.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/ctx.c b/src/ctx.c
index 8d80691..4b373a1 100644
--- a/src/ctx.c
+++ b/src/ctx.c
@@ -186,6 +186,11 @@ void bfs_ctx_flush(const struct bfs_ctx *ctx) {
// We do not check errors here, but they will be caught at cleanup time
// with ferror().
fflush(NULL);
+
+ // Flush the user/group caches, in case the executed command edits the
+ // user/group tables
+ bfs_users_flush(ctx->users);
+ bfs_groups_flush(ctx->groups);
}
/** Flush a file and report any errors. */