Skip to content

Commit 0cd8148

Browse files
authored
Merge pull request #26 from johnthesecond/fix_issue_19
See issue 19. This should fix the issue if uncommented again.
2 parents e70feb4 + 6e223b3 commit 0cd8148

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/scans/permissions_scan.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@ static void check_global_write(All_Results *ar, File_Info *fi)
110110
// add_issue(LOW, AUDIT, fi->location, ar, issue_buf, "ENUMY failed to stat the parent directory");
111111
// return;
112112
// }
113-
// struct passwd *data = getpwuid(stats.st_uid);
113+
// // John: getpwuid is not re-entrant. Using getpwuid_r should fix this issue.
114+
// struct passwd *data = getpwuid_r(stats.st_uid);
114115
// if (data == NULL)
115116
// {
116117
// log_error_errno_loc(ar, "Failed to stat directory", parent_buf, errno);
@@ -319,4 +320,4 @@ static void check_readable_sen_file(All_Results *ar, char *location)
319320
/* Check if current non root users can write to fstab */
320321
else if (access(location, R_OK) && (getuid() != 0))
321322
add_issue(HIGH, CTF, location, ar, "Current user can read from very important file", "");
322-
}
323+
}

0 commit comments

Comments
 (0)