death to trailing whitespace
[openafs.git] / src / kauth / kalog.h
1 /*
2  * Copyright 2000, International Business Machines Corporation and others.
3  * All Rights Reserved.
4  *
5  * This software has been released under the terms of the IBM Public
6  * License.  For details, see the LICENSE file in the top-level source
7  * directory or online at http://www.openafs.org/dl/license10.html
8  */
9
10 /*
11  * ALL RIGHTS RESERVED
12  */
13
14 typedef struct {
15     time_t last_use;
16     afs_int32 host;
17 } kalog_elt;
18
19 #define KALOG_DB_MODE           0600
20
21 /* types of operations that we log */
22 #define LOG_GETTICKET           0
23 #define LOG_CHPASSWD            1
24 #define LOG_CRUSER              2
25 #define LOG_AUTHENTICATE        3
26 #define LOG_DELUSER             4
27 #define LOG_SETFIELDS           5
28 #define LOG_UNLOCK              6
29 #define LOG_AUTHFAILED          7
30 #define LOG_TGTREQUEST          8
31
32 #ifdef AUTH_DBM_LOG
33 #ifdef AFS_LINUX20_ENV
34 #include <gdbm.h>
35 #define dbm_store       gdbm_store
36 #define dbm_firstkey    gdbm_firstkey
37 #define dbm_fetch       gdbm_fetch
38 #define dbm_close       gdbm_close
39 #define dbm_open(F, L, M)       gdbm_open(F, 512, L, M, 0)
40 #define afs_dbm_nextkey(d, k)   gdbm_nextkey(d, k)
41 #define DBM GDBM_FILE
42 #define DBM_REPLACE GDBM_REPLACE
43
44 #else /* AFS_LINUX20_ENV */
45 #include <ndbm.h>
46 #define afs_dbm_nextkey(d, k) dbm_nextkey(d)
47 #endif
48 #endif /* AUTH_DBM_LOG */
49
50 #ifdef AUTH_DBM_LOG
51 #define KALOG(a,b,c,d,e,f,g) kalog_log(a,b,c,d,e,f,g)
52 extern void kalog_Init(void);
53 extern void kalog_log(char *, char *, char *, char *, char *, int, int);
54 #else
55 #define KALOG(a,b,c,d,e,f,g) ka_log(a,b,c,d,e,f,g)
56 #endif
57
58 extern void ka_log(char *, char *, char *, char *, char *, int, int);