*
* @param instance Instance of this module
* @param request The current request
- * @param attr Attribute to look up in group
+ * @param req The request list
* @param check Value pair containing group to be searched
* @param check_pairs Unknown
* @param reply_pairs Unknown
* - 0 user is in group
* - 1 failure or user is not in group
*/
-static int winbind_group_cmp(void *instance, REQUEST *request, VALUE_PAIR *attr, VALUE_PAIR *check,
+static int winbind_group_cmp(void *instance, REQUEST *request, VALUE_PAIR *req, VALUE_PAIR *check,
UNUSED VALUE_PAIR *check_pairs, UNUSED VALUE_PAIR **reply_pairs)
{
rlm_winbind_t *inst = instance;
ssize_t slen;
size_t backslash = 0;
+ if (!request->username) return -1;
+
RINDENT();
if (check->vp_length == 0) {
RWDEBUG("Searching group with plain username, this will probably fail");
RWDEBUG("Ensure winbind_domain and group_search_username are both correctly set");
}
- user = attr->vp_strvalue;
+ user = request->username->vp_strvalue;
}
if (domain) {