You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 15, 2019. It is now read-only.
Created by mfriedrich on 2012-08-05 11:11:52 +00:00
Assignee: mfriedrich
Status: Resolved (closed on 2012-08-31 13:42:52 +00:00)
Target Version: 1.8
Last Update: 2012-08-31 13:42:52 +00:00 (in Redmine)
Icinga Version: 1.7.1
OS Version: Debian
the condition only reflects - is a symlink, or is it a real file. if last option matches, process the file further. still, stat(2) won't allow that either, so at least remove the logical bug.
core: Remove weird switch() statement when scanning check result queue
First of all, we use stat(2) instead of lstat(2), so the supposed check
for symlinks is bogus. If it was a symlink, we'd either get ENOENT or
the stat info of the actual file.
It's also wrong to check st.st_mode & S_IFMT against S_IFREG and then
checking it again with the macro S_ISREG(), since they'll both always
evaluate to true.
Instead, we remove the case statement and only use a simple S_ISREG()
and ignore everything but ordinary files.
Signed-off-by: Andreas Ericsson
Changesets
2012-08-05 11:12:29 +00:00 by mfriedrich 4399b1b48a44d8be2f137a0548e223d5a56de793
core: remove weird switch() statement when scanning checkresult queue #2950
a simple if this does not fit, continue the loop does the trick. in this
it's about checking if the file is "real" and not symlinked. though,
stat(2) does not allow that either, so at least fix the logical bug.
refs #2950
core: remove weird switch() statement when scanning checkresult queue #2950
a simple if this does not fit, continue the loop does the trick. in this
it's about checking if the file is "real" and not symlinked. though,
stat(2) does not allow that either, so at least fix the logical bug.
refs #2950
core: remove weird switch() statement when scanning checkresult queue #2950
a simple if this does not fit, continue the loop does the trick. in this
it's about checking if the file is "real" and not symlinked. though,
stat(2) does not allow that either, so at least fix the logical bug.
refs #2950
The text was updated successfully, but these errors were encountered:
This issue has been migrated from Redmine: https://dev.icinga.com/issues/2950
Created by mfriedrich on 2012-08-05 11:11:52 +00:00
Assignee: mfriedrich
Status: Resolved (closed on 2012-08-31 13:42:52 +00:00)
Target Version: 1.8
Last Update: 2012-08-31 13:42:52 +00:00 (in Redmine)
the condition only reflects - is a symlink, or is it a real file. if last option matches, process the file further. still, stat(2) won't allow that either, so at least remove the logical bug.
Changesets
2012-08-05 11:12:29 +00:00 by mfriedrich 4399b1b48a44d8be2f137a0548e223d5a56de793
2012-08-07 13:30:23 +00:00 by mfriedrich a3eff50
2012-08-19 17:41:16 +00:00 by mfriedrich 2ee9cbe
The text was updated successfully, but these errors were encountered: