From 4d8a1ee4c7211ea07164e583821559480b6c1d4e Mon Sep 17 00:00:00 2001 From: Linus Nordberg Date: Tue, 2 Jul 2019 19:42:39 +0200 Subject: move path to p11-kit-remote properly --- p11p-daemon/config/sys.config | 3 ++- p11p-daemon/src/p11p_remote.erl | 8 +++----- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/p11p-daemon/config/sys.config b/p11p-daemon/config/sys.config index fe5922f..de34e83 100644 --- a/p11p-daemon/config/sys.config +++ b/p11p-daemon/config/sys.config @@ -3,7 +3,8 @@ {p11p, [ {loglevel, 3}, - {remotebin_path, "/usr/local/libexec/p11-kit/p11-kit-remote"}, + %%{remotebin_path, "/usr/local/libexec/p11-kit/p11-kit-remote"}, + {remotebin_path, "/home/linus/usr/libexec/p11-kit/p11-kit-remote"}, {groups, [{"vtoken0", [ diff --git a/p11p-daemon/src/p11p_remote.erl b/p11p-daemon/src/p11p_remote.erl index 86e3471..30365cd 100644 --- a/p11p-daemon/src/p11p_remote.erl +++ b/p11p-daemon/src/p11p_remote.erl @@ -32,9 +32,6 @@ msg :: p11rpc:msg() | undefined }). -%% FIXME: move to config --define(P11KITREMOTE_PATH, "/home/linus/usr/libexec/p11-kit/p11-kit-remote"). - %% API. -spec start_link(atom(), string(), string()) -> {ok, pid()} | {error, term()}. start_link(ServName, TokName, ModPath) -> @@ -59,9 +56,10 @@ stop(Pid, Reason) -> %% Genserver callbacks. init([TokName, ModPath]) -> - Port = open_port({spawn_executable, p11p_config:remotebin_path()}, + RemoteBinPath = p11p_config:remotebin_path(), + Port = open_port({spawn_executable, RemoteBinPath}, [stream, exit_status, {args, [ModPath, "-v"]}]), - lager:debug("~p: ~s: new remote port: ~p", [self(), ?P11KITREMOTE_PATH, Port]), + lager:debug("~p: ~s: new remote port: ~p", [self(), RemoteBinPath, Port]), {ok, #state{port = Port, token = TokName}}. handle_call({add_to_outbuf, Data}, _From, State) -> -- cgit v1.1