diff -urN mod_auth_external-2.2.7.orig/mod_auth_external.c mod_auth_external-2.2.7/mod_auth_external.c --- mod_auth_external-2.2.7.orig/mod_auth_external.c 2004-04-22 15:23:27.000000000 +0000 +++ mod_auth_external-2.2.7/mod_auth_external.c 2004-04-23 08:19:22.231779096 +0000 @@ -582,6 +582,14 @@ } +static int extauth_init_handler(apr_pool_t *p, apr_pool_t *plog, apr_pool_t *ptemp, + server_rec *s) +{ + ap_add_version_component(p, "auth_external/2.2.1"); + return OK; +} + + /* * Authenticate a user */ @@ -810,6 +818,7 @@ static void register_hooks(apr_pool_t *p) { + ap_hook_post_config(extauth_init_handler, NULL, NULL, APR_HOOK_MIDDLE); ap_hook_check_user_id(extauth_basic_user, NULL, NULL, APR_HOOK_MIDDLE); ap_hook_auth_checker(extauth_check_auth, NULL, NULL, APR_HOOK_MIDDLE); } diff -urN mod_auth_external-2.2.7.orig/pwauth/config.h mod_auth_external-2.2.7/pwauth/config.h --- mod_auth_external-2.2.7.orig/pwauth/config.h 2004-04-22 15:23:27.000000000 +0000 +++ mod_auth_external-2.2.7/pwauth/config.h 2004-04-23 08:20:55.938533504 +0000 @@ -92,11 +92,11 @@ /* #define SHADOW_NONE /**/ /* #define SHADOW_BSD /**/ -#define SHADOW_SUN /**/ +/* #define SHADOW_SUN /**/ /* #define SHADOW_JFH /**/ /* #define SHADOW_MDW /**/ /* #define SHADOW_AIX /**/ -/* #define PAM /**/ +#define PAM /**/ /* #define PAM_SOLARIS_26 /**/ @@ -130,7 +130,7 @@ * via the web. If you have the lastlog.h header file, define HAVE_LASTLOG_H. */ -#define UNIX_LASTLOG /**/ +/*#define UNIX_LASTLOG /**/ #define HAVE_LASTLOG_H /**/ /* SERVER_UIDS is a list of the uid numbers of the accounts that may run @@ -145,7 +145,7 @@ * last). */ -#define SERVER_UIDS 99 /* user "nobody" */ +/*#define SERVER_UIDS 48 /* user "apache" */ /* If MIN_UNIX_UID is defined to an integer, logins with uid numbers less than @@ -156,7 +156,7 @@ * given value will be accepted). */ -#define MIN_UNIX_UID 500 /**/ +/*#define MIN_UNIX_UID 500 /**/ /* If IGNORE_CASE is defined, the login given is checked in two different @@ -184,7 +184,7 @@ * SLEEP_LOCK. SLEEP_TIME defaults to 2 seconds if not defined. */ -#define SLEEP_LOCK "/var/run/pwauth.lock" +/*#define SLEEP_LOCK "/var/run/pwauth.lock" /* If ENV_METHOD is defined, pwauth expects mod_auth_external to be configured diff -urN mod_auth_external-2.2.7.orig/pwauth/pwauth.c mod_auth_external-2.2.7/pwauth/pwauth.c --- mod_auth_external-2.2.7.orig/pwauth/pwauth.c 2004-04-22 15:23:27.000000000 +0000 +++ mod_auth_external-2.2.7/pwauth/pwauth.c 2004-04-23 08:19:22.232778944 +0000 @@ -653,8 +653,10 @@ #endif } +#ifdef SERVER_UIDS /* Array of uid numbers that may run this program */ int server_uids[]= {SERVER_UIDS, 0}; +#endif main(int argc, char **argv) { @@ -664,7 +666,10 @@ char login[BFSZ+1], passwd[BFSZ+1]; char *c, *strchr(); #endif -int uid,i; +#ifdef SERVER_UIDS +int uid; +#endif +int i; int passwd_ok; struct rlimit rlim; @@ -672,6 +677,7 @@ rlim.rlim_cur = rlim.rlim_max = 0; (void)setrlimit(RLIMIT_CORE, &rlim); +#ifdef SERVER_UIDS /* Check that we were invoked by one of the listed uids or by root */ uid= getuid(); for (i= 0; server_uids[i] != 0 && server_uids[i] != uid; i++) @@ -679,6 +685,7 @@ if (uid != server_uids[i]) exit(2); +#endif /* Get the arguments (login and password) */ #ifdef ENV_METHOD if ((login= getenv("USER")) == NULL ||