Audit correctly the res= after upstream refactoring

This commit is contained in:
Jakub Jelen 2018-01-19 10:18:51 +01:00
parent 38b67ad605
commit 0f4b4ccdea
1 changed files with 2 additions and 2 deletions

View File

@ -133,8 +133,8 @@ diff -up openssh-7.6p1/audit.c.audit openssh-7.6p1/audit.c
+
+ fp = sshkey_fingerprint(key, options.fingerprint_hash, SSH_FP_HEX);
+ crypto_name = key_ssh_name(key);
+ if (audit_keyusage(host_user, crypto_name, sshkey_size(key), fp, *rv) == 0)
+ *rv = 0;
+ if (audit_keyusage(host_user, crypto_name, sshkey_size(key), fp, (*rv == 0)) == 0)
+ *rv = -SSH_ERR_INTERNAL_ERROR;
+ free(fp);
+}
+