Changeset 1516

Show
Ignore:
Timestamp:
01/14/2007 09:40:02 AM (1 year ago)
Author:
darix
Message:

r1553@h2o: darix | 2007-01-14 10:37:14 +0100

  • allow empty passwords with ldap.
    patch by Jöerg Sonnenberger
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/lighttpd-1.4.x/src/http_auth.c

    r1371 r1516  
    734734                } 
    735735 
    736  
     736                if (p->conf.auth_ldap_allow_empty_pw != 1 && pw[0] == '\0') 
     737                        return -1; 
    737738 
    738739                /* build filter */ 
  • branches/lighttpd-1.4.x/src/http_auth.h

    r1371 r1516  
    3737        buffer *auth_ldap_cafile; 
    3838        unsigned short auth_ldap_starttls; 
     39        unsigned short auth_ldap_allow_empty_pw; 
    3940 
    4041        unsigned short auth_debug; 
  • branches/lighttpd-1.4.x/src/mod_auth.c

    r1371 r1516  
    114114        PATCH(auth_ldap_cafile); 
    115115        PATCH(auth_ldap_starttls); 
     116        PATCH(auth_ldap_allow_empty_pw); 
    116117#ifdef USE_LDAP 
    117118        PATCH(ldap); 
     
    161162                        } else if (buffer_is_equal_string(du->key, CONST_STR_LEN("auth.backend.ldap.starttls"))) { 
    162163                                PATCH(auth_ldap_starttls); 
     164                        } else if (buffer_is_equal_string(du->key, CONST_STR_LEN("auth.backend.ldap.allow-empty-pw"))) { 
     165                                PATCH(auth_ldap_allow_empty_pw); 
    163166                        } 
    164167                } 
     
    313316                { "auth.backend.ldap.bind-dn",      NULL, T_CONFIG_STRING, T_CONFIG_SCOPE_CONNECTION }, 
    314317                { "auth.backend.ldap.bind-pw",      NULL, T_CONFIG_STRING, T_CONFIG_SCOPE_CONNECTION }, /* 10 */ 
     318                { "auth.backend.ldap.allow-empty-pw",     NULL, T_CONFIG_BOOLEAN, T_CONFIG_SCOPE_CONNECTION }, 
    315319                { "auth.backend.htdigest.userfile", NULL, T_CONFIG_STRING, T_CONFIG_SCOPE_CONNECTION }, 
    316320                { "auth.backend.htpasswd.userfile", NULL, T_CONFIG_STRING, T_CONFIG_SCOPE_CONNECTION }, 
     
    360364                cv[7].destination = s->auth_ldap_cafile; 
    361365                cv[8].destination = &(s->auth_ldap_starttls); 
    362                 cv[9].destination = s->auth_ldap_binddn; 
    363                 cv[10].destination = s->auth_ldap_bindpw; 
    364                 cv[11].destination = s->auth_htdigest_userfile; 
    365                 cv[12].destination = s->auth_htpasswd_userfile; 
    366                 cv[13].destination = &(s->auth_debug); 
     366                cv[9].destination = s->auth_ldap_binddn; 
     367                cv[10].destination = s->auth_ldap_bindpw; 
     368                cv[11].destination = &(s->auth_ldap_allow_empty_pw); 
     369                cv[12].destination = s->auth_htdigest_userfile; 
     370                cv[13].destination = s->auth_htpasswd_userfile; 
     371                cv[14].destination = &(s->auth_debug); 
    367372 
    368373                p->config_storage[i] = s;