From 46a2cbfb73f7fade3426fd07c5830e9fac82883c Mon Sep 17 00:00:00 2001 From: ShyamsundarR Date: Tue, 24 Jul 2018 20:23:14 -0400 Subject: coverity: Ignore most of SECURE_TEMP issues mkstemp as per the Linux man page, uses 0600 as the permission bits when creating the file. This is hence safe and a Coverity warning that should be ignored. Further, we are mostly a multi-threaded program in all our daemons and cannot set and unset umask at will in a multi-threaded program, to address the coverity issue. This change attempts to nudge coverity to ignore this warning, using the pattern, /* coverity[EVENT_TAG_NAME] ... */ This commit is an experiment, if post merge the next coverity report ignores these errors, the above pattern (as found using an internet search) works and can be applied to certain other warnings as well. Change-Id: I73a184ce1a54dd9e66542952b1190a74438c826a Updates: bz#789278 Signed-off-by: ShyamsundarR --- xlators/cluster/ec/src/ec-code.c | 1 + 1 file changed, 1 insertion(+) (limited to 'xlators/cluster') diff --git a/xlators/cluster/ec/src/ec-code.c b/xlators/cluster/ec/src/ec-code.c index 2cdd5bebe11..e33cb42d9dc 100644 --- a/xlators/cluster/ec/src/ec-code.c +++ b/xlators/cluster/ec/src/ec-code.c @@ -417,6 +417,7 @@ ec_code_space_create(ec_code_t *code, size_t size) /* We need to create a temporary file as the backend storage for the * memory mapped areas. */ + /* coverity[secure_temp] mkstemp uses 0600 as the mode and is safe */ fd = mkstemp(path); if (fd < 0) { err = errno; -- cgit