~ubuntu-branches/ubuntu/maverick/postfix/maverick-security

« back to all changes in this revision

Viewing changes to src/xsasl/xsasl_cyrus_client.c

  • Committer: Bazaar Package Importer
  • Author(s): LaMont Jones, Wietse Venema, LaMont Jones
  • Date: 2009-06-03 14:17:08 UTC
  • mfrom: (1.1.22 upstream)
  • Revision ID: james.westby@ubuntu.com-20090603141708-o9u59xlor7nmd2x1
[Wietse Venema]

* New upstream release: 2.6.2~rc1

[LaMont Jones]

* move postfix-add-{filter,policy} manpages to section 8, and deliver
* provide: default-mta on ubuntu

Show diffs side-by-side

added added

removed removed

Lines of Context:
148
148
  */
149
149
static void xsasl_cyrus_client_done(XSASL_CLIENT_IMPL *);
150
150
static XSASL_CLIENT *xsasl_cyrus_client_create(XSASL_CLIENT_IMPL *,
151
 
                                                       VSTREAM *,
152
 
                                                       const char *,
153
 
                                                       const char *,
154
 
                                                       const char *);
 
151
                                                XSASL_CLIENT_CREATE_ARGS *);
155
152
static int xsasl_cyrus_client_set_security(XSASL_CLIENT *, const char *);
156
153
static int xsasl_cyrus_client_first(XSASL_CLIENT *, const char *, const char *,
157
154
                                    const char *, const char **, VSTRING *);
305
302
/* xsasl_cyrus_client_create - per-session SASL initialization */
306
303
 
307
304
XSASL_CLIENT *xsasl_cyrus_client_create(XSASL_CLIENT_IMPL *unused_impl,
308
 
                                                VSTREAM *stream,
309
 
                                                const char *service,
310
 
                                                const char *server,
311
 
                                                const char *sec_props)
 
305
                                             XSASL_CLIENT_CREATE_ARGS *args)
312
306
{
313
307
    XSASL_CYRUS_CLIENT *client = 0;
314
308
    static sasl_callback_t callbacks[] = {
350
344
#define NULL_SERVER_ADDR        ((char *) 0)
351
345
#define NULL_CLIENT_ADDR        ((char *) 0)
352
346
 
353
 
    if ((sasl_status = SASL_CLIENT_NEW(service, server,
 
347
    if ((sasl_status = SASL_CLIENT_NEW(args->service, args->server_name,
354
348
                                       NULL_CLIENT_ADDR, NULL_SERVER_ADDR,
355
349
                                 var_cyrus_sasl_authzid ? custom_callbacks :
356
350
                                       custom_callbacks + 1, NULL_SECFLAGS,
373
367
    client->xsasl.free = xsasl_cyrus_client_free;
374
368
    client->xsasl.first = xsasl_cyrus_client_first;
375
369
    client->xsasl.next = xsasl_cyrus_client_next;
376
 
    client->stream = stream;
 
370
    client->stream = args->stream;
377
371
    client->sasl_conn = sasl_conn;
378
372
    client->callbacks = custom_callbacks;
379
373
    client->decoded = vstring_alloc(20);
383
377
    for (cp = custom_callbacks; cp->id != SASL_CB_LIST_END; cp++)
384
378
        cp->context = (void *) client;
385
379
 
386
 
    if (xsasl_cyrus_client_set_security(&client->xsasl, sec_props)
 
380
    if (xsasl_cyrus_client_set_security(&client->xsasl,
 
381
                                        args->security_options)
387
382
        != XSASL_AUTH_OK)
388
383
        XSASL_CYRUS_CLIENT_CREATE_ERROR_RETURN(0);
389
384