~ubuntu-branches/ubuntu/hardy/exim4/hardy-proposed

« back to all changes in this revision

Viewing changes to src/auths/plaintext.c

  • Committer: Bazaar Package Importer
  • Author(s): Marc Haber
  • Date: 2005-07-02 06:08:34 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050702060834-qk17pd52kb9nt3bj
Tags: 4.52-1
* new upstream version 4.51. (mh)
  * adapt 70_remove_exim-users_references
  * remove 37_gnutlsparams
  * adapt 36_pcre
  * adapt 31_eximmanpage
* fix package priorities to have them in sync with override again. (mh)
* Fix error in nb (Norwegian) translation.
  Thanks to Helge Hafting. (mh). Closes: #315775
* Standards-Version: 3.6.2, no changes needed. (mh)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* $Cambridge: exim/exim-src/src/auths/plaintext.c,v 1.2 2005/01/04 10:00:43 ph10 Exp $ */
 
2
 
1
3
/*************************************************
2
4
*     Exim - an Internet mail transport agent    *
3
5
*************************************************/
4
6
 
5
 
/* Copyright (c) University of Cambridge 1995 - 2004 */
 
7
/* Copyright (c) University of Cambridge 1995 - 2005 */
6
8
/* See the file NOTICE for conditions of use and distribution. */
7
9
 
8
10
#include "../exim.h"
117
119
        != NULL && expand_nmax < EXPAND_MAXN)
118
120
  {
119
121
  if (number++ <= expand_nmax) continue;
120
 
  if ((rc = auth_get_data(&data, s)) != OK) return rc;
 
122
  if ((rc = auth_get_data(&data, s, Ustrlen(s))) != OK) return rc;
121
123
  if ((len = auth_b64decode(data, &clear)) < 0) return BAD64;
122
124
  end = clear + len;
123
125
 
225
227
    uschar *ssave = string_copy(s);
226
228
    if (!first)
227
229
      {
228
 
      if (smtp_write_command(outblock, FALSE, "*\r\n"))
 
230
      if (smtp_write_command(outblock, FALSE, "*\r\n") >= 0)
229
231
        (void) smtp_read_response(inblock, US buffer, buffsize, '2', timeout);
230
232
      }
231
233
    if (expand_string_forcedfail) return CANCELLED;
258
260
  if (first)
259
261
    {
260
262
    first = FALSE;
261
 
    if (!smtp_write_command(outblock, FALSE, "AUTH %s%s%s\r\n",
262
 
         ablock->public_name, (len == 0)? "" : " ", auth_b64encode(ss, len)))
 
263
    if (smtp_write_command(outblock, FALSE, "AUTH %s%s%s\r\n",
 
264
         ablock->public_name, (len == 0)? "" : " ",
 
265
         auth_b64encode(ss, len)) < 0)
263
266
      return FAIL_SEND;
264
267
    }
265
268
  else
266
269
    {
267
 
    if (!smtp_write_command(outblock, FALSE, "%s\r\n", auth_b64encode(ss, len)))
 
270
    if (smtp_write_command(outblock, FALSE, "%s\r\n",
 
271
          auth_b64encode(ss, len)) < 0)
268
272
      return FAIL_SEND;
269
273
    }
270
274
 
285
289
 
286
290
  if (text == NULL)
287
291
    {
288
 
    if (smtp_write_command(outblock, FALSE, "*\r\n"))
 
292
    if (smtp_write_command(outblock, FALSE, "*\r\n") >= 0)
289
293
      (void)smtp_read_response(inblock, US buffer, buffsize, '2', timeout);
290
294
    string_format(buffer, buffsize, "Too few items in client_send in %s "
291
295
      "authenticator", ablock->name);