mirror of
https://github.com/netblue30/firejail.git
synced 2026-05-21 14:56:05 -06:00
coverity scan
This commit is contained in:
parent
23c1dcb284
commit
86fee02127
3 changed files with 6 additions and 0 deletions
|
|
@ -163,6 +163,7 @@ void fs_logger_print_log(pid_t pid) {
|
|||
exit(1);
|
||||
}
|
||||
|
||||
/* coverity[toctou] */
|
||||
FILE *fp = fopen(fname, "r");
|
||||
if (!fp) {
|
||||
printf("Cannot open filesystem log.\n");
|
||||
|
|
|
|||
|
|
@ -582,6 +582,9 @@ void fs_whitelist(void) {
|
|||
errExit("mount tmpfs");
|
||||
}
|
||||
|
||||
if (new_name)
|
||||
free(new_name);
|
||||
|
||||
return;
|
||||
|
||||
errexit:
|
||||
|
|
|
|||
|
|
@ -121,6 +121,7 @@ static void sanitize_passwd(void) {
|
|||
fs_build_mnt_dir();
|
||||
|
||||
// open files
|
||||
/* coverity[toctou] */
|
||||
fpin = fopen("/etc/passwd", "r");
|
||||
if (!fpin)
|
||||
goto errout;
|
||||
|
|
@ -253,6 +254,7 @@ static void sanitize_group(void) {
|
|||
fs_build_mnt_dir();
|
||||
|
||||
// open files
|
||||
/* coverity[toctou] */
|
||||
fpin = fopen("/etc/group", "r");
|
||||
if (!fpin)
|
||||
goto errout;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue