comparison src/protocols/zephyr/ZMkAuth.c @ 8217:423453c1cf2b

[gaim-migrate @ 8940] " Many years ago MIT kerberos changed the variable krb_err_base to ERROR_TABLE_BASE_krb (of consistency reasons I suppose). MIT still support krb_err_base as well, while kth-krb don't. This tiny patch makes gaim compile with kth-krb. It only affects *very* old MIT kerberos installations badly ()." -- M?rten Svantesson "It looks reasonable enough. ERROR_TABLE_BASE_krb existed as far back as 1988 :-)" --Arun A Tharuvai (the normal zepher patch provider) committer: Tailor Script <tailor@pidgin.im>
author Luke Schierer <lschiere@pidgin.im>
date Sat, 07 Feb 2004 17:40:57 +0000
parents 424a40f12a6c
children 43dec50d8d51
comparison
equal deleted inserted replaced
8216:dcace041cfb8 8217:423453c1cf2b
2 * It contains source for the ZMakeAuthentication function. 2 * It contains source for the ZMakeAuthentication function.
3 * 3 *
4 * Created by: Robert French 4 * Created by: Robert French
5 * 5 *
6 * $Source$ 6 * $Source$
7 * $Author: warmenhoven $ 7 * $Author: lschiere $
8 * 8 *
9 * Copyright (c) 1987 by the Massachusetts Institute of Technology. 9 * Copyright (c) 1987 by the Massachusetts Institute of Technology.
10 * For copying and distribution information, see the file 10 * For copying and distribution information, see the file
11 * "mit-copyright.h". 11 * "mit-copyright.h".
12 */ 12 */
13 /* $Id: ZMkAuth.c 2096 2001-07-31 01:00:39Z warmenhoven $ */ 13 /* $Id: ZMkAuth.c 8940 2004-02-07 17:40:57Z lschiere $ */
14 14
15 #include <internal.h> 15 #include <internal.h>
16 16
17 #ifndef lint 17 #ifndef lint
18 static const char rcsid_ZMakeAuthentication_c[] = "$Id: ZMkAuth.c 2096 2001-07-31 01:00:39Z warmenhoven $"; 18 static const char rcsid_ZMakeAuthentication_c[] = "$Id: ZMkAuth.c 8940 2004-02-07 17:40:57Z lschiere $";
19 #endif 19 #endif
20 20
21 #ifdef ZEPHYR_USES_KERBEROS 21 #ifdef ZEPHYR_USES_KERBEROS
22 #include <krb_err.h> 22 #include <krb_err.h>
23 static long last_authent_time = 0L; 23 static long last_authent_time = 0L;
50 if (last_authent_time == 0 || (now - last_authent_time > 120)) { 50 if (last_authent_time == 0 || (now - last_authent_time > 120)) {
51 result = krb_mk_req(&authent, SERVER_SERVICE, 51 result = krb_mk_req(&authent, SERVER_SERVICE,
52 SERVER_INSTANCE, __Zephyr_realm, 0); 52 SERVER_INSTANCE, __Zephyr_realm, 0);
53 if (result != MK_AP_OK) { 53 if (result != MK_AP_OK) {
54 last_authent_time = 0; 54 last_authent_time = 0;
55 return (result+krb_err_base); 55 return (result+ERROR_TABLE_BASE_krb);
56 } 56 }
57 last_authent_time = now; 57 last_authent_time = now;
58 last_authent = authent; 58 last_authent = authent;
59 } 59 }
60 else { 60 else {