S_IRWXG, S_IRWXO are not defined in mingw headers. Anyway these bits
are not defined in st_mode on Windows, so just skip the test.
Signed-off-by: Selva Nair <selva.nair@gmail.com>
Acked-by: Gert Doering <gert@greenie.muc.de>
Message-Id: <1479320593-27099-1-git-send-email-selva.nair@gmail.com>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg13100.html
Signed-off-by: Gert Doering <gert@greenie.muc.de>
| ... | ... |
@@ -2738,11 +2738,13 @@ check_file_access(const int type, const char *file, const int mode, const char * |
| 2738 | 2738 |
{
|
| 2739 | 2739 |
msg (M_WARN | M_ERRNO, "WARNING: cannot stat file '%s'", file); |
| 2740 | 2740 |
} |
| 2741 |
+#ifndef _WIN32 |
|
| 2741 | 2742 |
else |
| 2742 | 2743 |
{
|
| 2743 | 2744 |
if (st.st_mode & (S_IRWXG|S_IRWXO)) |
| 2744 | 2745 |
msg (M_WARN, "WARNING: file '%s' is group or others accessible", file); |
| 2745 | 2746 |
} |
| 2747 |
+#endif |
|
| 2746 | 2748 |
} |
| 2747 | 2749 |
|
| 2748 | 2750 |
/* Scream if an error is found */ |