Skip to content

Commit 1019a93

Browse files
committed
A quick-n-dirty hack. Expose the auth_provider api from mod_auth_basic alone, on Win32 only. Requires mod_auth_basic be loaded prior to using mod_auth_digest or any other mod_authn/z modules. Win32 builds again. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@96794 13f79535-47bb-0310-9956-ffa450edef68
1 parent aabff03 commit 1019a93

6 files changed

Lines changed: 57 additions & 18 deletions

File tree

Apache.dsw

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,6 @@ Package=<4>
6666
Project_Dep_Name mod_asis
6767
End Project Dependency
6868
Begin Project Dependency
69-
Project_Dep_Name mod_auth_basic
70-
End Project Dependency
71-
Begin Project Dependency
7269
Project_Dep_Name mod_auth_digest
7370
End Project Dependency
7471
Begin Project Dependency
@@ -605,6 +602,9 @@ Package=<4>
605602
Begin Project Dependency
606603
Project_Dep_Name libhttpd
607604
End Project Dependency
605+
Begin Project Dependency
606+
Project_Dep_Name mod_auth_basic
607+
End Project Dependency
608608
}}}
609609

610610
###############################################################################
@@ -626,6 +626,9 @@ Package=<4>
626626
Begin Project Dependency
627627
Project_Dep_Name libhttpd
628628
End Project Dependency
629+
Begin Project Dependency
630+
Project_Dep_Name mod_auth_basic
631+
End Project Dependency
629632
}}}
630633

631634
###############################################################################
@@ -647,6 +650,9 @@ Package=<4>
647650
Begin Project Dependency
648651
Project_Dep_Name libhttpd
649652
End Project Dependency
653+
Begin Project Dependency
654+
Project_Dep_Name mod_auth_basic
655+
End Project Dependency
650656
}}}
651657

652658
###############################################################################
@@ -668,6 +674,9 @@ Package=<4>
668674
Begin Project Dependency
669675
Project_Dep_Name libhttpd
670676
End Project Dependency
677+
Begin Project Dependency
678+
Project_Dep_Name mod_auth_basic
679+
End Project Dependency
671680
}}}
672681

673682
###############################################################################
@@ -689,6 +698,9 @@ Package=<4>
689698
Begin Project Dependency
690699
Project_Dep_Name libhttpd
691700
End Project Dependency
701+
Begin Project Dependency
702+
Project_Dep_Name mod_auth_basic
703+
End Project Dependency
692704
}}}
693705

694706
###############################################################################
@@ -710,6 +722,9 @@ Package=<4>
710722
Begin Project Dependency
711723
Project_Dep_Name libhttpd
712724
End Project Dependency
725+
Begin Project Dependency
726+
Project_Dep_Name mod_auth_basic
727+
End Project Dependency
713728
}}}
714729

715730
###############################################################################
@@ -731,6 +746,9 @@ Package=<4>
731746
Begin Project Dependency
732747
Project_Dep_Name libhttpd
733748
End Project Dependency
749+
Begin Project Dependency
750+
Project_Dep_Name mod_auth_basic
751+
End Project Dependency
734752
}}}
735753

736754
###############################################################################
@@ -752,6 +770,9 @@ Package=<4>
752770
Begin Project Dependency
753771
Project_Dep_Name libhttpd
754772
End Project Dependency
773+
Begin Project Dependency
774+
Project_Dep_Name mod_auth_basic
775+
End Project Dependency
755776
}}}
756777

757778
###############################################################################
@@ -773,6 +794,9 @@ Package=<4>
773794
Begin Project Dependency
774795
Project_Dep_Name libhttpd
775796
End Project Dependency
797+
Begin Project Dependency
798+
Project_Dep_Name mod_auth_basic
799+
End Project Dependency
776800
}}}
777801

778802
###############################################################################
@@ -794,6 +818,9 @@ Package=<4>
794818
Begin Project Dependency
795819
Project_Dep_Name libhttpd
796820
End Project Dependency
821+
Begin Project Dependency
822+
Project_Dep_Name mod_auth_basic
823+
End Project Dependency
797824
}}}
798825

799826
###############################################################################

Makefile.win

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,6 @@ _install:
420420
copy srclib\apr\$(LONG)\libapr.pdb "$(INSTDIR)\bin" <.y
421421
copy srclib\apr-iconv\$(LONG)\libapriconv.pdb "$(INSTDIR)\bin" <.y
422422
copy srclib\apr-util\$(LONG)\libaprutil.pdb "$(INSTDIR)\bin" <.y
423-
copy modules\aaa\$(LONG)\mod_access.pdb "$(INSTDIR)\modules" <.y
424423
copy modules\aaa\$(LONG)\mod_auth_basic.pdb "$(INSTDIR)\modules" <.y
425424
copy modules\aaa\$(LONG)\mod_auth_digest.pdb "$(INSTDIR)\modules" <.y
426425
copy modules\aaa\$(LONG)\mod_authn_anon.pdb "$(INSTDIR)\modules" <.y

