summaryrefslogtreecommitdiff
path: root/authfd.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2006-03-31 23:13:02 +1100
committerDamien Miller <djm@mindrot.org>2006-03-31 23:13:02 +1100
commit3f9418893e1254bda3b87e7d3af7029d11b0a6c7 (patch)
tree97662277f300ea1ab8255905b9d5d72a26f7578f /authfd.c
parentd79b424e8ad424a44119f327e5ab1f79cd35649c (diff)
- djm@cvs.openbsd.org 2006/03/30 09:58:16
[authfd.c bufaux.c deattack.c gss-serv.c mac.c misc.c misc.h] [monitor_wrap.c msg.c packet.c sftp-client.c sftp-server.c ssh-agent.c] replace {GET,PUT}_XXBIT macros with functionally similar functions, silencing a heap of lint warnings. also allows them to use __bounded__ checking which can't be applied to macros; requested by and feedback from deraadt@
Diffstat (limited to 'authfd.c')
-rw-r--r--authfd.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/authfd.c b/authfd.c
index 2654892d0..0fa69bd2a 100644
--- a/authfd.c
+++ b/authfd.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: authfd.c,v 1.73 2006/03/25 18:29:35 deraadt Exp $ */ 1/* $OpenBSD: authfd.c,v 1.74 2006/03/30 09:58:15 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -47,7 +47,6 @@
47#include "buffer.h" 47#include "buffer.h"
48#include "bufaux.h" 48#include "bufaux.h"
49#include "xmalloc.h" 49#include "xmalloc.h"
50#include "getput.h"
51#include "key.h" 50#include "key.h"
52#include "authfd.h" 51#include "authfd.h"
53#include "cipher.h" 52#include "cipher.h"
@@ -55,6 +54,7 @@
55#include "compat.h" 54#include "compat.h"
56#include "log.h" 55#include "log.h"
57#include "atomicio.h" 56#include "atomicio.h"
57#include "misc.h"
58 58
59static int agent_present = 0; 59static int agent_present = 0;
60 60
@@ -122,7 +122,7 @@ ssh_request_reply(AuthenticationConnection *auth, Buffer *request, Buffer *reply
122 122
123 /* Get the length of the message, and format it in the buffer. */ 123 /* Get the length of the message, and format it in the buffer. */
124 len = buffer_len(request); 124 len = buffer_len(request);
125 PUT_32BIT(buf, len); 125 put_u32(buf, len);
126 126
127 /* Send the length and then the packet to the agent. */ 127 /* Send the length and then the packet to the agent. */
128 if (atomicio(vwrite, auth->fd, buf, 4) != 4 || 128 if (atomicio(vwrite, auth->fd, buf, 4) != 4 ||
@@ -141,7 +141,7 @@ ssh_request_reply(AuthenticationConnection *auth, Buffer *request, Buffer *reply
141 } 141 }
142 142
143 /* Extract the length, and check it for sanity. */ 143 /* Extract the length, and check it for sanity. */
144 len = GET_32BIT(buf); 144 len = get_u32(buf);
145 if (len > 256 * 1024) 145 if (len > 256 * 1024)
146 fatal("Authentication response too long: %u", len); 146 fatal("Authentication response too long: %u", len);
147 147