From: Howard Chu Date: Wed, 3 Jun 2009 02:58:16 +0000 (+0000) Subject: Accept spaces in group names unless -DSTRICT_GROUPS X-Git-Tag: ACLCHECK_0~518 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=ec11a76a6270435fcc76708d51892d5f92aa519e;p=openldap Accept spaces in group names unless -DSTRICT_GROUPS --- diff --git a/contrib/slapd-modules/nssov/group.c b/contrib/slapd-modules/nssov/group.c index 449cfe24d5..866dcd6a10 100644 --- a/contrib/slapd-modules/nssov/group.c +++ b/contrib/slapd-modules/nssov/group.c @@ -1,7 +1,7 @@ /* group.c - group lookup routines */ /* $OpenLDAP$ */ /* - * Copyright 2008 by Howard Chu, Symas Corp. + * Copyright 2008-2009 by Howard Chu, Symas Corp. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -121,6 +121,10 @@ static int isvalidgroupname(struct berval *name) /* check other characters */ for (i=1;ibv_len;i++) { +#ifndef STRICT_GROUPS + /* allow spaces too */ + if (name->bv_val[i] == ' ') continue; +#endif if ( ! ( (name->bv_val[i]>='A' && name->bv_val[i] <= 'Z') || (name->bv_val[i]>='a' && name->bv_val[i] <= 'z') || (name->bv_val[i]>='0' && name->bv_val[i] <= '9') ||