Skip to content

Commit 2f9f91c

Browse files
committed
Re-introduce world writable file check in auditctl
1 parent 2d24773 commit 2f9f91c

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/auditctl.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1587,6 +1587,12 @@ static int fileopt(const char *file)
15871587
close(tfd);
15881588
return 1;
15891589
}
1590+
if (st.st_mode & S_IWOTH) {
1591+
audit_msg(LOG_ERR,
1592+
"Error - %s is world writable", file);
1593+
close(tfd);
1594+
return 1;
1595+
}
15901596

15911597
f = fdopen(tfd, "rm");
15921598
if (f == NULL) {

0 commit comments

Comments
 (0)