diff options
author | Stef Walter <stef@thewalter.net> | 2013-06-17 21:57:25 +0200 |
---|---|---|
committer | Stef Walter <stef@thewalter.net> | 2013-06-17 21:57:25 +0200 |
commit | 5489a1456c5a6f320bd2b3aa849f36f10d538e81 (patch) | |
tree | c162f9c18bcfa0b9998ca0b2b4e74b0c5395f196 /tools | |
parent | 1caa8801f6d888befb3515d24171bf77a172a93c (diff) | |
parent | 93f197792150ae2e2e3ffafb903dfab6854915cb (diff) |
Merge branch 'stable'
Diffstat (limited to 'tools')
-rw-r--r-- | tools/Makefile.am | 4 | ||||
-rwxr-xr-x | tools/p11-kit-extract-trust.in | 21 | ||||
-rw-r--r-- | tools/tool.c | 15 |
3 files changed, 8 insertions, 32 deletions
diff --git a/tools/Makefile.am b/tools/Makefile.am index c8296ee..deda642 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -50,8 +50,4 @@ p11_kit_SOURCES += \ save.c save.h \ $(NULL) -externaldir = $(privatedir) -external_SCRIPTS = \ - p11-kit-extract-trust - endif # WITH_ASN1 diff --git a/tools/p11-kit-extract-trust.in b/tools/p11-kit-extract-trust.in deleted file mode 100755 index b15dd7d..0000000 --- a/tools/p11-kit-extract-trust.in +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh - -# This script is a placeholder designed to be replaced when this software -# has been customized for distribution. It should be symlinked linked to the -# distribution's update-ca-certificates or update-ca-trust command as -# appropriate. In the future this script will be called when the PKCS#11 -# trust module is used to modifiy trust anchors and related data. - -echo "p11-kit: the placeholder extract-trust command has not been customized by your distribution." - -# You can use commands like this to extract data from trust modules -# into appropriate locations for your distribution. -# -# p11-kit extract --format=openssl-bundle --filter=ca-anchors \ -# --overwrite /tmp/openssl-bundle.pem -# p11-kit extract --format=pem-bundle --filter=ca-anchors --overwrite \ -# --purpose server-auth /tmp/server-auth-bundle.pem -# p11-kit extract --format=java-cacerts --filter=ca-anchors --overwrite \ -# --purpose server-auth /tmp/cacerts - -exit 1 diff --git a/tools/tool.c b/tools/tool.c index a2dbcbd..313484a 100644 --- a/tools/tool.c +++ b/tools/tool.c @@ -194,20 +194,19 @@ exec_external (const char *command, char *argv[]) { char *filename; - const char *path; - char *env; + char *path; if (!asprintf (&filename, "p11-kit-%s", command) < 0) return_if_reached (); /* Add our libexec directory to the path */ - path = getenv ("PATH"); - if (!asprintf (&env, "PATH=%s%s%s", path ? path : "", path ? P11_PATH_SEP : "", PRIVATEDIR)) - return_if_reached (); - putenv (env); + path = p11_path_build (PRIVATEDIR, filename, NULL); + return_if_fail (path != NULL); argv[0] = filename; - execvp (filename, argv); + argv[argc] = NULL; + + execvp (path, argv); } static void @@ -248,6 +247,8 @@ main (int argc, char *argv[]) if (!command) { skip = true; command = argv[in]; + } else { + skip = false; } /* The global long options */ |