Added apache 2.4 compatibility and fixed bug in configure.ac

#18 Open
Repository
mathias_burger
Branch
master
Repository
atlassianlabs
Branch
master

Bitbucket cannot automatically merge this request.

The commits that make up this pull request have been removed.

Bitbucket cannot automatically merge this request due to conflicts.

Review the conflicts on the Overview tab. You can then either decline the request or merge it manually on your local system using the following commands:

git checkout master
git remote add mathias_burger/cwdapache https://bitbucket.org/mathias_burger/cwdapache.git
git fetch mathias_burger/cwdapache
git merge --no-ff -m 'Merged in mathias_burger/cwdapache (pull request #18)' remotes/mathias_burger/cwdapache/master
Author
  1. Mathias Burger
Reviewers
Description

Apache 2.4 now uses the provider api and removed a deprecated method that was used in the code. Furthermore, remote_ip is now called client_ip.

The configure.ac script did only find a binary called 'httpd', but on systems like debian it is called 'apache2'. Now it looks for both executables and writes the right one into the HTTPD variable.

Security Assistant
  • Dependencies Checking for dependencies...
  • Dependents Checking for dependents...

Comments (16)

  1. Nathan Neulinger

    Would sure be nice if y'all could approve this pull request - at least into an "official" branch so that everyone using 2.4 could have an official baseline to work from, even if it's not the 'master' branch yet.

    Including the fixes for svn 1.8 (the two changes to structures) would also be good...

    1. Joseph Walton

      This patch goes out of its way to stay compatible with both versions of Apache. I'm considering merging this PR instead, which simply requires 2.4. A version of that which also failed very clearly on attempts to build it with Apache 2.2 would be appropriate for merging into master.

      1. Ove Ranheim

        PR_21 fails on Ubuntu 14.04:

        configure: creating ./config.status
        config.status: creating Makefile
        config.status: error: cannot find input file: `src/Makefile.in'
        
      2. Nathan Neulinger

        I'll be happy to create a clean pull request based on these two and the additional SVN fixes - just detail what your requirements are for it to be merged. In my view, since the changes to retain support with both old and new apache are trivial, might as well retain support for both.

        1. Joseph Walton

          Thanks.

          since the changes to retain support with both old and new apache are trivial,

          The change is simple, but I think there's risk of the #ifdef'd blocks getting out of sync. I think a better way to support both might be to leave Apache 2.2 support in an older Git branch.

          I'd be happy with requiring 2.4 and having a build that checked the magic number; something like:

          #if !AP_MODULE_MAGIC_AT_LEAST(20080403,1)
          #error "Unsupported Apache version; too old"
          #if
          
  2. Ove Ranheim

    With little testing so far, PR18 compiles and installs fine on Ubuntu 14.04 and AFAIK it's the only option for Apache 2.4. Wouldn't it make sense to accept this PR? One could either maintain a separate branch for Apache 2.4, or add concurrent support for both 2.2 and 2.4.

  3. Ove Ranheim

    I've done some testing on PR_18 on Ubuntu 14.04 LTS and for the most part it works well! However, it exits with segmentation fault when using the AuthzSVNCrowdAccessFile directive.

    AuthzSVNCrowdAccessFile /etc/apache2/dav_svn.authz
    Require valid-user
    
    [Thu Jul 17 15:37:25.721227 2014] [authz_svn:debug] [pid 2306:tid 140274227472128] mod_authz_svn_crowd.c(275): [client x.x.x.x:52120] Path to authz file is /etc/apache2/dav_svn.authz
    [Thu Jul 17 15:37:26.572742 2014] [core:notice] [pid 18717:tid 140274525681536] AH00051: child pid 2306 exit signal Segmentation fault (11), possible coredump in /etc/apache2
    

    It's works fine when using a specific crowd group through the the Require crowd-group <group> (instead of AuthzSVNCrowdAccessFile). What may be the cause of this?

    Mathias, can you look into this?

    Cheers, Ove

    1. Nathan Neulinger

      For the segfault fix - you just need to apply the updated structure definitions for svn 1.8.

      Probably should wrap that hash_key one with an #if as well, this was just thrown together for expediency.

      diff --git a/src/svn/mod_authz_svn_crowd.c b/src/svn/mod_authz_svn_crowd.c
      index 69b9aa0..3164a40 100644
      --- a/src/svn/mod_authz_svn_crowd.c
      +++ b/src/svn/mod_authz_svn_crowd.c
      @@ -50,6 +50,7 @@
      
       #include <svn_pools.h>
       #include <svn_dirent_uri.h>
      +#include <svn_version.h>
      
       const char *
       svn_fspath__canonicalize(const char *fspath,
      @@ -73,6 +74,7 @@ typedef struct authz_svn_config_rec {
         const char *base_path;
         const char *access_file;
         const char *repo_relative_access_file;
      +  const char *groups_file; // rwb
         const char *force_username_case;
       } authz_svn_config_rec;
      
      @@ -105,6 +107,12 @@ struct svn_config_t
         /* Temporary value used for expanded default values in svn_config_get.
            (Using a stringbuf so that frequent resetting is efficient.) */
         svn_stringbuf_t *tmp_value;
      +
      +#if SVN_VER_MINOR >= 7
      +  /* Specifies whether section names are populated case sensitively. */
      +  svn_boolean_t section_names_case_sensitive;
      +#endif
      +
       };
      
       typedef struct
      @@ -113,7 +121,7 @@ typedef struct
         const char *name;
      
         /* The section name, converted into a hash key. */
      -  const char *hash_key;
      +  // const char *hash_key;
      
         /* Table of cfg_option_t's. */
         apr_hash_t *options;
      
  4. William Wu

    why ouput error when i did Make after i modify files based on PR18, my environment is Ubuntu14.04 and apache2.4.7

    make all-recursive make[1]: Entering directory /home/aspect/resources/mod_authnz_crowd-2.2.2' Making all in src make[2]: Entering directory/home/aspect/resources/mod_authnz_crowd-2.2.2/src' Making all in svn make[3]: Entering directory /home/aspect/resources/mod_authnz_crowd-2.2.2/src/svn' /bin/bash ../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../.. -I/usr/include/apache2apr-1-config --cppflags --includes-I/usr/include/subversion-1apr-1-config --cflags-g -O1 -MT mod_authz_svn_crowd.lo -MD -MP -MF .deps/mod_authz_svn_crowd.Tpo -c -o mod_authz_svn_crowd.lo mod_authz_svn_crowd.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I/usr/include/apache2 -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/include/apr-1.0 -I/usr/include/subversion-1 -pthread -g -O1 -MT mod_authz_svn_crowd.lo -MD -MP -MF .deps/mod_authz_svn_crowd.Tpo -c mod_authz_svn_crowd.c -fPIC -DPIC -o .libs/mod_authz_svn_crowd.o mod_authz_svn_crowd.c: In function 'get_access_conf': mod_authz_svn_crowd.c:284:7: warning: 'svn_repos_authz_read' is deprecated (declared at /usr/include/subversion-1/svn_repos.h:3208) [-Wdeprecated-declarations] svn_err = svn_repos_authz_read(&access_conf, access_file, ^ libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I/usr/include/apache2 -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/include/apr-1.0 -I/usr/include/subversion-1 -pthread -g -O1 -MT mod_authz_svn_crowd.lo -MD -MP -MF .deps/mod_authz_svn_crowd.Tpo -c mod_authz_svn_crowd.c -o mod_authz_svn_crowd.o >/dev/null 2>&1 mv -f .deps/mod_authz_svn_crowd.Tpo .deps/mod_authz_svn_crowd.Plo /bin/bash ../../libtool --tag=CC --mode=link gccapr-1-config --cflags-g -O1 -module -o mod_authz_svn_crowd.la -rpath /usr/local/lib mod_authz_svn_crowd.lo -lcurl -lapr-1 -lxml2 libtool: link: gcc -shared -fPIC -DPIC .libs/mod_authz_svn_crowd.o /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so /usr/lib/x86_64-linux-gnu/libapr-1.so -lxml2 -pthread -O1 -pthread -Wl,-soname -Wl,mod_authz_svn_crowd.so.0 -o .libs/mod_authz_svn_crowd.so.0.0.0 libtool: link: (cd ".libs" && rm -f "mod_authz_svn_crowd.so.0" && ln -s "mod_authz_svn_crowd.so.0.0.0" "mod_authz_svn_crowd.so.0") libtool: link: (cd ".libs" && rm -f "mod_authz_svn_crowd.so" && ln -s "mod_authz_svn_crowd.so.0.0.0" "mod_authz_svn_crowd.so") libtool: link: ar cru .libs/mod_authz_svn_crowd.a mod_authz_svn_crowd.o libtool: link: ranlib .libs/mod_authz_svn_crowd.a libtool: link: ( cd ".libs" && rm -f "mod_authz_svn_crowd.la" && ln -s "../mod_authz_svn_crowd.la" "mod_authz_svn_crowd.la" ) make[3]: Leaving directory/home/aspect/resources/mod_authnz_crowd-2.2.2/src/svn' make[3]: Entering directory /home/aspect/resources/mod_authnz_crowd-2.2.2/src' /bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/include/apache2apr-1-config --cppflags --includesxml2-config --cflagsapr-1-config --cflags-g -Wmissing-prototypes -O1 -MT mod_authnz_crowd.lo -MD -MP -MF .deps/mod_authnz_crowd.Tpo -c -o mod_authnz_crowd.lo mod_authnz_crowd.c libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -I/usr/include/apache2 -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/usr/include/apr-1.0 -I/usr/include/libxml2 -pthread -g -Wmissing-prototypes -O1 -MT mod_authnz_crowd.lo -MD -MP -MF .deps/mod_authnz_crowd.Tpo -c mod_authnz_crowd.c -fPIC -DPIC -o .libs/mod_authnz_crowd.o mod_authnz_crowd.c: In function 'create_dir_config': mod_authnz_crowd.c:85:29: error: 'crowd_config' has no member named 'crowd_cert_dir' dir_config->crowd_config->crowd_cert_dir = NULL; ^ mod_authnz_crowd.c:101:17: error: 'result' undeclared (first use in this function) result = crowd_authenticate(r, config->crowd_config, xlated_user, xlated_password); ^ mod_authnz_crowd.c:101:17: note: each undeclared identifier is reported only once for each function it appears in mod_authnz_crowd.c:101:45: error: 'r' undeclared (first use in this function) result = crowd_authenticate(r, config->crowd_config, xlated_user, xlated_password); ^ mod_authnz_crowd.c:101:48: error: 'config' undeclared (first use in this function) result = crowd_authenticate(r, config->crowd_config, xlated_user, xlated_password); ^ mod_authnz_crowd.c:101:70: error: 'xlated_user' undeclared (first use in this function) result = crowd_authenticate(r, config->crowd_config, xlated_user, xlated_password); ^ mod_authnz_crowd.c:101:83: error: 'xlated_password' undeclared (first use in this function) result = crowd_authenticate(r, config->crowd_config, xlated_user, xlated_password); ^ mod_authnz_crowd.c:107:21: warning: return makes pointer from integer without a cast [enabled by default] return AUTH_GRANTED; ^ mod_authnz_crowd.c:112:21: warning: return makes pointer from integer without a cast [enabled by default] return AUTH_GENERAL_ERROR; ^ mod_authnz_crowd.c: At top level: mod_authnz_crowd.c:115:5: error: expected identifier or '(' before '}' token } ^ mod_authnz_crowd.c:117:5: error: expected identifier or '(' before 'return' return AUTH_DENIED; ^ mod_authnz_crowd.c:118:1: error: expected identifier or '(' before '}' token } ^ mod_authnz_crowd.c:122:6: error: 'authn_crowd_check_password' undeclared here (not in a function) &authn_crowd_check_password, /* Callback for HTTP Basic authentication */ ^ mod_authnz_crowd.c: In function 'post_config': mod_authnz_crowd.c:181:37: warning: initialization makes pointer from integer without a cast [enabled by default] const char *error = add_basic_auth_conversion("ISO-8859-1", *dir_config, pconf, ptemp); ^ mod_authnz_crowd.c: In function 'authnz_crowd_user_groups': mod_authnz_crowd.c:196:39: warning: initialization makes pointer from integer without a cast [enabled by default] authnz_crowd_dir_config *config = get_config(r); ^ mod_authnz_crowd.c:201:13: error: 'i' undeclared (first use in this function) if (i >= 1) { ^ mod_authnz_crowd.c:203:13: error: 'iov' undeclared (first use in this function) iov[k].iov_base = GRP_ENV_DELIMITER; ^ mod_authnz_crowd.c:203:17: error: 'k' undeclared (first use in this function) iov[k].iov_base = GRP_ENV_DELIMITER; ^ mod_authnz_crowd.c:203:31: error: 'GRP_ENV_DELIMITER' undeclared (first use in this function) iov[k].iov_base = GRP_ENV_DELIMITER; ^ mod_authnz_crowd.c:204:30: error: 'GRP_ENV_DELIMITER_LEN' undeclared (first use in this function) iov[k].iov_len = GRP_ENV_DELIMITER_LEN; ^ In file included from /usr/include/apr-1.0/apr_hooks.h:22:0, from /usr/include/apache2/ap_hooks.h:40, from /usr/include/apache2/ap_config.h:25, from /usr/include/apache2/ap_provider.h:29, from mod_authnz_crowd.c:10: mod_authnz_crowd.c:208:35: error: 'user_groups' undeclared (first use in this function) void *grp = APR_ARRAY_IDX(user_groups, i, void *); ^ /usr/include/apr-1.0/apr_tables.h:141:46: note: in definition of macro 'APR_ARRAY_IDX' #define APR_ARRAY_IDX(ary,i,type) (((type *)(ary)->elts)[i]) ^ mod_authnz_crowd.c: At top level: mod_authnz_crowd.c:214:39: error: 'r' undeclared here (not in a function) const char *groups = apr_pstrcatv(r->pool, iov, nvec, NULL); ^ mod_authnz_crowd.c:214:48: error: 'iov' undeclared here (not in a function) const char *groups = apr_pstrcatv(r->pool, iov, nvec, NULL); ^ mod_authnz_crowd.c:214:53: error: 'nvec' undeclared here (not in a function) const char *groups = apr_pstrcatv(r->pool, iov, nvec, NULL); ^ mod_authnz_crowd.c:215:5: error: expected identifier or '(' before 'if' if (groups == NULL) { ^ mod_authnz_crowd.c:220:20: error: expected ')' before '->' token apr_table_set(r->subprocess_env, group_env_name, groups); ^ mod_authnz_crowd.c:221:1: error: expected declaration specifiers or '...' before string constant ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "Set groups environment variable '%s' for remote user '%s' to '%s'", group_env_name, r->user, groups); ^ mod_authnz_crowd.c:221:1: error: expected declaration specifiers or '...' before numeric constant In file included from mod_authnz_crowd.c:14:0: /usr/include/apache2/http_log.h:169:5: error: expected declaration specifiers or '...' before '(' token (aplog_module_index ? *aplog_module_index : APLOG_NO_MODULE) ^ /usr/include/apache2/http_log.h:283:42: note: in expansion of macro 'APLOG_MODULE_INDEX' #define APLOG_MARK __FILE__,__LINE__,APLOG_MODULE_INDEX ^ mod_authnz_crowd.c:221:19: note: in expansion of macro 'APLOG_MARK' ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "Set groups environment variable '%s' for remote user '%s' to '%s'", group_env_name, r->user, groups); ^ In file included from /usr/include/syslog.h:1:0, from /usr/include/apache2/http_log.h:37, from mod_authnz_crowd.c:14: /usr/include/apache2/http_log.h:50:25: error: expected declaration specifiers or '...' before numeric constant #define APLOG_DEBUG LOG_DEBUG /* debug-level messages */ ^ mod_authnz_crowd.c:221:31: note: in expansion of macro 'APLOG_DEBUG' ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "Set groups environment variable '%s' for remote user '%s' to '%s'", group_env_name, r->user, groups); ^ mod_authnz_crowd.c:221:44: error: expected declaration specifiers or '...' before numeric constant ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "Set groups environment variable '%s' for remote user '%s' to '%s'", group_env_name, r->user, groups); ^ mod_authnz_crowd.c:221:47: error: expected declaration specifiers or '...' before 'r' ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "Set groups environment variable '%s' for remote user '%s' to '%s'", group_env_name, r->user, groups); ^ mod_authnz_crowd.c:221:50: error: expected declaration specifiers or '...' before string constant ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "Set groups environment variable '%s' for remote user '%s' to '%s'", group_env_name, r->user, groups); ^ mod_authnz_crowd.c:221:119: error: unknown type name 'group_env_name' ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "Set groups environment variable '%s' for remote user '%s' to '%s'", group_env_name, r->user, groups); ^ mod_authnz_crowd.c:221:135: error: expected declaration specifiers or '...' before 'r' ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "Set groups environment variable '%s' for remote user '%s' to '%s'", group_env_name, r->user, groups); ^ mod_authnz_crowd.c:221:144: error: expected declaration specifiers or '...' before 'groups' ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r, "Set groups environment variable '%s' for remote user '%s' to '%s'", group_env_name, r->user, groups); ^ mod_authnz_crowd.c:222:1: error: expected identifier or '(' before '}' token } ^ mod_authnz_crowd.c: In function 'check_user_id': mod_authnz_crowd.c:226:39: warning: initialization makes pointer from integer without a cast [enabled by default] authnz_crowd_dir_config *config = get_config(r); ^ mod_authnz_crowd.c:230:5: error: unknown type name 'check_for_cookie_data_t' check_for_cookie_data_t data = { .r = r, .config = config }; ^ mod_authnz_crowd.c:230:5: error: field name not in record or union initializer mod_authnz_crowd.c:230:5: error: (near initialization for 'data') mod_authnz_crowd.c:230:5: warning: initialization makes integer from pointer without a cast [enabled by default] mod_authnz_crowd.c:230:5: warning: (near initialization for 'data') [enabled by default] mod_authnz_crowd.c:230:5: error: field name not in record or union initializer mod_authnz_crowd.c:230:5: error: (near initialization for 'data') mod_authnz_crowd.c:230:5: warning: excess elements in scalar initializer [enabled by default] mod_authnz_crowd.c:230:5: warning: (near initialization for 'data') [enabled by default] mod_authnz_crowd.c:231:18: error: 'check_for_cookie' undeclared (first use in this function) apr_table_do(check_for_cookie, &data, r->headers_in, NULL); ^ mod_authnz_crowd.c:232:13: error: request for member 'token' in something not a structure or union if (data.token == NULL) { ^ mod_authnz_crowd.c:235:61: error: request for member 'token' in something not a structure or union if (crowd_validate_session(r, config->crowd_config, data.token, &r->user) == CROWD_AUTHENTICATE_SUCCESS) { ^ mod_authnz_crowd.c: In function 'authn_crowd_check_password': mod_authnz_crowd.c:261:39: warning: initialization makes pointer from integer without a cast [enabled by default] authnz_crowd_dir_config *config = get_config(r); ^ mod_authnz_crowd.c:302:67: error: 'mconfig' undeclared (first use in this function) authnz_crowd_dir_config *config = (authnz_crowd_dir_config *) mconfig; ^ mod_authnz_crowd.c:303:21: error: 'parms' undeclared (first use in this function) return set_once(parms, &(config->crowd_config->crowd_cert_dir), w); ^ mod_authnz_crowd.c:303:50: error: 'crowd_config' has no member named 'crowd_cert_dir' return set_once(parms, &(config->crowd_config->crowd_cert_dir), w); ^ mod_authnz_crowd.c:303:69: error: 'w' undeclared (first use in this function) return set_once(parms, &(config->crowd_config->crowd_cert_dir), w); ^ mod_authnz_crowd.c:306:20: error: invalid storage class for function 'set_crowd_url' static const char *set_crowd_url(cmd_parms *parms, void *mconfig, const char *w) ^ mod_authnz_crowd.c: In function 'set_crowd_url': mod_authnz_crowd.c:321:5: warning: return makes pointer from integer without a cast [enabled by default] return set_once(parms, &(config->crowd_config->crowd_url), w); ^ mod_authnz_crowd.c: In function 'authn_crowd_check_password': mod_authnz_crowd.c:324:20: error: invalid storage class for function 'set_crowd_cache_max_age' static const char *set_crowd_cache_max_age(cmd_parms *parms, void *mconfig __attribute__((unused)), ^ mod_authnz_crowd.c: In function 'set_crowd_cache_max_age': mod_authnz_crowd.c:327:5: warning: return makes pointer from integer without a cast [enabled by default] return set_once(parms, &(authnz_crowd_process_config.cache_max_age_string), w); ^ mod_authnz_crowd.c: In function 'authn_crowd_check_password': mod_authnz_crowd.c:330:20: error: invalid storage class for function 'set_crowd_cache_max_entries' static const char *set_crowd_cache_max_entries(cmd_parms *parms, void *mconfig __attribute__((unused)), const char *w) ^ mod_authnz_crowd.c: In function 'set_crowd_cache_max_entries': mod_authnz_crowd.c:332:5: warning: return makes pointer from integer without a cast [enabled by default] return set_once(parms, &(authnz_crowd_process_config.cache_max_entries_string), w); ^ mod_authnz_crowd.c: In function 'authn_crowd_check_password': mod_authnz_crowd.c:335:20: error: invalid storage class for function 'set_crowd_accept_sso' static const char *set_crowd_accept_sso(cmd_parms *parms, void *mconfig, int on) ^ mod_authnz_crowd.c: In function 'set_crowd_accept_sso': mod_authnz_crowd.c:338:5: warning: return makes pointer from integer without a cast [enabled by default] return set_flag_once(parms, &(config->accept_sso), &(config->accept_sso_set), on); ^ mod_authnz_crowd.c: In function 'authn_crowd_check_password': mod_authnz_crowd.c:341:20: error: invalid storage class for function 'set_crowd_create_sso' static const char *set_crowd_create_sso(cmd_parms *parms, void *mconfig, int on) ^ mod_authnz_crowd.c: In function 'set_crowd_create_sso': mod_authnz_crowd.c:344:5: warning: return makes pointer from integer without a cast [enabled by default] return set_flag_once(parms, &(config->create_sso), &(config->create_sso_set), on); ^ mod_authnz_crowd.c: In function 'authn_crowd_check_password': mod_authnz_crowd.c:347:20: error: invalid storage class for function 'set_crowd_set_http_only' static const char *set_crowd_set_http_only(cmd_parms *parms, void *mconfig, int on) ^ mod_authnz_crowd.c: In function 'set_crowd_set_http_only': mod_authnz_crowd.c:350:3: warning: return makes pointer from integer without a cast [enabled by default] return set_flag_once(parms, &(config->set_http_only), &(config->set_http_only_set), on); ^ mod_authnz_crowd.c: In function 'authn_crowd_check_password': mod_authnz_crowd.c:353:20: error: invalid storage class for function 'set_crowd_ssl_verify_peer' static const char *set_crowd_ssl_verify_peer(cmd_parms *parms, void *mconfig, int on) ^ mod_authnz_crowd.c: In function 'set_crowd_ssl_verify_peer': mod_authnz_crowd.c:356:5: warning: return makes pointer from integer without a cast [enabled by default] return set_flag_once(parms, &(config->crowd_config->crowd_ssl_verify_peer), &(config->ssl_verify_peer_set), on); ^ mod_authnz_crowd.c: In function 'authn_crowd_check_password': mod_authnz_crowd.c:359:20: error: invalid storage class for function 'set_crowd_groups_env_name' static const char *set_crowd_groups_env_name(cmd_parms *parms, void *mconfig, const char *w) ^ mod_authnz_crowd.c: In function 'set_crowd_groups_env_name': mod_authnz_crowd.c:362:5: warning: return makes pointer from integer without a cast [enabled by default] return set_once(parms, &(config->crowd_config->groups_env_name), w); ^ In file included from /usr/include/apache2/ap_expr.h:30:0, from /usr/include/apache2/http_core.h:33, from mod_authnz_crowd.c:12: mod_authnz_crowd.c: In function 'authn_crowd_check_password': mod_authnz_crowd.c:367:45: error: 'set_authz_crowd_authoritative' undeclared (first use in this function) AP_INIT_FLAG("AuthzCrowdAuthoritative", set_authz_crowd_authoritative, NULL, OR_AUTHCFG, ^ /usr/include/apache2/http_config.h:156:26: note: in definition of macro 'AP_INIT_FLAG' { directive, { .flag=func }, mconfig, where, FLAG, help } ^ mod_authnz_crowd.c:370:35: error: 'set_crowd_app_name' undeclared (first use in this function) AP_INIT_TAKE1("CrowdAppName", set_crowd_app_name, NULL, OR_AUTHCFG, ^ /usr/include/apache2/http_config.h:129:27: note: in definition of macro 'AP_INIT_TAKE1' { directive, { .take1=func }, mconfig, where, TAKE1, help } ^ mod_authnz_crowd.c:372:39: error: 'set_crowd_app_password' undeclared (first use in this function) AP_INIT_TAKE1("CrowdAppPassword", set_crowd_app_password, NULL, OR_AUTHCFG, ^ /usr/include/apache2/http_config.h:129:27: note: in definition of macro 'AP_INIT_TAKE1' { directive, { .take1=func }, mconfig, where, TAKE1, help } ^ mod_authnz_crowd.c:374:47: error: 'set_crowd_basic_auth_encoding' undeclared (first use in this function) AP_INIT_ITERATE("CrowdBasicAuthEncoding", set_crowd_basic_auth_encoding, NULL, OR_AUTHCFG, ^ /usr/include/apache2/http_config.h:132:27: note: in definition of macro 'AP_INIT_ITERATE' { directive, { .take1=func }, mconfig, where, ITERATE, help } ^ mod_authnz_crowd.c:377:35: error: 'set_crowd_timeout' undeclared (first use in this function) AP_INIT_TAKE1("CrowdTimeout", set_crowd_timeout, NULL, OR_AUTHCFG, ^ /usr/include/apache2/http_config.h:129:27: note: in definition of macro 'AP_INIT_TAKE1' { directive, { .take1=func }, mconfig, where, TAKE1, help } ^ mod_authnz_crowd.c:379:5: error: initializer element is not constant AP_INIT_TAKE1("CrowdURL", set_crowd_url, NULL, OR_AUTHCFG, "The base URL of the Crowd server"), ^ mod_authnz_crowd.c:379:5: error: (near initialization for 'commands[5].func.take1') In file included from /usr/include/apache2/ap_expr.h:30:0, from /usr/include/apache2/http_core.h:33, from mod_authnz_crowd.c:12: mod_authnz_crowd.c:380:36: error: 'set_crowd_cert_path' undeclared (first use in this function) AP_INIT_TAKE1("CrowdCertPath", set_crowd_cert_path, NULL, OR_AUTHCFG, "The path to the SSL certificate file to supply to curl for Crowd over SSL"), ^ /usr/include/apache2/http_config.h:129:27: note: in definition of macro 'AP_INIT_TAKE1' { directive, { .take1=func }, mconfig, where, TAKE1, help } ^ mod_authnz_crowd.c:381:41: error: 'set_crowd_cert_dir' undeclared (first use in this function) AP_INIT_TAKE1("CrowdCertDirectory", set_crowd_cert_dir, NULL, OR_AUTHCFG, "The path to the SSL certificate directory to supply to curl for Crowd over SSL (must be prep'd with OpenSSL's c_rehash utility)"), ^ /usr/include/apache2/http_config.h:129:27: note: in definition of macro 'AP_INIT_TAKE1' { directive, { .take1=func }, mconfig, where, TAKE1, help } ^ mod_authnz_crowd.c:382:5: error: initializer element is not constant AP_INIT_TAKE1("CrowdCacheMaxAge", set_crowd_cache_max_age, NULL, RSRC_CONF, ^ mod_authnz_crowd.c:382:5: error: (near initialization for 'commands[8].func.take1') mod_authnz_crowd.c:385:5: error: initializer element is not constant AP_INIT_TAKE1("CrowdCacheMaxEntries", set_crowd_cache_max_entries, NULL, RSRC_CONF, ^ mod_authnz_crowd.c:385:5: error: (near initialization for 'commands[9].func.take1') mod_authnz_crowd.c:388:5: error: initializer element is not constant AP_INIT_FLAG("CrowdAcceptSSO", set_crowd_accept_sso, NULL, OR_AUTHCFG, ^ mod_authnz_crowd.c:388:5: error: (near initialization for 'commands[10].func.flag') mod_authnz_crowd.c:390:5: error: initializer element is not constant AP_INIT_FLAG("CrowdCreateSSO", set_crowd_create_sso, NULL, OR_AUTHCFG, ^ mod_authnz_crowd.c:390:5: error: (near initialization for 'commands[11].func.flag') mod_authnz_crowd.c:392:5: error: initializer element is not constant AP_INIT_FLAG("CrowdSetHttpOnly", set_crowd_set_http_only, NULL, OR_AUTHCFG, ^ mod_authnz_crowd.c:392:5: error: (near initialization for 'commands[12].func.flag') mod_authnz_crowd.c:394:5: error: initializer element is not constant AP_INIT_FLAG("CrowdSSLVerifyPeer", set_crowd_ssl_verify_peer, NULL, OR_AUTHCFG, ^ mod_authnz_crowd.c:394:5: error: (near initialization for 'commands[13].func.flag') mod_authnz_crowd.c:396:5: error: initializer element is not constant AP_INIT_TAKE1("CrowdGroupsEnvName", set_crowd_groups_env_name, NULL, OR_AUTHCFG, ^ mod_authnz_crowd.c:396:5: error: (near initialization for 'commands[14].func.take1') mod_authnz_crowd.c:401:33: error: invalid storage class for function 'get_config' static authnz_crowd_dir_config *get_config(request_rec *r) { ^ mod_authnz_crowd.c:427:13: error: invalid storage class for function 'is_https' static bool is_https(request_rec *r) { ^ mod_authnz_crowd.c:436:12: error: invalid storage class for function 'check_for_cookie' static int check_for_cookie(void *rec, const char *key, const char *value) { ^ mod_authnz_crowd.c:471:13: error: invalid storage class for function 'crowd_set_groups_env_variable' static void crowd_set_groups_env_variable(request_rec *r) { ^ mod_authnz_crowd.c: In function 'crowd_set_groups_env_variable': mod_authnz_crowd.c:493:9: warning: format '%d' expects argument of type 'int', but argument 10 has type 'apr_size_t' [-Wformat=] ap_log_rerror(APLOG_MARK, APLOG_NOTICE, 0, r, "While setting groups environment variable '%s' for remote user '%s': Value will be clipped as number of groups (%d) exceeds GRP_ENV_MAX_GROUPS (%d).", group_env_name, r->user, ngrps, GRP_ENV_MAX_GROUPS); ^ mod_authnz_crowd.c:501:31: error: 'dir_configs' undeclared (first use in this function) apr_pool_userdata_set(dir_configs, dir_configs_key, apr_pool_cleanup_null, p); ^ mod_authnz_crowd.c:501:84: error: 'p' undeclared (first use in this function) apr_pool_userdata_set(dir_configs, dir_configs_key, apr_pool_cleanup_null, p); ^ mod_authnz_crowd.c:501:9: warning: passing argument 4 of 'apr_pool_userdata_set' from incompatible pointer type [enabled by default] apr_pool_userdata_set(dir_configs, dir_configs_key, apr_pool_cleanup_null, p); ^ In file included from /usr/include/apr-1.0/apr_strings.h:50:0, from mod_authnz_crowd.c:6: /usr/include/apr-1.0/apr_pools.h:563:27: note: expected 'struct apr_pool_t *' but argument is of type 'const struct command_rec *' APR_DECLARE(apr_status_t) apr_pool_userdata_set(const void *data, ^ mod_authnz_crowd.c:503:5: warning: passing argument 1 of 'apr_array_push' from incompatible pointer type [enabled by default] APR_ARRAY_PUSH(dir_configs, authnz_crowd_dir_config *) = dir_config; ^ In file included from /usr/include/apr-1.0/apr_hooks.h:22:0, from /usr/include/apache2/ap_hooks.h:40, from /usr/include/apache2/ap_config.h:25, from /usr/include/apache2/ap_provider.h:29, from mod_authnz_crowd.c:10: /usr/include/apr-1.0/apr_tables.h:131:21: note: expected 'struct apr_array_header_t *' but argument is of type 'const struct command_rec *' APR_DECLARE(void *) apr_array_push(apr_array_header_t *arr); ^ mod_authnz_crowd.c:503:62: error: 'dir_config' undeclared (first use in this function) APR_ARRAY_PUSH(dir_configs, authnz_crowd_dir_config *) = dir_config; ^ mod_authnz_crowd.c:503:60: warning: assignment from incompatible pointer type [enabled by default] APR_ARRAY_PUSH(dir_configs, authnz_crowd_dir_config *) = dir_config; ^ mod_authnz_crowd.c:505:5: warning: 'return' with a value, in function returning void [enabled by default] return dir_config; ^ mod_authnz_crowd.c: In function 'authn_crowd_check_password': mod_authnz_crowd.c:508:20: error: invalid storage class for function 'set_once_error' static const char *set_once_error(const cmd_parms *parms) ^ mod_authnz_crowd.c:518:20: error: invalid storage class for function 'set_once' static const char *set_once(const cmd_parms *parms, const char **location, const char *w) ^ mod_authnz_crowd.c:530:20: error: invalid storage class for function 'set_flag_once' static const char *set_flag_once(const cmd_parms *parms, bool *location, bool *set_location, int on) { ^ mod_authnz_crowd.c:539:20: error: invalid storage class for function 'set_authz_crowd_authoritative' static const char *set_authz_crowd_authoritative(cmd_parms *parms, void *mconfig, int on) ^ mod_authnz_crowd.c:545:20: error: invalid storage class for function 'set_crowd_app_name' static const char *set_crowd_app_name(cmd_parms *parms, void *mconfig, const char *w) ^ mod_authnz_crowd.c:551:20: error: invalid storage class for function 'set_crowd_app_password' static const char *set_crowd_app_password(cmd_parms *parms, void *mconfig, const char *w) ^ mod_authnz_crowd.c:557:20: error: invalid storage class for function 'add_basic_auth_conversion' static const char *add_basic_auth_conversion(const char *encoding, authnz_crowd_dir_config *config, apr_pool_t *pconf, ^ mod_authnz_crowd.c:572:20: error: invalid storage class for function 'set_crowd_basic_auth_encoding' static const char *set_crowd_basic_auth_encoding(cmd_parms *parms, void *mconfig, const char *w) ^ mod_authnz_crowd.c:578:20: error: invalid storage class for function 'set_crowd_timeout' static const char *set_crowd_timeout(cmd_parms *parms, void *mconfig, const char *w) ^ mod_authnz_crowd.c:584:20: error: invalid storage class for function 'set_crowd_cert_path' static const char *set_crowd_cert_path(cmd_parms *parms, void *mconfig, const char *w) ^ mod_authnz_crowd.c:595:20: error: invalid storage class for function 'set_crowd_cert_dir' static const char *set_crowd_cert_dir(cmd_parms *parms, void *mconfig, const char *w) ^ mod_authnz_crowd.c:614:21: error: invalid storage class for function 'auth_group_checker' static authz_status auth_group_checker(request_rec *r, ^ mod_authnz_crowd.c:664:5: error: initializer element is not constant &auth_group_checker, ^ mod_authnz_crowd.c:664:5: error: (near initialization for 'authz_crowd_group_provider.check_authorization') mod_authnz_crowd.c:668:13: error: invalid storage class for function 'register_hooks' static void register_hooks(apr_pool_t *p) ^ mod_authnz_crowd.c:788:6: warning: 'init' was used with no prototype before its definition [-Wmissing-prototypes] void init() ^ mod_authnz_crowd.c:788:6: error: static declaration of 'init' follows non-static declaration mod_authnz_crowd.c:786:6: note: previous declaration of 'init' was here void init() __attribute__ ((constructor)); ^ mod_authnz_crowd.c:795:6: warning: 'term' was used with no prototype before its definition [-Wmissing-prototypes] void term() ^ mod_authnz_crowd.c:795:6: error: static declaration of 'term' follows non-static declaration mod_authnz_crowd.c:793:6: note: previous declaration of 'term' was here void term() __attribute__ ((destructor)); ^ mod_authnz_crowd.c:798:1: error: expected declaration or statement at end of input } ^ mod_authnz_crowd.c:798:1: error: expected declaration or statement at end of input mod_authnz_crowd.c:798:1: error: expected declaration or statement at end of input make[3]: *** [mod_authnz_crowd.lo] Error 1 make[3]: Leaving directory/home/aspect/resources/mod_authnz_crowd-2.2.2/src' make[2]: [all-recursive] Error 1 make[2]: Leaving directory /home/aspect/resources/mod_authnz_crowd-2.2.2/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory/home/aspect/resources/mod_authnz_crowd-2.2.2' make: [all] Error 2

  5. [Deleted user]

    Forgive me for the silly question, but how exactly can I download this version of the connector, it seems like the version on Matthias' page is gone. Any help would be greatly appreciated!

    Edit: OK I applied these changes manually and successfully built this module and it seems to work for me too on Ubuntu 14.04 with Apache 2.4 I'll test it out further for the next day and likely deploy once I build myself some Debian packages. Huge thanks to the author for his work on this!

  6. [Deleted user]

    Hey guys, I have created a fork which integrates this pull request and provides the necessary files to build a Debian package for Ubuntu 14.04 here: https://github.com/fgimian/cwdapache

    I'll soon attempt to add support for Debian 6, 7 and 8 along with Ubuntu 12.04 too.

    I'm by no means a C developer so can't really maintain the code per se, but I'd be happy to integrate further pull requests which are voted on by other experienced developers and keep my fork up to date until someone officially takes over the codebase.

    I have a keen eye on the Nginx Crowd module too which works well but doesn't seem to cache credentials at all (i.e. it hits Crowd on every single web request). I've opened an issue at https://github.com/kare/ngx_http_auth_crowd_module/issues/4 whereby I hope the author will consider implementing caching there. One of my colleagues who's a C guy will also give it a look and see if he can help.

    Hope this helps everyone
    Fotis