ACK On 16/09/13 13:42, Jan Friesse wrote:
Signed-off-by: Jan Friesse <jfriesse@xxxxxxxxxx> (cherry picked from commit 966f461b69321b118470c1d9b5669648b3a952dd) --- exec/coroparse.c | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/exec/coroparse.c b/exec/coroparse.c index 7258567..d1c7803 100644 --- a/exec/coroparse.c +++ b/exec/coroparse.c @@ -276,8 +276,8 @@ static int read_uidgid_files_into_objdb( 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; @@ -333,8 +333,8 @@ static int read_service_files_into_objdb( 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;
_______________________________________________ discuss mailing list discuss@xxxxxxxxxxxx http://lists.corosync.org/mailman/listinfo/discuss