~ubuntu-branches/ubuntu/karmic/openafs/karmic-updates

« back to all changes in this revision

Viewing changes to src/rxkad/rxkad_server.c

  • Committer: Bazaar Package Importer
  • Author(s): Russ Allbery
  • Date: 2008-09-22 19:07:02 UTC
  • mfrom: (12.1.14 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080922190702-59m13d7kn6gkw32d
Tags: 1.4.7.dfsg1-6
* Apply upstream patch to free /proc entries in the correct order.
  Thanks, Marc Dionne.  (Closes: #493914)
* Apply upstream deltas to support 2.6.27 kernels and to stop using
  COMMON_KERN_CFLAGS for all 2.6 kernels uniformly, which fixes
  problems on amd64 with newer kernels.  Thanks, Björn Torkelsson.
  (LP: #267504)
* Translation updates:
  - Swedish, thanks Martin Bagge.  (Closes: #493120)

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
#include <afs/param.h>
16
16
 
17
17
RCSID
18
 
    ("$Header: /cvs/openafs/src/rxkad/rxkad_server.c,v 1.14.2.6 2006/04/14 13:13:49 shadow Exp $");
 
18
    ("$Header: /cvs/openafs/src/rxkad/rxkad_server.c,v 1.14.2.11 2008/01/23 04:22:51 shadow Exp $");
19
19
 
20
20
#include <afs/stds.h>
21
21
#include <sys/types.h>
28
28
#else
29
29
#include <netinet/in.h>
30
30
#endif
31
 
#ifdef HAVE_STRING_H
32
31
#include <string.h>
33
 
#else
34
 
#ifdef HAVE_STRINGS_H
35
 
#include <strings.h>
36
 
#endif
37
 
#endif
38
32
#include <rx/rx.h>
39
33
#include <rx/xdr.h>
40
34
#include <des.h>
63
57
    rxkad_CheckPacket,          /* check data packet */
64
58
    rxkad_DestroyConnection,
65
59
    rxkad_GetStats,
66
 
    0,                          /* spare 1 */
 
60
    rxkad_SetConfiguration,
67
61
    0,                          /* spare 2 */
68
62
    0,                          /* spare 3 */
69
63
};
333
327
        code =
334
328
            tkt_DecodeTicket5(tix, tlen, tsp->get_key, tsp->get_key_rock,
335
329
                              kvno, client.name, client.instance, client.cell,
336
 
                              &sessionkey, &host, &start, &end);
 
330
                              &sessionkey, &host, &start, &end, 
 
331
                              tsp->flags & RXS_CONFIG_FLAGS_DISABLE_DOTCHECK);
337
332
        if (code)
338
333
            return code;
339
334
    }
352
347
                             client.instance, client.cell, &sessionkey, &host,
353
348
                             &start, &end);
354
349
        if (code)
355
 
            return RXKADBADTICKET;
 
350
            return code;
356
351
    }
357
352
    code = tkt_CheckTimes(start, end, time(0));
358
 
    if (code == -1)
 
353
    if (code == 0) 
 
354
        return RXKADNOAUTH;
 
355
    else if (code == -1)
359
356
        return RXKADEXPIRED;
360
 
    else if (code <= 0)
361
 
        return RXKADNOAUTH;
 
357
    else if (code < -1)
 
358
        return RXKADBADTICKET;
362
359
 
363
360
    code = fc_keysched(&sessionkey, sconn->keysched);
364
361
    if (code)
456
453
    } else
457
454
        return RXKADNOAUTH;
458
455
}
 
456
 
 
457
/* Set security object configuration variables */
 
458
afs_int32 rxkad_SetConfiguration(struct rx_securityClass *aobj,
 
459
                                 struct rx_connection *aconn, 
 
460
                                 rx_securityConfigVariables atype,
 
461
                                         void * avalue, void **currentValue)
 
462
{
 
463
    struct rxkad_sprivate *private = 
 
464
    (struct rxkad_sprivate *) aobj->privateData;
 
465
 
 
466
    switch (atype) {
 
467
    case RXS_CONFIG_FLAGS:
 
468
        if (currentValue) {
 
469
            *((afs_uint32 *)currentValue) = private->flags;
 
470
        } else { 
 
471
            private->flags = (afs_uint32) avalue;
 
472
        }
 
473
        break;
 
474
    default:
 
475
        break;
 
476
    }
 
477
    return 0;
 
478
}