diff options
author | james <james@e7ae566f-a301-0410-adde-c780ea21d3b5> | 2008-07-18 23:49:50 +0000 |
---|---|---|
committer | james <james@e7ae566f-a301-0410-adde-c780ea21d3b5> | 2008-07-18 23:49:50 +0000 |
commit | d1dcc3e706c5e7de69e79e70a3c431ca4ce27881 (patch) | |
tree | 474fbb8f0eeccf306581f0d07bea55c5cf42c6bc /misc.c | |
parent | Reverted some recent buffer.[ch] changes, including r3058 (except for (diff) | |
download | openvpn-d1dcc3e706c5e7de69e79e70a3c431ca4ce27881.tar.xz |
Added a warning when plugins are specified without
an absolute pathname.
git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@3082 e7ae566f-a301-0410-adde-c780ea21d3b5
Diffstat (limited to '')
-rw-r--r-- | misc.c | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -1159,6 +1159,22 @@ delete_file (const char *filename) #endif } +bool +absolute_pathname (const char *pathname) +{ + if (pathname) + { + const int c = pathname[0]; +#ifdef WIN32 + return c == '\\' || (isalpha(c) && pathname[1] == ':' && pathname[2] == '\\'); +#else + return c == '/'; +#endif + } + else + return false; +} + /* * Return the next largest power of 2 * or u if u is a power of 2. |