From: Peter Howkins Date: Tue, 3 Jul 2018 16:55:28 +0000 (+0100) Subject: dtaction: Coverity 88210 and 87787 X-Git-Tag: 2.3.0a~241 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=f470e4303e7fd64304d5dc4849b6790f2a4930ee;p=oweals%2Fcde.git dtaction: Coverity 88210 and 87787 --- 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; }