Signed-off-by: Jan Friesse <[email protected]>
---
 exec/coroparse.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/exec/coroparse.c b/exec/coroparse.c
index ef13088..bf610f8 100644
--- a/exec/coroparse.c
+++ b/exec/coroparse.c
@@ -1158,8 +1158,8 @@ static int read_uidgid_files_into_icmap(
                return_code = readdir_r(dp, entry, &dirent)) {
 
                snprintf(filename, sizeof (filename), "%s/%s", dirname, 
dirent->d_name);
-               stat (filename, &stat_buf);
-               if (S_ISREG(stat_buf.st_mode)) {
+               res = stat (filename, &stat_buf);
+               if (res == 0 && S_ISREG(stat_buf.st_mode)) {
 
                        fp = fopen (filename, "r");
                        if (fp == NULL) continue;
-- 
1.7.1

_______________________________________________
discuss mailing list
[email protected]
http://lists.corosync.org/mailman/listinfo/discuss

Reply via email to