modules/aaa/auth_provider.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ static apr_status_t authz_cleanup_providers(void *ctx)
7373
return APR_SUCCESS;
7474
}
7575

76-
AP_DECLARE(void) authn_register_provider(apr_pool_t *p, const char *name,
76+
AAA_DECLARE(void) authn_register_provider(apr_pool_t *p, const char *name,
7777
const authn_provider *provider)
7878
{
7979
if (authn_repos_providers == NULL) {
@@ -86,7 +86,7 @@ AP_DECLARE(void) authn_register_provider(apr_pool_t *p, const char *name,
8686
apr_hash_set(authn_repos_providers, name, APR_HASH_KEY_STRING, provider);
8787
}
8888

89-
AP_DECLARE(const authn_provider *) authn_lookup_provider(const char *name)
89+
AAA_DECLARE(const authn_provider *) authn_lookup_provider(const char *name)
9090
{
9191
/* Better watch out against no registered providers */
9292
if (authn_repos_providers == NULL) {
@@ -96,7 +96,7 @@ AP_DECLARE(const authn_provider *) authn_lookup_provider(const char *name)
9696
return apr_hash_get(authn_repos_providers, name, APR_HASH_KEY_STRING);
9797
}
9898

99-
AP_DECLARE(void) authz_register_provider(apr_pool_t *p, const char *name,
99+
AAA_DECLARE(void) authz_register_provider(apr_pool_t *p, const char *name,
100100
const authz_provider *provider)
101101
{
102102
if (authz_repos_providers == NULL) {
@@ -109,7 +109,7 @@ AP_DECLARE(void) authz_register_provider(apr_pool_t *p, const char *name,
109109
apr_hash_set(authz_repos_providers, name, APR_HASH_KEY_STRING, provider);
110110
}
111111

112-
AP_DECLARE(const authz_provider *) authz_lookup_provider(const char *name)
112+
AAA_DECLARE(const authz_provider *) authz_lookup_provider(const char *name)
113113
{
114114
/* Better watch out against no registered providers */
115115
if (authz_repos_providers == NULL) {

modules/aaa/mod_auth.h

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,23 @@
6565
extern "C" {
6666
#endif
6767

68+
/* Create a set of AAA_DECLARE(type) and AAA_DECLARE_DATA with
69+
* appropriate export and import tags for the platform
70+
*/
71+
#if !defined(WIN32)
72+
#define AAA_DECLARE(type) type
73+
#define AAA_DECLARE_DATA
74+
#elif defined(AAA_DECLARE_STATIC)
75+
#define AAA_DECLARE(type) type __stdcall
76+
#define AAA_DECLARE_DATA
77+
#elif defined(AAA_DECLARE_EXPORT)
78+
#define AAA_DECLARE(type) __declspec(dllexport) type __stdcall
79+
#define AAA_DECLARE_DATA __declspec(dllexport)
80+
#else
81+
#define AAA_DECLARE(type) __declspec(dllimport) type __stdcall
82+
#define AAA_DECLARE_DATA __declspec(dllimport)
83+
#endif
84+
6885
#define AUTHN_DEFAULT_PROVIDER "file"
6986

7087
typedef enum {
@@ -89,18 +106,18 @@ typedef struct {
89106
const char *realm, char **rethash);
90107
} authn_provider;
91108

92-
AP_DECLARE(void) authn_register_provider(apr_pool_t *p, const char *name,
109+
AAA_DECLARE(void) authn_register_provider(apr_pool_t *p, const char *name,
93110
const authn_provider *provider);
94-
AP_DECLARE(const authn_provider *) authn_lookup_provider(const char *name);
111+
AAA_DECLARE(const authn_provider *) authn_lookup_provider(const char *name);
95112

96113
typedef struct {
97114
/* For a given user, return a hash of all groups the user belongs to. */
98115
apr_hash_t * (*get_user_groups)(request_rec *r, const char *user);
99116
} authz_provider;
100117

101-
AP_DECLARE(void) authz_register_provider(apr_pool_t *p, const char *name,
118+
AAA_DECLARE(void) authz_register_provider(apr_pool_t *p, const char *name,
102119
const authz_provider *provider);
103-
AP_DECLARE(const authz_provider *) authz_lookup_provider(const char *name);
120+
AAA_DECLARE(const authz_provider *) authz_lookup_provider(const char *name);
104121
#ifdef __cplusplus
105122
}
106123
#endif

modules/aaa/mod_auth_basic.dsp

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

modules/aaa/mod_auth_digest.dsp

Lines changed: 0 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)