summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-05-13 17:16:26 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2008-05-13 17:16:26 +0000
commit9f33bf7fc83cffccae96eb622bf39e8f4838b809 (patch)
tree248bbe5351c3d4eaee4f34589fc38a046204d151 /src/modules
parent25a78272bc44ae466ebb2e60e090e07dc1fe4f88 (diff)
Check for windows drive letters on the start of paths and treat them the same as paths that start with /, this makes insp more friendly for windows filesystems
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9724 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/extra/m_ssl_gnutls.cpp8
-rw-r--r--src/modules/extra/m_ssl_openssl.cpp8
2 files changed, 8 insertions, 8 deletions
diff --git a/src/modules/extra/m_ssl_gnutls.cpp b/src/modules/extra/m_ssl_gnutls.cpp
index 4b9d0fc4e..70c87d5fa 100644
--- a/src/modules/extra/m_ssl_gnutls.cpp
+++ b/src/modules/extra/m_ssl_gnutls.cpp
@@ -220,16 +220,16 @@ class ModuleSSLGnuTLS : public Module
dh_bits = 1024;
// Prepend relative paths with the path to the config directory.
- if(cafile[0] != '/')
+ if ((cafile[0] != '/') && (!ServerInstance->Config->StartsWithWindowsDriveLetter(cafile)))
cafile = confdir + cafile;
- if(crlfile[0] != '/')
+ if ((crlfile[0] != '/') && (!ServerInstance->Config->StartsWithWindowsDriveLetter(crlfile)))
crlfile = confdir + crlfile;
- if(certfile[0] != '/')
+ if ((certfile[0] != '/') && (!ServerInstance->Config->StartsWithWindowsDriveLetter(certfile)))
certfile = confdir + certfile;
- if(keyfile[0] != '/')
+ if ((keyfile[0] != '/') && (!ServerInstance->Config->StartsWithWindowsDriveLetter(keyfile)))
keyfile = confdir + keyfile;
int ret;
diff --git a/src/modules/extra/m_ssl_openssl.cpp b/src/modules/extra/m_ssl_openssl.cpp
index 4691b874e..304e57989 100644
--- a/src/modules/extra/m_ssl_openssl.cpp
+++ b/src/modules/extra/m_ssl_openssl.cpp
@@ -244,16 +244,16 @@ class ModuleSSLOpenSSL : public Module
dhfile = "dhparams.pem";
// Prepend relative paths with the path to the config directory.
- if (cafile[0] != '/')
+ if ((cafile[0] != '/') && (!ServerInstance->Config->StartsWithWindowsDriveLetter(cafile)))
cafile = confdir + cafile;
- if (certfile[0] != '/')
+ if ((certfile[0] != '/') && (!ServerInstance->Config->StartsWithWindowsDriveLetter(certfile)))
certfile = confdir + certfile;
- if (keyfile[0] != '/')
+ if ((keyfile[0] != '/') && (!ServerInstance->Config->StartsWithWindowsDriveLetter(keyfile)))
keyfile = confdir + keyfile;
- if (dhfile[0] != '/')
+ if ((dhfile[0] != '/') && (!ServerInstance->Config->StartsWithWindowsDriveLetter(dhfile)))
dhfile = confdir + dhfile;
/* Load our keys and certificates