Skip to content

Commit 3adf613

Browse files
committed
unclobber main auditd fd
1 parent bff0ecb commit 3adf613

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/auditd.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -222,9 +222,9 @@ static void cont_handler(struct ev_loop *loop, struct ev_signal *sig,
222222
if (f == NULL)
223223
return;
224224

225-
fd = fileno(f);
226-
if (fd > 0)
227-
(void)fchown(fd, 0, config.log_group);
225+
int sr_fd = fileno(f);
226+
if (sr_fd > 0)
227+
(void)fchown(sr_fd, 0, config.log_group);
228228
fprintf(f, "audit version = %s\n", VERSION);
229229
time_t now = time(0);
230230
strftime(buf, sizeof(buf), "%x %X", localtime(&now));

0 commit comments

Comments
 (0)