110 if(list->defaultauthdb) { |
110 if(list->defaultauthdb) { |
111 char *usr; |
111 char *usr; |
112 char *pw; |
112 char *pw; |
113 if(!basicauth_getuser(sn, rq, &usr, &pw)) { |
113 if(!basicauth_getuser(sn, rq, &usr, &pw)) { |
114 int pwok; |
114 int pwok; |
115 user = authdb_get_and_verify(list->defaultauthdb, usr, pw, &pwok); |
115 user = authdb_get_and_verify(list->defaultauthdb, sn, rq, usr, pw, &pwok); |
116 if(!user) { |
116 if(!user) { |
117 // wrong user or wrong password |
117 // wrong user or wrong password |
118 return NULL; |
118 return NULL; |
119 } |
119 } |
120 // ok - user is authenticated |
120 // ok - user is authenticated |