summaryrefslogtreecommitdiff
path: root/monitor_wrap.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2003-02-24 11:55:46 +1100
committerDamien Miller <djm@mindrot.org>2003-02-24 11:55:46 +1100
commitb7df3af154d035be480b9d9f433f440f1c66e1bd (patch)
treec65e09bdaff201141b6fa243ac67631fcdf89991 /monitor_wrap.c
parent386f1f3e6c5c3ea72970fcce4d939b2d4eb1bf3e (diff)
- markus@cvs.openbsd.org 2003/02/04 09:33:22
[monitor.c monitor_wrap.c] skey/bsdauth: use 0 to indicate failure instead of -1, because the buffer API only supports unsigned ints.
Diffstat (limited to 'monitor_wrap.c')
-rw-r--r--monitor_wrap.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/monitor_wrap.c b/monitor_wrap.c
index b75f9dfc7..551bbc15a 100644
--- a/monitor_wrap.c
+++ b/monitor_wrap.c
@@ -25,7 +25,7 @@
25 */ 25 */
26 26
27#include "includes.h" 27#include "includes.h"
28RCSID("$OpenBSD: monitor_wrap.c,v 1.20 2002/11/21 23:03:51 deraadt Exp $"); 28RCSID("$OpenBSD: monitor_wrap.c,v 1.21 2003/02/04 09:33:22 markus Exp $");
29 29
30#include <openssl/bn.h> 30#include <openssl/bn.h>
31#include <openssl/dh.h> 31#include <openssl/dh.h>
@@ -714,7 +714,7 @@ mm_bsdauth_query(void *ctx, char **name, char **infotxt,
714 u_int *numprompts, char ***prompts, u_int **echo_on) 714 u_int *numprompts, char ***prompts, u_int **echo_on)
715{ 715{
716 Buffer m; 716 Buffer m;
717 int res; 717 u_int success;
718 char *challenge; 718 char *challenge;
719 719
720 debug3("%s: entering", __func__); 720 debug3("%s: entering", __func__);
@@ -724,8 +724,8 @@ mm_bsdauth_query(void *ctx, char **name, char **infotxt,
724 724
725 mm_request_receive_expect(pmonitor->m_recvfd, MONITOR_ANS_BSDAUTHQUERY, 725 mm_request_receive_expect(pmonitor->m_recvfd, MONITOR_ANS_BSDAUTHQUERY,
726 &m); 726 &m);
727 res = buffer_get_int(&m); 727 success = buffer_get_int(&m);
728 if (res == -1) { 728 if (success == 0) {
729 debug3("%s: no challenge", __func__); 729 debug3("%s: no challenge", __func__);
730 buffer_free(&m); 730 buffer_free(&m);
731 return (-1); 731 return (-1);
@@ -771,7 +771,8 @@ mm_skey_query(void *ctx, char **name, char **infotxt,
771 u_int *numprompts, char ***prompts, u_int **echo_on) 771 u_int *numprompts, char ***prompts, u_int **echo_on)
772{ 772{
773 Buffer m; 773 Buffer m;
774 int len, res; 774 int len;
775 u_int success;
775 char *p, *challenge; 776 char *p, *challenge;
776 777
777 debug3("%s: entering", __func__); 778 debug3("%s: entering", __func__);
@@ -781,8 +782,8 @@ mm_skey_query(void *ctx, char **name, char **infotxt,
781 782
782 mm_request_receive_expect(pmonitor->m_recvfd, MONITOR_ANS_SKEYQUERY, 783 mm_request_receive_expect(pmonitor->m_recvfd, MONITOR_ANS_SKEYQUERY,
783 &m); 784 &m);
784 res = buffer_get_int(&m); 785 success = buffer_get_int(&m);
785 if (res == -1) { 786 if (success == 0) {
786 debug3("%s: no challenge", __func__); 787 debug3("%s: no challenge", __func__);
787 buffer_free(&m); 788 buffer_free(&m);
788 return (-1); 789 return (-1);