diff options
author | Timo Weingärtner <timo@tiwe.de> | 2013-10-09 20:18:07 +0200 |
---|---|---|
committer | Timo Weingärtner <timo@tiwe.de> | 2013-10-09 20:18:07 +0200 |
commit | be10d6a2c1b646ce3cc67bab2896dd3720a80e64 (patch) | |
tree | cf7af23a473f9c72d979ae2f3226139d8c79b41b | |
parent | cf11590789a66485623ed11508ae137e2b78a96d (diff) | |
download | ssh-agent-filter-be10d6a2c1b646ce3cc67bab2896dd3720a80e64.tar.gz |
improve inserting into (allow|confirm)ed_pubkeys
-rw-r--r-- | ssh-agent-filter.C | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ssh-agent-filter.C b/ssh-agent-filter.C index b094b2c..16d6f03 100644 --- a/ssh-agent-filter.C +++ b/ssh-agent-filter.C @@ -245,7 +245,7 @@ void setup_filters () { if (debug) std::clog << "key allowed by matching comment" << std::endl; } - if (allow) allowed_pubkeys.insert(std::move(key)); + if (allow) allowed_pubkeys.emplace(std::move(key)); else { bool confirm{false}; @@ -266,7 +266,7 @@ void setup_filters () { if (debug) std::clog << "key allowed with confirmation by catch-all (-A)" << std::endl; } - if (confirm) confirmed_pubkeys.emplace(std::move(key), comment); + if (confirm) confirmed_pubkeys.emplace(std::move(key), std::move(comm)); } if (debug) std::clog << std::endl; |