aboutsummaryrefslogtreecommitdiffstats
path: root/src/libcharon/plugins
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2014-02-24 12:04:24 +0100
committerTobias Brunner <tobias@strongswan.org>2014-02-24 12:04:24 +0100
commit625fc6015438cee2340b79aeeae8c2d65bed56ff (patch)
treeb0fddc259c22f5257cc9ac41ca012263af1a1870 /src/libcharon/plugins
parenta21d4096e56c81f1d71b5d891a85069ff6c1cb4d (diff)
parent6b895d7b25bb6b7dbfcd149ce97640b9172466d7 (diff)
downloadstrongswan-625fc6015438cee2340b79aeeae8c2d65bed56ff.tar.bz2
strongswan-625fc6015438cee2340b79aeeae8c2d65bed56ff.tar.xz
Merge branch 'dirname'
Fixes the incorrect usage of dirname(3) in settings_t and stroke_cred_t, and adds thread-safe variants of dirname(3) and basename(3).
Diffstat (limited to 'src/libcharon/plugins')
-rw-r--r--src/libcharon/plugins/stroke/stroke_cred.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/libcharon/plugins/stroke/stroke_cred.c b/src/libcharon/plugins/stroke/stroke_cred.c
index ff93c94d0..f908219ed 100644
--- a/src/libcharon/plugins/stroke/stroke_cred.c
+++ b/src/libcharon/plugins/stroke/stroke_cred.c
@@ -17,7 +17,6 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <limits.h>
-#include <libgen.h>
#include <fcntl.h>
#include <errno.h>
#include <unistd.h>
@@ -1158,8 +1157,7 @@ static void load_secrets(private_stroke_cred_t *this, mem_cred_t *secrets,
}
else
{ /* use directory of current file if relative */
- dir = strdup(file);
- dir = dirname(dir);
+ dir = path_dirname(file);
if (line.len + 1 + strlen(dir) + 1 > sizeof(pattern))
{