From f470e4303e7fd64304d5dc4849b6790f2a4930ee Mon Sep 17 00:00:00 2001 From: Peter Howkins Date: Tue, 3 Jul 2018 17:55:28 +0100 Subject: [PATCH] dtaction: Coverity 88210 and 87787 --- cde/programs/dtaction/Main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cde/programs/dtaction/Main.c b/cde/programs/dtaction/Main.c index 287db2c4..f262a5ee 100644 --- a/cde/programs/dtaction/Main.c +++ b/cde/programs/dtaction/Main.c @@ -626,8 +626,9 @@ AddSuLog( * take away write access from SULog */ - if (stat (SULog, &st) == 0) - chmod (SULog, (int) (st.st_mode & 07777) & ~0222); + if(chmod (SULog, (int) (st.st_mode & 07777) & ~0222) == -1) { + fprintf(stderr, "Error on chmod of '%s', %s\n", SULog, strerror(errno)); + } return; } -- 2.25.1