diff options
| author | 2022-11-09 16:10:44 +0000 | |
|---|---|---|
| committer | 2022-11-09 16:12:53 +0000 | |
| commit | 783c2a0d0628fe8fd4e9cdcfc2b92fe4ccf450e6 (patch) | |
| tree | b85164141574a5328405bb765aa53a677c24325d /src/configparser.cpp | |
| parent | Log when the uid/gid of config files might be wrong. (diff) | |
Fix the previous commit on Windows.
Diffstat (limited to 'src/configparser.cpp')
| -rw-r--r-- | src/configparser.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/configparser.cpp b/src/configparser.cpp index ddd07c728..d0fa48ef8 100644 --- a/src/configparser.cpp +++ b/src/configparser.cpp @@ -480,6 +480,7 @@ namespace { void CheckOwnership(const std::string& path) { +#ifndef _WIN32 struct stat pathinfo; if (stat(path.c_str(), &pathinfo)) return; // Will be handled when fopen fails. @@ -487,14 +488,15 @@ namespace if (getegid() != pathinfo.st_gid) { ServerInstance->Logs->Log("CONFIG", LOG_DEFAULT, "Possible configuration error: %s is owned by group %u but the server is running as group %u.", - path.c_str(), getegid(), pathinfo.st_gid); + path.c_str(), pathinfo.st_gid, getegid()); } if (geteuid() != pathinfo.st_uid) { ServerInstance->Logs->Log("CONFIG", LOG_DEFAULT, "Possible configuration error: %s is owned by user %u but the server is running as user %u.", - path.c_str(), geteuid(), pathinfo.st_uid); + path.c_str(), pathinfo.st_uid, geteuid()); } +#endif } } |
