]>
Commit | Line | Data |
---|---|---|
5bf45be2 JB |
1 | --- mod_auth_radius-1.5.8/mod_auth_radius-2.0.c.orig 2009-05-16 10:31:47.000000000 +0200 |
2 | +++ mod_auth_radius-1.5.8/mod_auth_radius-2.0.c 2015-03-31 22:13:50.312803792 +0200 | |
3 | @@ -288,6 +288,8 @@ | |
4 | */ | |
5 | ||
6 | #include <netdb.h> | |
7 | +#include <unistd.h> | |
8 | +#include <arpa/inet.h> | |
9 | #include <openssl/md5.h> | |
10 | #include <sys/stat.h> | |
11 | ||
12 | @@ -534,10 +536,12 @@ | |
13 | } | |
14 | ||
15 | static const char * | |
16 | -set_int_slot(cmd_parms *cmd, char *struct_ptr, const char *arg) | |
17 | +set_int_slot(cmd_parms *cmd, void *mconfig, const char *arg) | |
18 | { | |
19 | - int offset = (int)cmd->info; | |
20 | - *(int *)(struct_ptr + offset) = atoi(arg); | |
21 | + char *struct_ptr = mconfig; | |
22 | + int offset = (int)cmd->info; | |
23 | + int *ptr = (int*)(struct_ptr + offset); | |
24 | + *ptr = atoi(arg); | |
25 | return NULL; | |
26 | } | |
27 | ||
28 | @@ -680,7 +684,7 @@ | |
29 | * benefit here. | |
30 | */ | |
31 | apr_snprintf(one, COOKIE_SIZE, "%s%s%s%s%s%08x", scr->secret, | |
32 | - r->user, passwd, c->remote_ip, hostname, expires); | |
33 | + r->user, passwd, r->useragent_ip, hostname, (unsigned)expires); | |
34 | ||
35 | /* if you're REALLY worried about what's going on */ | |
36 | ||
37 | @@ -697,10 +701,10 @@ | |
38 | apr_snprintf(two, COOKIE_SIZE, "%s%s", scr->secret, ap_md5(r->pool, one)); | |
39 | if (string == NULL) { | |
40 | apr_snprintf(cookie, COOKIE_SIZE, "%s%08x", | |
41 | - ap_md5(r->pool, two), expires); | |
42 | + ap_md5(r->pool, two), (unsigned)expires); | |
43 | } else { | |
44 | apr_snprintf(cookie, COOKIE_SIZE, "%s%08x%s", | |
45 | - ap_md5(r->pool, two), expires, string); | |
46 | + ap_md5(r->pool, two), (unsigned)expires, string); | |
47 | } | |
48 | return cookie; | |
49 | } | |
50 | @@ -1310,7 +1314,6 @@ | |
51 | /* Apache 2.1+ */ | |
52 | static const char * const aszPost[]={ "mod_authz_user.c", NULL }; | |
53 | ap_register_provider(p, AUTHN_PROVIDER_GROUP, "radius", "0", &authn_radius_provider); | |
54 | - ap_hook_check_user_id(authenticate_basic_user,NULL,aszPost,APR_HOOK_MIDDLE); | |
55 | } | |
56 | ||
57 | module AP_MODULE_DECLARE_DATA radius_auth_module = |