Also, use ldout in rgw_file.h in 3 places.
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
fe->join();
delete fe;
+ delete fec;
+ delete ldh;
rgw_log_usage_finalize();
return -ERR_USER_SUSPENDED;
} else {
/* try external authenticators (ldap for now) */
- rgw::LDAPHelper* ldh = rgwlib.get_ldh();
+ rgw::LDAPHelper* ldh = rgwlib.get_ldh(); /* !nullptr */
RGWToken token{from_base64(key.id)};
if (ldh->auth(token.id, token.key) == 0) {
/* try to store user if it doesn't already exist */
int ret = rgw_store_user_info(store, user, NULL, NULL, 0,
true);
if (ret < 0) {
- dout(10) << "NOTICE: failed to store new user's info: ret=" << ret
- << dendl;
+ lsubdout(get_context(), rgw, 10)
+ << "NOTICE: failed to store new user's info: ret=" << ret
+ << dendl;
}
}
} /* auth success */
if (rgw_get_user_info_by_uid(store, uid, user_info) < 0) {
int ret = rgw_store_user_info(store, user_info, NULL, NULL, 0, true);
if (ret < 0) {
- dout(10) << "NOTICE: failed to store new user's info: ret="
- << ret << dendl;
+ ldout(store->ctx(), 10)
+ << "NOTICE: failed to store new user's info: ret="
+ << ret << dendl;
}
s->perm_mask = RGW_PERM_FULL_CONTROL;
}
user_info) < 0) {
int ret = rgw_store_user_info(store, user_info, NULL, NULL, 0, true);
if (ret < 0) {
- dout(10) << "NOTICE: failed to store new user's info: ret=" << ret
- << dendl;
+ ldout(store->ctx(), 10)
+ << "NOTICE: failed to store new user's info: ret=" << ret
+ << dendl;
}
s->perm_mask = RGW_PERM_FULL_CONTROL;
}
test_rgw_ldap_LDADD = $(UNITTEST_LDADD) \
librados.la $(PTHREAD_LIBS) $(LIBOS) $(CEPH_GLOBAL) ${OPENLDAP_LIBS}
$(EXTRALIBS)
-bin_DEBUGPROGRAMS += test_rgw_token
+bin_DEBUGPROGRAMS += test_rgw_ldap
endif # WITH_RADOSGW