From 71257811d3630221ddb5a11629a59c6661eb6245 Mon Sep 17 00:00:00 2001 From: Erik Johnson Date: Fri, 12 Jul 2013 21:34:47 -0500 Subject: [PATCH] Allow alternate enc names to be used for ssh_auth states If 'rsa' or 'dss', etc. are used as the 'enc' value in ssh_auth.present states (rather than 'ssh-rsa' or 'ssh-dss'), the call to salt.modules.ssh.check_key() will fail, which causes ssh_auth.present states to mistakenly report the key as needing to be changed. This commit adds a call to salt.modules.ssh._refine_enc(), which normalizes the 'enc' param so that the call to ssh.check_key() does not fail. Fixes #5374. --- salt/modules/ssh.py | 1 + 1 file changed, 1 insertion(+) diff --git a/salt/modules/ssh.py b/salt/modules/ssh.py index a803f14115fb..a928c00eb026 100644 --- a/salt/modules/ssh.py +++ b/salt/modules/ssh.py @@ -262,6 +262,7 @@ def check_key(user, key, enc, comment, options, config='.ssh/authorized_keys'): salt '*' ssh.check_key ''' + enc = _refine_enc(enc) current = auth_keys(user, config) nline = _format_auth_line(key, enc, comment, options) if key in current: