|
1 diff -Naur kadm5-0.2.3/config.m4 kadm5-0.2.3~patched/config.m4 |
|
2 --- kadm5-0.2.3/config.m4 2003-05-09 10:28:45.000000000 -0400 |
|
3 +++ kadm5-0.2.3~patched/config.m4 2010-12-13 20:47:12.369457242 -0500 |
|
4 @@ -43,6 +43,7 @@ |
|
5 # --with-kadm5 -> add include path |
|
6 PHP_ADD_INCLUDE($KADM5_DIR) |
|
7 PHP_ADD_INCLUDE($KADM5_DIR/krb5) |
|
8 + PHP_ADD_INCLUDE($KADM5_DIR/et) |
|
9 |
|
10 # --with-kadm5 -> chech for lib and symbol presence |
|
11 LIBNAME=kadm5srv # you may want to change this |
|
12 @@ -59,7 +60,7 @@ |
|
13 PHP_ADD_LIBRARY_WITH_PATH(gssrpc, /usr/lib, KADM5_SHARED_LIBADD) |
|
14 PHP_ADD_LIBRARY_WITH_PATH(krb5, /usr/lib, KADM5_SHARED_LIBADD) |
|
15 PHP_ADD_LIBRARY_WITH_PATH(k5crypto, /usr/lib, KADM5_SHARED_LIBADD) |
|
16 - PHP_ADD_LIBRARY_WITH_PATH(dyn, /usr/lib, KADM5_SHARED_LIBADD) |
|
17 + dnl PHP_ADD_LIBRARY_WITH_PATH(dyn, /usr/lib, KADM5_SHARED_LIBADD) |
|
18 |
|
19 PHP_EXTENSION(kadm5, $ext_shared) |
|
20 fi |
|
21 diff -Naur kadm5-0.2.3/kadm5.c kadm5-0.2.3~patched/kadm5.c |
|
22 --- kadm5-0.2.3/kadm5.c 2003-05-28 06:51:42.000000000 -0400 |
|
23 +++ kadm5-0.2.3~patched/kadm5.c 2010-12-13 20:39:23.154629086 -0500 |
|
24 @@ -29,7 +29,8 @@ |
|
25 #include "config.h" |
|
26 #endif |
|
27 |
|
28 -#include "kadm5/admin.h" |
|
29 +#include <kadm5/admin.h> |
|
30 +#include <kadm5/kadm_err.h> |
|
31 |
|
32 #include "php.h" |
|
33 #include "php_ini.h" |
|
34 @@ -74,7 +75,7 @@ |
|
35 * |
|
36 * Every user visible function must have an entry in kadm5_functions[]. |
|
37 */ |
|
38 -function_entry kadm5_functions[] = { |
|
39 +zend_function_entry kadm5_functions[] = { |
|
40 PHP_FE(kadm5_init_with_password, NULL) |
|
41 PHP_FE(kadm5_destroy, NULL) |
|
42 PHP_FE(kadm5_flush, NULL) |
|
43 @@ -436,6 +437,7 @@ |
|
44 php_error(E_WARNING, "Multiple values for single or folded enctype. (KADM5_SETKEY_DUP_ENCTYPES)"); |
|
45 break; |
|
46 default: |
|
47 + break; |
|
48 } |
|
49 } |
|
50 /* }}} */ |
|
51 @@ -465,12 +467,29 @@ |
|
52 params.admin_server = admin_server; |
|
53 params.mask |= KADM5_CONFIG_ADMIN_SERVER; |
|
54 |
|
55 - rc = kadm5_init_with_password(princstr, |
|
56 +/* prototype: |
|
57 +kadm5_ret_t kadm5_init_with_password(krb5_context context, |
|
58 + char *client_name, |
|
59 + char *pass, |
|
60 + char *service_name, |
|
61 + kadm5_config_params *params, |
|
62 + krb5_ui_4 struct_version, |
|
63 + krb5_ui_4 api_version, |
|
64 + char **db_args, |
|
65 + void **server_handle); |
|
66 +*/ |
|
67 + |
|
68 + krb5_context context; |
|
69 + krb5_init_context(&context); |
|
70 + char **db_args = NULL; |
|
71 + rc = kadm5_init_with_password(context, |
|
72 + princstr, |
|
73 password, |
|
74 KADM5_ADMIN_SERVICE, |
|
75 ¶ms, |
|
76 KADM5_STRUCT_VERSION, |
|
77 KADM5_API_VERSION_2, |
|
78 + db_args, |
|
79 &handle); |
|
80 |
|
81 if (rc) { |