src/server/safs/auth.c

changeset 415
d938228c382e
parent 77
f1cff81e425a
child 467
4d038bc6f86e
equal deleted inserted replaced
414:99a34860c105 415:d938228c382e
241 return ret; 241 return ret;
242 } 242 }
243 243
244 // get auth db 244 // get auth db
245 ServerConfiguration *config = session_get_config(sn); 245 ServerConfiguration *config = session_get_config(sn);
246 sstr_t dbname = sstr(db); 246 AuthDB *authdb = cxMapGet(config->authdbs, cx_hash_key_str(db));
247 AuthDB *authdb = ucx_map_sstr_get(config->authdbs, dbname);
248 247
249 User *auth_user = authdb->get_user(authdb, user); 248 User *auth_user = authdb->get_user(authdb, user);
250 if(auth_user && !auth_user->verify_password(auth_user, pw)) { 249 if(auth_user && !auth_user->verify_password(auth_user, pw)) {
251 fprintf(stderr, "authdb user not authenticated: %s\n", user); 250 fprintf(stderr, "authdb user not authenticated: %s\n", user);
252 free(user); 251 free(user);

mercurial