OpenAFS
OpenAFS distributed network file system
|
00001 /* 00002 * Copyright 2000, International Business Machines Corporation and others. 00003 * All Rights Reserved. 00004 * 00005 * This software has been released under the terms of the IBM Public 00006 * License. For details, see the LICENSE file in the top-level source 00007 * directory or online at http://www.openafs.org/dl/license10.html 00008 */ 00009 00010 /* 00011 * ALL RIGHTS RESERVED 00012 */ 00013 00014 typedef struct { 00015 time_t last_use; 00016 afs_int32 host; 00017 } kalog_elt; 00018 00019 #define KALOG_DB_MODE 0600 00020 00021 /* types of operations that we log */ 00022 #define LOG_GETTICKET 0 00023 #define LOG_CHPASSWD 1 00024 #define LOG_CRUSER 2 00025 #define LOG_AUTHENTICATE 3 00026 #define LOG_DELUSER 4 00027 #define LOG_SETFIELDS 5 00028 #define LOG_UNLOCK 6 00029 #define LOG_AUTHFAILED 7 00030 #define LOG_TGTREQUEST 8 00031 00032 #ifdef AUTH_DBM_LOG 00033 #ifdef AFS_LINUX20_ENV 00034 #include <gdbm.h> 00035 #define dbm_store gdbm_store 00036 #define dbm_firstkey gdbm_firstkey 00037 #define dbm_fetch gdbm_fetch 00038 #define dbm_close gdbm_close 00039 #define dbm_open(F, L, M) gdbm_open(F, 512, L, M, 0) 00040 #define afs_dbm_nextkey(d, k) gdbm_nextkey(d, k) 00041 #define DBM GDBM_FILE 00042 #define DBM_REPLACE GDBM_REPLACE 00043 00044 #else /* AFS_LINUX20_ENV */ 00045 #include <ndbm.h> 00046 #define afs_dbm_nextkey(d, k) dbm_nextkey(d) 00047 #endif 00048 #endif /* AUTH_DBM_LOG */ 00049 00050 #ifdef AUTH_DBM_LOG 00051 #define KALOG(a,b,c,d,e,f,g) kalog_log(a,b,c,d,e,f,g) 00052 extern void kalog_Init(void); 00053 extern void kalog_log(char *, char *, char *, char *, char *, int, int); 00054 #else 00055 #define KALOG(a,b,c,d,e,f,g) ka_log(a,b,c,d,e,f,g) 00056 #endif 00057 00058 extern void ka_log(char *, char *, char *, char *, char *, int, int);