2 +++ lib/auth_unix.c 2004/05/31 11:32:50
6 static char retbuf[81];
11 int username_tolower = 0;
14 if(!len) len = strlen(identifier);
15 if(len >= sizeof(retbuf)) return NULL;
18 if (!sawalpha) return NULL; /* has to be one alpha char */
20 + if( (libcyrus_config_getswitch(CYRUSOPT_NORMALIZEUID) == 1) ) {
21 + strcpy(backup,retbuf);
22 + /* remove leading blanks */
23 + for(ic=0; isblank(backup[ic]); ic++);
24 + for(rbc=0; backup[ic]; ic++) {
25 + retbuf[rbc] = ( isalpha(backup[ic]) ?
26 + tolower(backup[ic]) : backup[ic] );
30 + /* remove trailing blanks */
31 + for(--rbc; isblank(retbuf[rbc]); rbc--) {
40 +++ lib/imapoptions 2004/05/31 11:32:50
42 interface, otherwise the user is assumed to be in the default
45 +{ "normalizeuid", 0, SWITCH }
46 +/* Lowercase uid and strip leading and trailing blanks. It is recommended
47 + to set this to yes, especially if OpenLDAP is used as authentication
54 +++ lib/libcyr_cfg.c 2004/05/31 11:32:50
59 + { CYRUSOPT_NORMALIZEUID,
60 + (union cyrus_config_value)((int)1),
64 { CYRUSOPT_LAST, { NULL }, CYRUS_OPT_NOTOPT }
68 +++ lib/libcyr_cfg.h 2004/05/31 11:33:10
70 CYRUSOPT_BERKELEY_LOCKS_MAX,
71 /* BDB max txns (100) */
72 CYRUSOPT_BERKELEY_TXNS_MAX,
73 + /* Lowercase uid and strip leading and trailing blanks (OFF) */
74 + CYRUSOPT_NORMALIZEUID,