Apache httpd 'mod_authz_dbm case insensitive' patch

Motivation

The mod_authz_dbm module permits authorization to be handled via groups stored in a DBM-style database. Unfortunately, in some environments, users are accustomed to disregard case sensitivity issues, and will use group names such as "staff", "Staff" and "STAFF" interchangeably. In addition, in some environments, usernames might be presented with arbitrary case variations ("john", "John", "JOHN" etc).

The Solution

This small patch adds an extra flag to the mod_authz_dbm module: AuthzDBMCaseInsensitive, which causes group comparisons to be performed case-insensitively. [2012-02-09] a new version of this patch also adds another flag: AuthzDBMForceUserLowerCase, which causes the username to be changed to all lower case before performing any group lookups.

Here are the most recent versions of the patch:

All versions of the patch are listed here. Some may work better than others.

Installation

This is a patch against the httpd source code. I apply it with something like:
patch -p1 < mod_authz_dbm-case_insensitive.patch

Steve Bennett
last updated: 31/07/2012