charon-nm: Pass configured user when connecting to SSH/GPG agent
This prevents an attack similar to the one fixed previously where a user passes the path to credentials of another user, in this case the path to the agent socket of that user.
This commit is contained in:
@@ -637,6 +637,7 @@ static bool add_auth_cfg_cert(NMStrongswanPluginPrivate *priv,
|
||||
private = lib->creds->create(lib->creds, CRED_PRIVATE_KEY,
|
||||
public->get_type(public),
|
||||
BUILD_AGENT_SOCKET, str,
|
||||
BUILD_AGENT_USER, user,
|
||||
BUILD_PUBLIC_KEY, public,
|
||||
BUILD_END);
|
||||
public->destroy(public);
|
||||
|
||||
Reference in New Issue
Block a user