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

« back to all changes in this revision

Viewing changes to src/auths/pwcheck.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/pwcheck.c,v 1.2 2005/06/27 14:29:44 ph10 Exp $ */
 
2
 
1
3
/* SASL server API implementation
2
4
 * Rob Siemborski
3
5
 * Tim Martin
135
137
       start += n;
136
138
     }
137
139
 
138
 
     close(s);
 
140
     (void)close(s);
139
141
 
140
142
     if (start > 1 && !strncmp(response, "OK", 2)) {
141
143
       return PWCHECK_OK;
218
220
    if ( write_string(s, userid, Ustrlen(userid)) < 0) {
219
221
        DEBUG(D_auth)
220
222
            debug_printf("Failed to send userid to saslauthd daemon \n");
221
 
        close(s);
 
223
        (void)close(s);
222
224
        return PWCHECK_FAIL;
223
225
    }
224
226
 
225
227
    if ( write_string(s, password, Ustrlen(password)) < 0) {
226
228
        DEBUG(D_auth)
227
229
            debug_printf("Failed to send password to saslauthd daemon \n");
228
 
        close(s);
 
230
        (void)close(s);
229
231
        return PWCHECK_FAIL;
230
232
    }
231
233
 
234
236
    if ( write_string(s, service, Ustrlen(service)) < 0) {
235
237
        DEBUG(D_auth)
236
238
            debug_printf("Failed to send service name to saslauthd daemon \n");
237
 
        close(s);
 
239
        (void)close(s);
238
240
        return PWCHECK_FAIL;
239
241
    }
240
242
 
241
243
    if ( write_string(s, realm, Ustrlen(realm)) < 0) {
242
244
        DEBUG(D_auth)
243
245
            debug_printf("Failed to send realm to saslauthd daemon \n");
244
 
        close(s);
 
246
        (void)close(s);
245
247
        return PWCHECK_FAIL;
246
248
    }
247
249
 
248
250
    if ( read_string(s, &daemon_reply ) < 2) {
249
251
        DEBUG(D_auth)
250
252
            debug_printf("Corrupted answer '%s' received. \n", daemon_reply);
251
 
        close(s);
 
253
        (void)close(s);
252
254
        return PWCHECK_FAIL;
253
255
    }
254
256
 
255
 
    close(s);
 
257
    (void)close(s);
256
258
 
257
259
    DEBUG(D_auth)
258
260
        debug_printf("Answer '%s' received. \n", daemon_reply);